Trouble when installation in Redhat Linux

Submitted by utpallab on Fri, 10/17/2014 - 23:47

Forums 

Installation

Dear User

I met the following error massage when I was installing the BerkeleyGW 1.1 in my cluster machine (operating system is Redhat linux).
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
mon/splines.o ../Common/scissors.o ../Common/epsread_hdf5.o ../Common/io_utils.o ../Common/read_rho_vxc.o ../Common/inread_common.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 sigma_main.o inread.o input.o input_outer.o genwf_disk.o genwf_mpi.o mtxel.o mtxel_ch.o mtxel_sxch.o mtxel_vxc.o wpeff.o write_result.o write_result_hp.o write_result_dyn.o write_result_dyn_hp.o epscopy.o shiftenergy.o shiftenergy_dyn.o /home/Utpal/Quantum_espresso/fftw-2.1.5/fftw/libfftw.la -llapack
/home/Utpal/Quantum_espresso/fftw-2.1.5/fftw/libfftw.la: file not recognized: File format not recognized
collect2: ld returned 1 exit status
make[2]: *** [sigma.real.x] Error 1
make[2]: Leaving directory `/home/Utpal/Quantum_espresso/BGW-1.1.beta/Sigma'
make[1]: *** [sigma-all] Error 2
make[1]: Leaving directory `/home/Utpal/Quantum_espresso/BGW-1.1.beta'
make: *** [all] Error 2

.....................................................................................................................................................................................................................
At first in my machine fftw-3.3.3 was installed, then I have install fftw-2.1.5 as fftw-2.1.5.X is required for BerkeleyGW installation.
My arch.mk is
.....................................................................................................................................................................................................................
# 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,
#
# D. Strubbe
# January 2011, UCB

COMPFLAG = -DGNU
PARAFLAG = -DMPI
MATHFLAG = -DUSESCALAPACK
# 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 -DVERBOSE

#########################################################################
# NOTE: This arch.mk is used by a buildslave. The compiler flags are #
# optimized to debug the code and not for code performance. #
#########################################################################
FCPP = cpp -ansi
#F90free = /usr/bin/mpif90 -ffree-form -ffree-line-length-none -Wall
F90free = /usr/bin/mpif90 -ffree-form -ffree-line-length-none -fbounds-check -Wall -pedantic-errors -std=gnu
#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
FOPTS = -O3
#FOPTS = -g -C
FNOOPTS = $(FOPTS)
MOD_OPT = -J
INCFLAG = -I

C_PARAFLAG = -DPARA
#CC_COMP = /usr/bin/mpiCC -Wall -pedantic-errors -std=c++0x
#C_COMP = /usr/bin/mpicc -Wall -pedantic-errors -std=c99
#C_LINK = /usr/bin/mpiCC

CC_COMP = /opt/openmpi/bin/mpiCC -Wall -pedantic-errors -std=c++0x
C_COMP = /opt/openmpi/bin/mpicc -Wall -pedantic-errors -std=c99
C_LINK = /opt/openmpi/bin/mpiCC
C_OPTS = -O3
C_DEBUGFLAG =

REMOVE = /bin/rm -f

# Math Libraries
#
#FFTWLIB = -L/usr/include/ -lfftw
#FFTWLIB = /home/Utpal/Quantum_espresso/fftw-2.1.5/fftw/ -lfftw
FFTWLIB = /home/Utpal/Quantum_espresso/fftw-2.1.5/fftw/libfftw.la
#FFTWLIB = /usr/local/lib/libfftw.la

FFTWINCLUDE = /home/Utpal/Quantum_espresso/fftw-2.1.5/fortran
#LAPACKLIB = -L/usr/lib/ -llapack
LAPACKLIB = -llapack
BLACSDIR = /usr/local/BLACS/LIB
BLACS = /usr/local/BLACS/LIB/blacsF77init_MPI-LINUX-0.a \
/usr/local/BLACS/LIB/blacs_MPI-LINUX-0.a \
/usr/local/BLACS/LIB/blacsCinit_MPI-LINUX-0.a
#SCALAPACKLIB = /usr/lib/libscalapack-1.a $(BLACS)
SCALAPACKLIB = /usr/local/scalapack-2.0.1/libscalapack.a

LIBS=$(SCALAPACK_LIBS) $(BLACS_LIBS) $(LAPACK_LIBS) $(BLAS_LIBS)
#Ubuntu BLACS/SCALAPACK packages don't work properly sometimes
#BLACS = -lblacs-openmpi -lblacsF77init-openmpi -lblacs-openmpi
#SCALAPACK = -lscalapack-openmpi $(BLACS)

#MKL ScaLAPACK fails completely in complex version
#MKLPATH = /auto/opt/intel/mkl/lib/intel64
#LAPACKLIB = -Wl,--start-group $(MKLPATH)/libmkl_gf_lp64.a $(MKLPATH)/libmkl_sequential.a \
$(MKLPATH)/libmkl_core.a $(MKLPATH)/libmkl_blacs_openmpi_lp64.a -Wl,--end-group -lpthread
#SCALAPACKLIB = $(MKLPATH)/libmkl_scalapack_lp64.a

#need to export MPIEXEC=/usr/bin/mpirun if this is not default in `which mpiexec`
TESTSCRIPT = make check-parallel
.....................................................................................................................................................................................................................
Could you plase help me to fix this problem.
I am waiting for your help.
Thanking you.

Sincerely
Barnali

Submitted by utpallab on Wed, 10/22/2014 - 00:55

Dear user,
I have libfftw.a in the fftw-2.1.5, and i have already changed my arch.mk with
........................................................................................................................
FFTWLIB = /home/Utpal/Quantum_espresso/fftw-2.1.5/fftw/libfftw.a
..........................................................................................................................
but same error appear. I have already installed berkeleyGW in another machine having ubuntu as operating system without any problem. But in case of redhat linux I met trouble. Could anyone please guide me?

Sincerely
barnali

dstrubbe's picture

Submitted by dstrubbe on Wed, 10/22/2014 - 10:21

It seems quite unlikely that you got the same error after changing .la to .a. Please check again, and if you get an error put the same kind of info you had in your original post, namely the exact error message and the lines above it.

bmirand's picture

Submitted by bmirand on Thu, 02/02/2017 - 08:19

Hi,
I'm trying to compile Berkeley GW ( 1.0.6), on a CentOS linux ver. 6.8 system ( just the serial GNU linux version) w/ GNU gfortran 4.4.7.
I've tried "tweaking" the compiler options but keep getting undefined reference errors, no matter what I do.
I tried using the "-fno-leading-underscore", "-fno-trailing-underscore" and "-fno-second-underscore" but keep getting the following errors,
fortran -O3 -o epsilon.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/global.o ../Common/typedefs.o ../Common/nrtype.o ../Common/push_pop.o ../Common/message.o ../Common/peinfo.o ../Common/timing.o ../Common/system.o rqstar.o input.o input_q.o inread.o genwf_disk.o genwf_mpi.o mtxel.o epsinv.o mtxelmultiply.o extrapolar.o epsilon_main.o -L/usr/lib64 -lfftw -L/usr/lib64/atlas -L/usr/lib64/atlas/liblapack.so.3 -L/usr/lib64/atlas/libblas.so.3
../Common/misc.o: In function `__misc_m_MOD_checknorm':
misc.p.f:(.text+0x248): undefined reference to `dnrm2_'
../Common/inversion.o: In function `__inversion_m_MOD_dinvert_serial':
inversion.p.f:(.text+0x2e2): undefined reference to `dgesv_'
../Common/inversion.o: In function `__inversion_m_MOD_zinvert_serial':
inversion.p.f:(.text+0xa25): undefined reference to `zgesv_'
../Common/fftw.o: In function `__fftw_m_MOD_destroy_fftw_plans':
fftw.p.f:(.text+0x569): undefined reference to `fftwnd_f77_destroy_plan__'
fftw.p.f:(.text+0x573): undefined reference to `fftwnd_f77_destroy_plan__'
../Common/fftw.o: In function `__fftw_m_MOD_do_fft':
fftw.p.f:(.text+0x840): undefined reference to `fftwnd_f77_one__'
fftw.p.f:(.text+0x918): undefined reference to `fftwnd_f77_one__'
fftw.p.f:(.text+0xa77): undefined reference to `fftwnd_f77_create_plan__'
fftw.p.f:(.text+0xa94): undefined reference to `fftwnd_f77_create_plan__'
../Common/fft_parallel.o: In function `__fft_parallel_m_MOD_fft_r2g_s':
fft_parallel.p.f:(.text+0xf6d): undefined reference to `fftwnd_f77_one__'
../Common/fft_parallel.o: In function `__fft_parallel_m_MOD_fft_r2g_p':
fft_parallel.p.f:(.text+0x13db): undefined reference to `fftwnd_f77_one__'
fft_parallel.p.f:(.text+0x18d0): undefined reference to `fftwnd_f77_one__'
../Common/fft_parallel.o: In function `__fft_parallel_m_MOD_fft_g2r_s':
fft_parallel.p.f:(.text+0x1da1): undefined reference to `fftwnd_f77_one__'
../Common/fft_parallel.o: In function `__fft_parallel_m_MOD_fft_g2r_p':
fft_parallel.p.f:(.text+0x21d8): undefined reference to `fftwnd_f77_one__'
../Common/fft_parallel.o:fft_parallel.p.f:(.text+0x2732): more undefined references to `fftwnd_f77_one__' follow
../Common/trunc_cell_wire.o: In function `trunc_cell_wire__':
trunc_cell_wire.p.f:(.text+0x64f): undefined reference to `fftwnd_f77_create_plan__'
trunc_cell_wire.p.f:(.text+0x77a): undefined reference to `fftwnd_f77_destroy_plan__'
trunc_cell_wire.p.f:(.text+0x15a2): undefined reference to `fftwnd_f77_one__'
../Common/trunc_cell_box.o: In function `trunc_cell_box__':
trunc_cell_box.p.f:(.text+0x6d2): undefined reference to `fftwnd_f77_create_plan__'
trunc_cell_box.p.f:(.text+0x1308): undefined reference to `fftwnd_f77_one__'
trunc_cell_box.p.f:(.text+0x177e): undefined reference to `fftwnd_f77_destroy_plan__'
../Common/trunc_cell_box_d.o: In function `trunc_cell_box_d__':
trunc_cell_box_d.p.f:(.text+0x8ff): undefined reference to `fftwnd_f77_create_plan__'
trunc_cell_box_d.p.f:(.text+0x921): undefined reference to `fftwnd_f77_create_plan__'
trunc_cell_box_d.p.f:(.text+0x15db): undefined reference to `fftwnd_f77_one__'
trunc_cell_box_d.p.f:(.text+0x1b45): undefined reference to `fftwnd_f77_one__'
trunc_cell_box_d.p.f:(.text+0x1c55): undefined reference to `fftwnd_f77_destroy_plan__'
trunc_cell_box_d.p.f:(.text+0x1c62): undefined reference to `fftwnd_f77_destroy_plan__'
../Common/trunc_scell_box_d.o: In function `trunc_scell_box_d__':
trunc_scell_box_d.p.f:(.text+0xd5d): undefined reference to `fftwnd_f77_destroy_plan__'
trunc_scell_box_d.p.f:(.text+0xd6a): undefined reference to `fftwnd_f77_destroy_plan__'
trunc_scell_box_d.p.f:(.text+0x12c6): undefined reference to `fftwnd_f77_create_plan__'
trunc_scell_box_d.p.f:(.text+0x12e8): undefined reference to `fftwnd_f77_create_plan__'
trunc_scell_box_d.p.f:(.text+0x1fb2): undefined reference to `fftwnd_f77_one__'
trunc_scell_box_d.p.f:(.text+0x250a): undefined reference to `fftwnd_f77_one__'
genwf_mpi.o: In function `genwf_mpi__':
genwf_mpi.p.f:(.text+0x1037): undefined reference to `dgemm_'
genwf_mpi.p.f:(.text+0x366c): undefined reference to `dgemm_'
mtxelmultiply.o: In function `__mtxelmultiply_m_MOD_mtxelmultiply':
mtxelmultiply.p.f:(.text+0xd78): undefined reference to `dgemm_'
epsilon_main.o: In function `MAIN__':
epsilon_main.p.f:(.text+0xc6dd): undefined reference to `dgemm_'
epsilon_main.p.f:(.text+0xd0c1): undefined reference to `zgemm_'
epsilon_main.p.f:(.text+0x143a8): undefined reference to `zgemm_'
collect2: ld returned 1 exit status
make[1]: *** [epsilon.real.x] Error 1
make[1]: Leaving directory `/blackelk1/software/BerkeleyGW-1.0.6/Epsilon'
make: *** [epsilon-all] Error 2
----------------------
here is the arch.mk file I'm using,
------------------------------------------------
# arch.mk for BerkeleyGW codes
#
# Suitable for Generic single processor linux
# Tested on netbook running Ubuntu 10.04. You will need to have yum
# or apt-get installed liblapack-dev, fftw-dev, gfortran, g++ packages
#
# J. Deslippe
# Jun, 2008, UCB

# Precompiler options
#
COMPFLAG = -DGNU
MATHFLAG =
DEBUGFLAG = -DDEBUG -DVERBOSE

FCPP = cpp -ansi
F90free = gfortran -ffree-form -ffree-line-length-none -ff2c -fno-leading-underscore -fsecond-underscore
F77 = /usr/bin/g77
LINK = gfortran
FOPTS = -O3
FNOOPTS = $(FOPTS)
MOD_OPT = -J
INCFLAG = -I

CC_COMP = g++
C_COMP = gcc
C_LINK = g++
C_OPTS = -O3

REMOVE = /bin/rm -f

# Math Libraries
#
###FFTWLIB = -L/usr/lib/ -lfftw
FFTWLIB = -L/usr/lib64 -lfftw
###FFTWINCLUDE = /usr/share/doc/fftw-dev/fortran
FFTWINCLUDE = -I/usr/include -I/usr/local/intel/compilers_and_libraries_2016.2.181/linux/mkl/include/fftw
###LAPACKLIB = -L/usr/lib/ -llapack -lblas
##LAPACKLIB = -L/usr/lib64 -L/usr/lib64/liblapack.so.3 -L/usr/lib64/libblas.so.3 ## -llapack -lblas
LAPACKLIB = -L/usr/lib64/atlas -L/usr/lib64/atlas/liblapack.so.3 -L/usr/lib64/atlas/libblas.so.3 ## -lla
pack -lblas
---------------------------------------------------------------------------------

Can someone assist here?
I am not using the latest version because the system does not have the latest fftw and various other needed libs, to compile it.
Thanks,
Brian Mirand
SUNY at Buffalo Eng.