make error when using hdf5

Submitted by will zhang on Mon, 03/27/2017 - 00:01

Forums 

Installation

Hi, all
When I install BGW without hdf5, everything is ok.But with hdf5, an error appears, the following are my arch.mk and error report.Any help will be appreciated!Thanks~
Best,
Will

../Common/fftw.o: In function `fftw_m_mp_do_fft_':
Common/fftw.p.f:(.text+0xcd9): undefined reference to `fftwnd_f77_create_plan_'
Common/fftw.p.f:(.text+0xcf8): undefined reference to `fftwnd_f77_create_plan_'
Common/fftw.p.f:(.text+0x11f5): undefined reference to `fftwnd_f77_one_'
Common/fftw.p.f:(.text+0x1ad6): undefined reference to `fftwnd_f77_one_'
Common/fftw.p.f:(.text+0x21fd): undefined reference to `fftwnd_f77_destroy_plan_'
Common/fftw.p.f:(.text+0x2209): undefined reference to `fftwnd_f77_destroy_plan_'
../Common/fftw.o: In function `fftw_m_mp_destroy_fftw_plans_':
Common/fftw.p.f:(.text+0x297d): undefined reference to `fftwnd_f77_destroy_plan_'
Common/fftw.p.f:(.text+0x2989): undefined reference to `fftwnd_f77_destroy_plan_'
epsmat_old2hdf5.o: In function `MAIN__':
epsmat_old2hdf5.p.f:(.text+0x1d43): undefined reference to `eps_hdf5_setup_'
epsmat_old2hdf5.p.f:(.text+0x24e0): undefined reference to `write_gvec_indices_hdf_'
epsmat_old2hdf5.p.f:(.text+0x274e): undefined reference to `write_vcoul_hdf_'
epsmat_old2hdf5.p.f:(.text+0x280f): undefined reference to `write_matrix_f_ser_hdf_'
epsmat_old2hdf5.p.f:(.text+0x2867): undefined reference to `write_matrix_ser_hdf_'
epsmat_old2hdf5.p.f:(.text+0x310c): undefined reference to `write_matrix_diagonal_hdf_'
epsmat_old2hdf5.p.f:(.text+0x322c): undefined reference to `set_qpt_done_'
make[2]: *** [epsmat_old2hdf5.real.x] Error 1
make[2]: Leaving directory `/vol-th/home/jichenicqm/will/software/BerkeleyGW-1.2.0/Epsilon'
make[1]: *** [make-Epsilon] Error 2
make[1]: Leaving directory `/vol-th/home/jichenicqm/will/software/BerkeleyGW-1.2.0'
make: *** [epsilon] Error 2
..............................................................................................................
arch.mk
# arch.mk for BerkeleyGW codes
#
# suitable for cruller.mit.edu, with Intel compilers and MVAPICH
# Status: works only for 4 procs
#
# Run the following command before compiling:
# module load mvapich2-2.0/intel
#
# D. Strubbe
# Oct 2012, MIT

COMPFLAG = -DINTEL
PARAFLAG = -DMPI
MATHFLAG = -DUSESCALAPACK -DUSEFFTW3 -DHDF5
# Only uncomment DEBUGFLAG if you need to develop/debug BerkeleyGW.
# The output will be much more verbose, and the code will slow down by ~20%.
#DEBUGFLAG = -DDEBUG

FCPP = cpp -C
F90free = mpif90 -free
LINK = mpif90 -i-static
FOPTS = -O3 -no-prec-div
FNOOPTS = -O2 -no-prec-div
MOD_OPT = -module
INCFLAG = -I

C_PARAFLAG = -DPARA
CC_COMP = mpicxx
C_COMP = mpicc
C_LINK = mpicxx
C_OPTS = -O3
C_DEBUGFLAG =

REMOVE = /bin/rm -f

# Math Libraries
#
# Using MKL for FFTW3 gives wrong answers!!!
FFTWPATH = /vol-th/home/jichenicqm/will/software/local
FFTWLIB = -L$(FFTWPATH)/lib/ -lfftw3 -lfftw3_mpi
FFTWINCLUDE = $(FFTWPATH)/include
MKLPATH = /opt/intel/mkl/10.2.5.035/lib/em64t/
LAPACKLIB = -Wl,--start-group $(MKLPATH)/libmkl_intel_lp64.a $(MKLPATH)/libmkl_sequential.a \
$(MKLPATH)/libmkl_core.a $(MKLPATH)/libmkl_blacs_intelmpi_lp64.a -Wl,--end-group -lpthread
SCALAPACKLIB = $(MKLPATH)/libmkl_scalapack_lp64.a

HDF5DIR = /vol-th/home/jichenicqm/will/software/local/hdf5
HDF5LIB = -L$(HDF5DIR)/lib -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -lz
TESTSCRIPT = qsub cruller.scr

jdeslip's picture

Submitted by jdeslip on Wed, 04/19/2017 - 19:36

It looks like things failed building a conversion routine: epsmat_old2hdf5.real.x - did epsilon.real.x finishing building correctly though? This should happen first.

I'm not entirely sure what goes wrong when linking epsmat_old2hdf5.real.x - could you post the link line that occurs right before this output? Something is odd with it.

Submitted by will zhang on Thu, 04/20/2017 - 02:53

Thanks for your reply. After the above make, epsilon.rela.x does not exist and only these guys appear in /bin directory.
.....................................
average.py bsemat_hdf5_upgrade.py common.py convert.py data-file2gsphere.py data-file2kgrid.py gsphere.py link.py matrix.py matter.py volume.py
...................................
Below maybe the message you need.Does this mean my hdf5 have not been installed correctly or inconsistent with BGW?
Thank you once again!

cd ./Common/qhull && make lib
make[1]: Entering directory `/vol-th/home/jichenicqm/will/software/BerkeleyGW-1.2.0/Common/qhull'
make[1]: Nothing to be done for `lib'.
make[1]: Leaving directory `/vol-th/home/jichenicqm/will/software/BerkeleyGW-1.2.0/Common/qhull'
make make-Epsilon
make[1]: Entering directory `/vol-th/home/jichenicqm/will/software/BerkeleyGW-1.2.0'
cd Epsilon && make
make[2]: Entering directory `/vol-th/home/jichenicqm/will/software/BerkeleyGW-1.2.0/Epsilon'
cd ../Common/qhull && make lib
make[3]: Entering directory `/vol-th/home/jichenicqm/will/software/BerkeleyGW-1.2.0/Common/qhull'
make[3]: Nothing to be done for `lib'.
make[3]: Leaving directory `/vol-th/home/jichenicqm/will/software/BerkeleyGW-1.2.0/Common/qhull'
mpif90 -i-static -openmp -O3 -no-prec-div -o epsmat_old2hdf5.real.x ../Common/bessel.o ../Common/subgrp.o ../Common/check_inversion.o ../Common/svninfo.o ../Common/sort.o ../Common/scalapack.o ../Common/misc.o ../Common/gmap.o ../Common/inversion.o ../Common/write_program_header.o ../Common/write_matrix.o ../Common/read_matrix.o ../Common/fftw.o ../Common/fullbz.o ../Common/irrbz.o ../Common/fft_parallel.o ../Common/minibzaverage.o ../Common/vcoul_generator.o ../Common/trunc_cell_wire.o ../Common/trunc_cell_box.o ../Common/trunc_cell_box_d.o ../Common/trunc_scell_box_d.o ../Common/checkbz.o ../Common/eqpcor.o ../Common/createpools.o ../Common/random.o ../Common/input_utils.o ../Common/wfn_rho_vxc_io.o ../Common/blas.o ../Common/lapack.o ../Common/splines.o ../Common/scissors.o ../Common/io_utils.o ../Common/epswrite_hdf5.o ../Common/epsread_hdf5.o ../Common/find_kpt_match.o ../Common/hdf5_io.o ../Common/wfn_io_hdf5.o ../Common/inread_common.o ../Common/tile.o ../Common/global.o ../Common/typedefs.o ../Common/nrtype.o ../Common/push_pop.o ../Common/message.o ../Common/peinfo.o ../Common/timing.o ../Common/intrinsics.o ../Common/scalapack_aux.o ../Common/qhull/libtile_qhull.a epsmat_old2hdf5.o /opt/intel/mkl/10.2.5.035/lib/em64t//libmkl_scalapack_lp64.a -L/vol-th/home/jichenicqm/will/software/local/lib/ -lfftw3 -lfftw3_mpi -Wl,--start-group /opt/intel/mkl/10.2.5.035/lib/em64t//libmkl_intel_lp64.a /opt/intel/mkl/10.2.5.035/lib/em64t//libmkl_sequential.a /opt/intel/mkl/10.2.5.035/lib/em64t//libmkl_core.a /opt/intel/mkl/10.2.5.035/lib/em64t//libmkl_blacs_intelmpi_lp64.a -Wl,--end-group -lpthread -L/vol-th/home/jichenicqm/will/software/local/hdf5/lib -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -lz
ld: MPIR_Thread: TLS reference in /usr/local/mpi3/lib/libmpich.a(op_free.o) mismatches non-TLS definition in /vol-th/home/jichenicqm/will/software/local/hdf5/lib/libhdf5_fortran.so section .bss
/usr/local/mpi3/lib/libmpich.a: could not read symbols: Bad value
make[2]: *** [epsmat_old2hdf5.real.x] Error 1
make[2]: Leaving directory `/vol-th/home/jichenicqm/will/software/BerkeleyGW-1.2.0/Epsilon'
make[1]: *** [make-Epsilon] Error 2
make[1]: Leaving directory `/vol-th/home/jichenicqm/will/software/BerkeleyGW-1.2.0'
make: *** [epsilon] Error 2