Page 1 of 1

Error in compilation on a MacPro with ifort+openmpi

Posted: Mon Jan 16, 2012 12:27 pm
by fabri
Dear all,
I am tryng to compile the latest version of yambo with openmpi+intel (version 11.1) compilers, on a MacPro with a Quad-Core Intel Xeon processor.
My successful configure run has been set as:

./configure --enable-msgs-comps --with-fftw='/usr/local/lib/' --with-iotk='../espresso-4.3.1/iotk' --with-p2y=4.0 --with-etsf-io-include='/opt/etsf/include/' --with-etsf-io-lib='/opt/etsf/lib/' FC=mpif90 FCFLAGS='-O3 -nofor_main' CC=icc CPP='icc -E -ansi' --enable-netcdf-LFS --with-libxc-lib='/opt/etsf/lib/' --with-libxc-include='/opt/etsf/include/' --with-blas='-L/opt/intel/Compiler/11.1/091/Frameworks/mkl/lib/em64t /opt/intel/Compiler/11.1/091/Frameworks/mkl/lib/em64t/libmkl_solver_lp64_sequential.a -Wl, -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -Wl, -lpthread' --with-lapack='-L/opt/intel/Compiler/11.1/091/Frameworks/mkl/lib/em64t /opt/intel/Compiler/11.1/091/Frameworks/mkl/lib/em64t/libmkl_solver_lp64_sequential.a -Wl, -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -Wl, -lpthread'


but after a 'make all' I get the following error:
(eval mpif90 -O3 -nofor_main -I /Users/fabri/yambo-latest/include -o yambo driver.o getopt.o yambo_driver.o -L/Users/fabri/yambo-latest/lib -L/usr/local/lib/ -lbse -lqp -lpol_function -ltddft -linterface -lsetup -lqp_ctl -lbz_ops -lcoulomb -lwf_and_fft -lio -lcommon -lcommunicate -lparser -lxc_functionals -lmodules -lexternal_c -L/opt/intel/Compiler/11.1/091/Frameworks/mkl/lib/em64t /opt/intel/Compiler/11.1/091/Frameworks/mkl/lib/em64t/libmkl_solver_lp64_sequential.a -Wl, -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -Wl, -lpthread -L/opt/intel/Compiler/11.1/091/Frameworks/mkl/lib/em64t /opt/intel/Compiler/11.1/091/Frameworks/mkl/lib/em64t/libmkl_solver_lp64_sequential.a -Wl, -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -Wl, -lpthread -lxc -lslatec -lfftw3 -lm ) > /dev/null
Undefined symbols:
"_drivers_mp_list_dbs_", referenced from:
_init_ in libinterface.a(init.o)
_init_ in libinterface.a(init.o)
_std_presets_ in libmodules.a(std_presets.o)
[....]
"_drivers_mp_l_kerr_", referenced from:
_std_presets_ in libmodules.a(std_presets.o)
"_drivers_mp_l_setup_", referenced from:
_init_ in libinterface.a(init.o)
_init_ in libinterface.a(init.o)
_init_IP_logicalson_ in libinterface.a(init.o)
_std_presets_ in libmodules.a(std_presets.o)
ld: symbol(s) not found
make[1]: *** [yambo] Error 1
make: *** [yambo] Error 2
( the complete error list of undefined subroutines is reported in the text file attached below)

any suggestion?
--

Dr. Fabrizio Gala
Dipartimento di Scienze di Base e Applicate per l'Ingegneria,
Sezione di Fisica.
La Sapienza,University of Rome
and
Consorzio Nazionale Interuniversitario per le Scienze Fisiche della Materia (CNISM)

via A. Scarpa 14-16
00161 Rome - ITALY

Re: Error in compilation on a MacPro with ifort+openmpi

Posted: Tue Jan 17, 2012 11:40 am
by myrta gruning
Hallo

it seems there are problems with the underscore conventions.
What I can suggest (no guarantee it will work) is to do a make clean_all and try to configure again not specifying the FCFLAGS and setting FC=ifort

If you still are unable to compile, attach as well the config/setup file.

Best,
Myrta

Re: Error in compilation on a MacPro with ifort+openmpi

Posted: Tue Jan 17, 2012 2:37 pm
by fabri
hi,
as you told me i tried with:

./configure --enable-msgs-comps --with-fftw='/usr/local/lib/' --with-iotk='../espresso-4.3.1/iotk' --with-p2y=4.0 --with-etsf-io-include='/opt/etsf/include/' --with-etsf-io-lib='/opt/etsf/lib/' FC=ifort CC=icc CPP='icc -E -ansi' --enable-netcdf-LFS --with-libxc-lib='/opt/etsf/lib/' --with-libxc-include='/opt/etsf/include/' --with-blas='-L/opt/intel/Compiler/11.1/091/Frameworks/mkl/lib/em64t /opt/intel/Compiler/11.1/091/Frameworks/mkl/lib/em64t/libmkl_solver_lp64_sequential.a -Wl, -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -Wl, -lpthread' --with-lapack='-L/opt/intel/Compiler/11.1/091/Frameworks/mkl/lib/em64t /opt/intel/Compiler/11.1/091/Frameworks/mkl/lib/em64t/libmkl_solver_lp64_sequential.a -Wl, -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -Wl, -lpthread'

but it doesn't work, and the error is still the same..(in the file attached you can find both the config.log and the setup file )

actually when i look at the symbol tables in one of the lib files, in order to check out the subroutines the code doesn't menage to find, i have for the 'drivers_mp_list_dbs' subroutine:
~/$ nm lib/libinterface.a | grep _drivers_mp_list_dbs_
U _drivers_mp_list_dbs_
so it seems the the routines are unresolved, how can it happens?


Dr. Fabrizio Gala
Dipartimento di Scienze di Base e Applicate per l'Ingegneria,
Sezione di Fisica.
La Sapienza,University of Rome
and
Consorzio Nazionale Interuniversitario per le Scienze Fisiche della Materia (CNISM)

via A. Scarpa 14-16
00161 Rome - ITALY

Re: Error in compilation on a MacPro with ifort+openmpi

Posted: Tue Jan 17, 2012 3:09 pm
by myrta gruning
Hallo Fabrizio

The fact that the symbol is undefined in the .a is normal. Only at linking time it will be checked if the symbol is defined (somewhere in one of the other libraries).
I think there is some inconcistency that cause a difference in the underscores somehow.
For example are you sure that the mpif90 used (yambo finds /usr/local/bin/mpif90) is the one corresponding to the fortran compiler (/opt/intel/Compiler/11.1/091/)?
Try to specify the MPI library path (in principle you can put it also to "no" to verify if yambo compiles in serial)
Remember to make clean_all each time.

Best,
m

Re: Error in compilation on a MacPro with ifort+openmpi

Posted: Tue Jan 17, 2012 4:38 pm
by fabri
i tried to re-compile in serial with ifort+icc but the error is unvaried.
( that's really strange as the same configure/setup with the same compiler version number, works without any problem on my linux workstation..)

thank you very much
fabrizio

Re: Error in compilation on a MacPro with ifort+openmpi

Posted: Tue Jan 17, 2012 4:41 pm
by andrea marini
fabri wrote: ( that's really strange as the same configure/setup with the same compiler version number, works without any problem on my linux workstation..)
Mac users ... please help.

Re: Error in compilation on a MacPro with ifort+openmpi

Posted: Tue Jan 17, 2012 4:49 pm
by Daniele Varsano
Dear Fabrizio,
I compiled Yambo on mac with intel compilers and mkl years ago, what I remember
in order to link is to set AR=xiar and next I had to go in libs directory and type
ranlib -c *.a explicitely, and finally the make in the driver directory.
Surely there is a better way to do that.

Daniele

Re: Error in compilation on a MacPro with ifort+openmpi

Posted: Tue Jan 17, 2012 6:22 pm
by fabri
ok guys,
Daniele's trick works very well for the main program (yambo), a2y and ypp, however when i try to compile p2y i get the following error:
[...]
eval icc -E -ansi -ansi -D_MPI -D_FFTW -D_P2Y_V40 -D_apple qexml_v4.0.F > qexml_v4.0.f90) > /dev/null
(mpif90 -c -O3 -nofor_main -I /Users/fabri/yambo-latest/include -I/Users/fabri/yambo-latest/include -I../espresso-4.3.1/iotk/src qexml_v4.0.f90) > /dev/null
qexml_v4.0.F(28): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [IOTK_MODULE]
USE iotk_module
------^
[.....]


eve if i have the libiotk.a file in the lib directory..

(my conf string was:

./configure --enable-msgs-comps --with-fftw=/usr/local/lib/ --with-iotk=../espresso-4.3.1/iotk --with-p2y=4.0 AR=xiar-2011.184 FC=mpif90 FCFLAGS=-O3 -nofor_main CC=icc CPP=icc -E -ansi --with-blas=-L/opt/intel/Compiler/11.1/091/Frameworks/mkl/lib/em64t /opt/intel/Compiler/11.1/091/Frameworks/mkl/lib/em64t/libmkl_solver_lp64_sequential.a -Wl, -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -Wl, -lpthread --with-lapack=-L/opt/intel/Compiler/11.1/091/Frameworks/mkl/lib/em64t /opt/intel/Compiler/11.1/091/Frameworks/mkl/lib/em64t/libmkl_solver_lp64_sequential.a -Wl, -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -Wl, -lpthread )


Dr. Fabrizio Gala
Dipartimento di Scienze di Base e Applicate per l'Ingegneria,
Sezione di Fisica.
La Sapienza,University of Rome
and
Consorzio Nazionale Interuniversitario per le Scienze Fisiche della Materia (CNISM)

via A. Scarpa 14-16
00161 Rome - ITALY

Re: Error in compilation on a MacPro with ifort+openmpi

Posted: Tue Jan 17, 2012 6:39 pm
by fabri
solved..
the espresso directory '-I../espresso-4.3.1/iotk/src ' was incorrect..

thank you so much to everybody.
best regards

Dr. Fabrizio Gala
Dipartimento di Scienze di Base e Applicate per l'Ingegneria,
Sezione di Fisica.
La Sapienza,University of Rome
and
Consorzio Nazionale Interuniversitario per le Scienze Fisiche della Materia (CNISM)

via A. Scarpa 14-16
00161 Rome - ITALY