Installation problem

200 views
Skip to first unread message

Vinod Solet

unread,
May 31, 2023, 10:35:07 AM5/31/23
to BerkeleyGW Help
Hi users, 
I am trying to install BerkeleyGW-3.0.1. But the "stampede.tacc.utexas.edu_threaded_hdf5.mk " file is not present in the config folder. Can anyone help me regarding this?

Mauro Del Ben

unread,
May 31, 2023, 2:07:53 PM5/31/23
to Vinod Solet, BerkeleyGW Help
Hi Vinod,

This is the arch.mk we have used on Frontera at TACC last summer, it should be relatively straightforward to adapt it for stampede.

# You'll need to run:
# module load arpack impi intel/19.0.5 phdf5
#
# Use 'make -j 8' for parallel build on Frontera
#
# Zhenglu Li
# July 2020, Berkeley

COMPFLAG  = -DINTEL
PARAFLAG  = -DMPI -DOMP
MATHFLAG  = -DUSESCALAPACK -DUNPACKED -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 -nostdinc
F90free = mpiifort -xCORE-AVX512 -free -qopenmp -ip -no-ipo
LINK    = mpiifort -xCORE-AVX512 -qopenmp -ip -no-ipo
# We need the -fp-model procise to pass the testsuite.
FOPTS   = -O3 -fp-model source
FNOOPTS = -O2 -fp-model source -no-ip
#FOPTS   = -g -O0 -check all -Warn all -traceback
#FNOOPTS = $(FOPTS)
MOD_OPT = -module
INCFLAG = -I

C_PARAFLAG = -DPARA -DMPICH_IGNORE_CXX_SEEK
CC_COMP = mpiicpc -xCORE-AVX512
C_COMP  = mpiicc -xCORE-AVX512
C_LINK  = mpiicpc -xCORE-AVX512
C_OPTS  = -O3 -ip -no-ipo -qopenmp
C_DEBUGFLAG =

REMOVE  = /bin/rm -f

# Math Libraries
#
MKLPATH      = $(MKLROOT)/lib/intel64

FFTWLIB      = -Wl,--start-group \
$(MKLPATH)/libmkl_intel_lp64.a \
$(MKLPATH)/libmkl_intel_thread.a \
$(MKLPATH)/libmkl_core.a \
-Wl,--end-group -liomp5 -lpthread -lm -ldl
FFTWINCLUDE  = $(MKLROOT)/include/fftw


LAPACKLIB    = -Wl,--start-group \
$(MKLPATH)/libmkl_intel_lp64.a \
$(MKLPATH)/libmkl_intel_thread.a \
$(MKLPATH)/libmkl_core.a \
$(MKLPATH)/libmkl_blacs_intelmpi_lp64.a \
-Wl,--end-group -liomp5 -lpthread -lm -ldl
SCALAPACKLIB = $(MKLPATH)/libmkl_scalapack_lp64.a

HDF5PATH     = $(TACC_HDF5_LIB)
HDF5LIB      = $(HDF5PATH)/libhdf5hl_fortran.a \
$(HDF5PATH)/libhdf5_hl.a \
$(HDF5PATH)/libhdf5_fortran.a \
$(HDF5PATH)/libhdf5.a \
$(HDF5PATH)/libsz.a \
-lz
HDF5INCLUDE  = $(HDF5PATH)/../include

TESTSCRIPT = 

On Wed, May 31, 2023 at 7:35 AM Vinod Solet <vso...@gmail.com> wrote:
Hi users, 
I am trying to install BerkeleyGW-3.0.1. But the "stampede.tacc.utexas.edu_threaded_hdf5.mk " file is not present in the config folder. Can anyone help me regarding this?

--
You received this message because you are subscribed to the Google Groups "BerkeleyGW Help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to help+uns...@berkeleygw.org.
To view this discussion on the web visit https://groups.google.com/a/berkeleygw.org/d/msgid/help/15f64340-110f-4749-80d9-3962ed6ad4d1n%40berkeleygw.org.

Vinod Solet

unread,
Jun 2, 2023, 6:18:47 AM6/2/23
to BerkeleyGW Help, Mauro Del Ben, BerkeleyGW Help, Vinod Solet
Thank to you Mauro Del Ben for your reply.
But after your suggestion, i got error like this

hdf5_io_safe.p.f:(.text+0x793): undefined reference to `__h5d_MOD_h5dcreate_f'
/usr/bin/ld: Common/hdf5_io_safe.o: in function `__hdf5_io_safe_m_MOD_safe_h5screate_simple':
hdf5_io_safe.p.f:(.text+0x7d3): undefined reference to `__h5s_MOD_h5screate_simple_f'
collect2: error: ld returned 1 exit status
make[2]: *** [Common/common-rules.mk:212: Common/test_evecs.real.x] Error 1
make[2]: Leaving directory '/home/vinod/programs/BerkeleyGW-3.0.1'
make[1]: *** [Makefile:8: pre] Error 2
make[1]: Leaving directory '/home/vinod/programs/BerkeleyGW-3.0.1'
make: *** [Makefile:115: all] Error 2

This is my arch.mk file

FCPP    = cpp -C -nostdinc
#F90free = /usr/bin/mpif90 -ffree-form -ffree-line-length-none -Wall
F90free = /usr/bin/mpif90 -ffree-form -ffree-line-length-none -fbounds-check -Wintrinsic-shadow -std=gnu -fopenmp
#F90free = /usr/bin/mpif90 -ffree-form -ffree-line-length-none -fbounds-check -Wall -pedantic-errors -std=gnu -fopenmp
#F90free = /usr/bin/mpif90 -ffree-form -ffree-line-length-none -fbounds-check -fbacktrace -ffpe-trap=invalid,zero,overflow
# denormal not supported, according to runtime error
# precision is flagged by cputime: http://gcc.gnu.org/onlinedocs/gcc-4.5.3/gfortran/Debugging-Options.html
# underflow is flagged by dlamch from lapack
LINK    = /usr/bin/mpif90 -fopenmp
FOPTS   = -O3
#FOPTS   = -g -C
FNOOPTS = $(FOPTS)
MOD_OPT = -J

INCFLAG = -I

C_PARAFLAG  = -DPARA
CC_COMP  = /usr/bin/mpiCC
C_COMP  = /usr/bin/mpicc
C_LINK  = /usr/bin/mpiCC
C_OPTS  = -O3

C_DEBUGFLAG =

REMOVE  = /bin/rm -f

# Math Libraries
#
MKLPATH      = $(MKLROOT)/lib/intel64

FFTWLIB      = -Wl,--start-group \
$(MKLPATH)/libmkl_intel_lp64.a \
$(MKLPATH)/libmkl_intel_thread.a \
$(MKLPATH)/libmkl_core.a \
-Wl,--end-group -liomp5 -lpthread -lm -ldl
FFTWINCLUDE  = $(MKLROOT)/include/fftw

# Math Libraries
#
#FFTWLIB      = -L/usr/lib/x86_64-linux-gnu -lfftw3 -lfftw3_threads
#FFTWINCLUDE  = /usr/include
# FHJ: Note: manually compiled threaded LAPACK and ScaLAPACK on tigger
LAPACKLIB    = /usr/lib/x86_64-linux-gnu/liblapack.a -L/usr/lib/x86_64-linux-gnu -lblas
SCALAPACKLIB = /home/vinod/programs/scalapack-2.2.0/libscalapack.a

HDF5LIB      = -L/home/vinod/programs/hdf5-1.14.1/hdf/HDF_Group/HDF5/1.14.1/lib -lhdf5_hl -lhdf5 -lz
HDF5INCLUDE  = /home/vinod/programs/hdf5-1.14.1/hdf/HDF_Group/HDF5/1.14.1/include

#need to export MPIEXEC=/usr/bin/mpirun if this is not default in `which mpiexec`
TESTSCRIPT = make check-parallel
                                                                                                                                                                                         69,1          Bot

Thank you in advance.

Mauro Del Ben

unread,
Jun 2, 2023, 2:52:58 PM6/2/23
to Vinod Solet, BerkeleyGW Help
Hi Vinod,

You need to add the fortran HDF5 library wrappers to the HDF5LIB line:

HDF5LIB      = -L/home/vinod/programs/hdf5-1.14.1/hdf/HDF_Group/HDF5/1.14.1/lib -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5 -lz

Best

-M


Vinod Solet

unread,
Jun 3, 2023, 10:04:50 AM6/3/23
to BerkeleyGW Help, Mauro Del Ben, BerkeleyGW Help, Vinod Solet
Hello Dr. Ben, There is no such file of -lhdf5hl_fortran in my lib folder of hdf5, indeed the different file -lhdf5_hl_fortran is present here. After running this i got this error.

make[2]: Leaving directory '/home/vinod/programs/BerkeleyGW-3.0.1'
make[2]: Entering directory '/home/vinod/programs/BerkeleyGW-3.0.1'
cd ./Common/qhull && make lib
/usr/bin/mpif90 -fopenmp -O3 -o Common/test_evecs.real.x Common/test_evecs.o Common/global.o Common/typedefs.o Common/nrtype.o Common/push_pop.o Common/message.o Common/peinfo.o Common/timing.o Common/scalapack_aux.o Common/os.o Common/os_c.o Common/evecs.o Common/hdf5_io.o Common/wfn_io_hdf5.o Common/hdf5_io_data.o Common/hdf5_io_safe.o -L/home/vinod/programs/hdf5-1.14.1/hdf/HDF_Group/HDF5/1.14.1/lib -lhdf5_hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5 -lz
make[3]: Entering directory '/home/vinod/programs/BerkeleyGW-3.0.1/Common/qhull'
make[3]: Nothing to be done for 'lib'.
make[3]: Leaving directory '/home/vinod/programs/BerkeleyGW-3.0.1/Common/qhull'
/usr/bin/ld: Common/evecs.o: in function `__evecs_m_MOD_evecs_read_local_arrays_par_hdf5':
evecs.p.f:(.text+0x4bc9): undefined reference to `h5pset_dxpl_mpio_f_'
/usr/bin/ld: Common/evecs.o: in function `__evecs_m_MOD_evecs_write_local_arrays_par_hdf5':
evecs.p.f:(.text+0x812a): undefined reference to `h5pset_dxpl_mpio_f_'
/usr/bin/ld: Common/hdf5_io.o: in function `__hdf5_io_m_MOD_hdf5_create_file':
hdf5_io.p.f:(.text+0x408): undefined reference to `h5pset_fapl_mpio_f_'
/usr/bin/ld: hdf5_io.p.f:(.text+0x501): undefined reference to `h5pset_fapl_mpio_f_'
/usr/bin/ld: Common/hdf5_io.o: in function `__hdf5_io_m_MOD_hdf5_open_file':
hdf5_io.p.f:(.text+0x772): undefined reference to `h5pset_fapl_mpio_f_'
/usr/bin/ld: hdf5_io.p.f:(.text+0x923): undefined reference to `h5pset_fapl_mpio_f_'
/usr/bin/ld: Common/wfn_io_hdf5.o: in function `__wfn_io_hdf5_m_MOD_read_hdf5_bands_block':
wfn_io_hdf5.p.f:(.text+0x32ee): undefined reference to `h5pset_dxpl_mpio_f_'
/usr/bin/ld: wfn_io_hdf5.p.f:(.text+0x3593): undefined reference to `h5pset_dxpl_mpio_f_'
/usr/bin/ld: Common/hdf5_io_safe.o: in function `__hdf5_io_safe_m_MOD_safe_h5pset_dxpl_mpio':
hdf5_io_safe.p.f:(.text+0x603): undefined reference to `h5pset_dxpl_mpio_f_'
/usr/bin/ld: /home/vinod/programs/hdf5-1.14.1/hdf/HDF_Group/HDF5/1.14.1/lib/libhdf5.so: undefined reference to `stat64@GLIBC_2.33'
/usr/bin/ld: /home/vinod/programs/hdf5-1.14.1/hdf/HDF_Group/HDF5/1.14.1/lib/libhdf5.so: undefined reference to `fstat64@GLIBC_2.33'
/usr/bin/ld: /home/vinod/programs/hdf5-1.14.1/hdf/HDF_Group/HDF5/1.14.1/lib/libhdf5.so: undefined reference to `dlclose@GLIBC_2.34'
/usr/bin/ld: /home/vinod/programs/hdf5-1.14.1/hdf/HDF_Group/HDF5/1.14.1/lib/libhdf5.so: undefined reference to `dlerror@GLIBC_2.34'
/usr/bin/ld: /home/vinod/programs/hdf5-1.14.1/hdf/HDF_Group/HDF5/1.14.1/lib/libhdf5.so: undefined reference to `lstat64@GLIBC_2.33'
/usr/bin/ld: /home/vinod/programs/hdf5-1.14.1/hdf/HDF_Group/HDF5/1.14.1/lib/libhdf5.so: undefined reference to `dlsym@GLIBC_2.34'
/usr/bin/ld: /home/vinod/programs/hdf5-1.14.1/hdf/HDF_Group/HDF5/1.14.1/lib/libhdf5.so: undefined reference to `dlopen@GLIBC_2.34'

collect2: error: ld returned 1 exit status
make[2]: *** [Common/common-rules.mk:212: Common/test_evecs.real.x] Error 1
make[2]: Leaving directory '/home/vinod/programs/BerkeleyGW-3.0.1'
make[1]: *** [Makefile:8: pre] Error 2
make[1]: Leaving directory '/home/vinod/programs/BerkeleyGW-3.0.1'
make: *** [Makefile:115: all] Error 2

The modified arch.mk file is printed below.

# arch.mk for BerkeleyGW codes
#
# Suitable for Ubuntu 10.10 in parallel.
# Install packages: liblapack-dev, fftw-dev, gfortran, g++, mpi-default-dev
# Build BLACS according to http://www.open-mpi.org/faq/?category=mpi-apps#blacs
# Build ScaLAPACK according to http://www.open-mpi.org/faq/?category=mpi-apps#scalapack,
#
# Jamal I. Mustafa
# July 2014, UC Berkeley

COMPFLAG  = -DGNU
PARAFLAG  = -DMPI -DOMP
MATHFLAG  = -DUSESCALAPACK -DHDF5 -DUSEFFTW3

# 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

#########################################################################
#   NOTE: This arch.mk is used by a buildslave. The compiler flags are  #
#   optimized to debug the code and not for code performance.           #
#########################################################################
#HDF5LIB      = -L/home/vinod/programs/hdf5-1.14.1/hdf/HDF_Group/HDF5/1.14.1/lib -lhdf5_hl -lhdf5 -lz
HDF5LIB      = -L/home/vinod/programs/hdf5-1.14.1/hdf/HDF_Group/HDF5/1.14.1/lib -lhdf5_hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5 -lz

HDF5INCLUDE  = /home/vinod/programs/hdf5-1.14.1/hdf/HDF_Group/HDF5/1.14.1/include

#need to export MPIEXEC=/usr/bin/mpirun if this is not default in `which mpiexec`
TESTSCRIPT = make check-parallel

Mauro Del Ben

unread,
Jun 5, 2023, 5:48:19 PM6/5/23
to Vinod Solet, BerkeleyGW Help
Hi Vinod,

This is not something we can really solve, the error says that the HDF5 libraries you are linking in are missing dependencies. You have 3 options:
- Reach out to the system administrator (open a ticket at the computer center you're working) and ask assistance to rebuild and link HDF5 
- Build your own HDF5 library https://www.hdfgroup.org/solutions/hdf5/
- Don't use HDF5, comment out in arch.mk  -DHDF5 HDF5LIB and HDF5INCLUDE flags 

Best

-M

Reply all
Reply to author
Forward
0 new messages