Page 1 of 1

compile error of v3.2.2-rev.5

Posted: Thu Oct 07, 2010 11:34 am
by sdwang
I compile yambo-3.2.2-rev.5 in my linux clusters with: ./configure --with-iotk=/home/sdwang/espresso-4.1.2/iotk/ --with-p2y=4.0 --with-mpi=yes FC=mpif90, it works well and apperas:
[VER] 3.2.2 r.633
#
# [SYS] linux@x86_64
# [SRC] /home/sdwang/yambo-3.2.2-rev.5
# [BIN] /home/sdwang/yambo-3.2.2-rev.5/bin
# [FFT] Goedecker Fast Fourier transform with 0 cache
#
# [ ] Double precision
# [X] Redundant compilation
# [X] MPI
# [X] PW (4.0) support
# [ ] ETSF I/O support
# [ ] SCALAPACK
# [ ] LibXC
# [ ] NETCDF/Large Files
# [XX ] Built-in BLAS/LAPACK/LOCAL
#
# [ CPP ] gcc -E -P
# [ C ] gcc -g -O2 -D_C_US -D_FORTRAN_US
# [MPICC] mpicc -g -O2 -D_C_US -D_FORTRAN_US
# [ F90 ] mpif90 -O
# [MPIF ] mpif90 -O
# [ F77 ] mpif90 -O
# [Cmain]
# [NoOpt] -O0
#
# [ MAKE ] make
# [EDITOR] vim


But when I type "make all",the error as following:
>>>[Linking yambo]<<<
make[1]: Entering directory `/home/sdwang/yambo-3.2.2-rev.5/driver'
if test ! -f __lock && test "yes" = "no" ; then find . \( -name '*.o' -o -name '*.mod' -o -name '__*' \) | xargs rm -f ; touch __lock; fi
if test "yes" = "yes"; then "/home/sdwang/yambo-3.2.2-rev.5"/sbin/objects_debug.sh __lock; fi
if test -f /home/sdwang/yambo-3.2.2-rev.5/driver/yambo.h; then gcc -E -P -D_MPI -D_linux /home/sdwang/yambo-3.2.2-rev.5/driver/yambo.h > /home/sdwang/yambo-3.2.2-rev.5/driver/yambo_cpp.h; fi
if test -f /home/sdwang/yambo-3.2.2-rev.5/driver/ypp.h; then gcc -E -P -D_MPI -D_linux /home/sdwang/yambo-3.2.2-rev.5/driver/ypp.h > /home/sdwang/yambo-3.2.2-rev.5/driver/ypp_cpp.h; fi
( eval gcc -g -O2 -D_C_US -D_FORTRAN_US -c /home/sdwang/yambo-3.2.2-rev.5/driver/getopt.c > /dev/null)
if test "yes" = ""; then gcc -g -O2 -D_C_US -D_FORTRAN_US -D_MPI -D_linux -D_yambo -c /home/sdwang/yambo-3.2.2-rev.5/driver/driver.c; fi
if test ! "yes" = ""; then mpicc -g -O2 -D_C_US -D_FORTRAN_US -D_MPI -D_linux -D_yambo -c /home/sdwang/yambo-3.2.2-rev.5/driver/driver.c; fi
rm -f /home/sdwang/yambo-3.2.2-rev.5/driver/yambo_cpp.h /home/sdwang/yambo-3.2.2-rev.5/driver/ypp_cpp.h

(eval mpif90 -O -I /home/sdwang/yambo-3.2.2-rev.5/include -o yambo driver.o getopt.o yambo_driver.o -L/home/sdwang/yambo-3.2.2-rev.5/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 -llapack -lblas -lslatec -lm ) > /dev/null
driver.o(.text+0x4b0): In function `main':
/home/sdwang/yambo-3.2.2-rev.5/driver/driver.c:98: multiple definition of `main'
/usr/local/intel/fce/9.0/lib/for_main.o(.text+0x0): first defined here
ld: Warning: size of symbol `main' changed from 70 in /usr/local/intel/fce/9.0/lib/for_main.o to 2985 in driver.o
/usr/local/intel/fce/9.0/lib/for_main.o(.text+0x2e): In function `main':
: undefined reference to `MAIN__'
make[1]: *** [yambo] Error 1
make[1]: Leaving directory `/home/sdwang/yambo-3.2.2-rev.5/driver'
make: *** [yambo] Error 2

What the error means?

Thanks!

Re: compile error of v3.2.2-rev.5

Posted: Fri Oct 08, 2010 3:07 pm
by myrta gruning
Dear Shudong Wang

Try not to specify the FC. By specifying it the configure script is not recognizing that you are using the intel compiler and not properly setting the [Cmain] (that for fortran should be -nofor_main)
In principle
./configure --with-iotk=/home/sdwang/espresso-4.1.2/iotk/ --with-p2y=4.0

should work, detecting mpi is available, enabling the mpi and setting automatically the correct FC and all the options.

Regards,
Myrta

Re: compile error of v3.2.2-rev.5

Posted: Sat Oct 09, 2010 1:44 am
by sdwang
Dear myrta gruning:
Thanks your reply!
When I type ./configure --with-iotk=/home/sdwang/espresso-4.1.2/iotk/ --with-p2y=4.0, the error is
checking how to get verbose linking output from gfortran... configure: WARNING: compilation failed

checking for Fortran libraries of gfortran...
checking for dummy main to link with Fortran libraries... none
checking for Fortran name-mangling scheme... configure: error: in `/home/sdwang/yambo-3.2.2-rev.5':
configure: error: cannot compile a simple Fortran program
See `config.log' for more details.

But I have installed v-3.2.1 and there is no such error.Why?
S D Wang

Re: compile error of v3.2.2-rev.5

Posted: Mon Oct 11, 2010 5:20 pm
by myrta gruning
sdwang wrote: When I type ./configure --with-iotk=/home/sdwang/espresso-4.1.2/iotk/ --with-p2y=4.0, the error is
checking how to get verbose linking output from gfortran... configure: WARNING: compilation failed
Dear Shudong Wang,

try to add
FC=ifort
if you have also icc installed, specify also
CC=icc
sdwang wrote:
But I have installed v-3.2.1 and there is no such error.Why?
mmhh... I do not know. I will check if something changed in the autoconf.
In the meanwhile specifying FC=ifort should do the work.

Regards,
Myrta