Problem with configure script and compiler drivers

Having trouble compiling the Yambo source? Using an unusual architecture? Problems with the "configure" script? Problems in GPU architectures? This is the place to look.

Moderators: Davide Sangalli, andrea.ferretti, myrta gruning, andrea marini, Daniele Varsano, Conor Hogan, Nicola Spallanzani

Forum rules
If you have trouble compiling Yambo, please make sure to list:
(1) the compiler (vendor and release: e.g. intel 10.1)
(2) the architecture (e.g. 64-bit IBM SP5)
(3) if the problems occur compiling in serial/in parallel
(4) the version of Yambo (revision number/major release version)
(5) the relevant compiler error message
User avatar
andrea marini
Posts: 325
Joined: Mon Mar 16, 2009 4:27 pm
Contact:

Re: Problem with configure script and compiler drivers

Post by andrea marini » Fri Mar 21, 2014 12:03 pm

FC is the serial F90 compiler, PFC is the parallel one. F77 is the serial used for fortan 77 sources.
Andrea MARINI
Istituto di Struttura della Materia, CNR, (Italy)

leoteo
Posts: 30
Joined: Tue Apr 09, 2013 5:40 pm

Re: Problem with configure script and compiler drivers

Post by leoteo » Fri Mar 21, 2014 12:06 pm

Dear Andrea and Myrta,

thank you so much for your hints! I didn't realize that by FCFLAGS= I was inviting the configure to guess it.
So, apart from the solution in my second post, another possibility would be to specify some (non-empty) dummy FCFLAGS that do nothing but prevent the configure from guessing. The actual compilation using the compiler driver scripts would then anyhow use the options set by the compiler driver.

I have tried this and it seems to work in some cases, but there are still some strange things that I haven't figured out yet. Once they are figured out, I will post the script that I used.

Best regards,
Leopold
Leopold Talirz
Swiss Federal Laboratories for Materials Science and Technology, Dübendorf, Switzerland
http://www.surfaces.ch

leoteo
Posts: 30
Joined: Tue Apr 09, 2013 5:40 pm

Re: Problem with configure script and compiler drivers

Post by leoteo » Fri Mar 21, 2014 1:47 pm

Hi again,

so this is the script I came up with for using the compiler wrapper scripts directly

Code: Select all

#!/bin/bash
module load PrgEnv-intel fftw

export CC=cc
export CFLAGS='-g -O2 -static'

export FC=ftn
export FCFLAGS='-assume bscc -O3 -ip -static'
export UFLAGS=' -assume bscc -O0 -static'

export CPP='cc -E'
export CPPFLAGS='-ansi'

MKL="-Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${MKLROOT}/lib/intel64/libmkl_core.a ${MKLROOT}/lib/intel64/libmkl_sequential.a -Wl,--end-group -lpthread -lm"

./configure \
--with-blas="$MKL" \
--with-lapack="$MKL" \
--with-blacs="${MKLROOT}/lib/intel64/libmkl_blacs_intelmpi_lp64.a" \
--with-scalapack="${MKLROOT}/lib/intel64/libmkl_scalapack_lp64.a " \
--with-fftw="${MKLROOT}/interfaces/fftw3xf/" \
--with-fftw-lib="$MKL" \
--with-iotk="/project/s148/tal/espresso-5.0.3-rosa/iotk" \
 --with-p2y="5.0.3"
which produces the summary

Code: Select all

#
# [VER] 3.4.1 r.3187
#
# [SYS] linux@x86_64
# [SRC] /project/s148/tal/yambo/devel
# [BIN] /project/s148/tal/yambo/devel/bin
# [FFT] External Fast Fourier transform
#
# [ ] Double precision
# [X] Redundant compilation
# [X] MPI
# [ ] OpenMP
# [X] PW (5.0) support
# [ ] ETSF I/O support
# [X] SCALAPACK
# [   ] NETCDF/HDF5/Large Files
# [  X] Built-in BLAS/LAPACK/LOCAL
#
# [ CPP ] cc -E -ansi
# [  C  ] cc -g -O2 -static -D_C_US -D_FORTRAN_US
# [MPICC] cc -g -O2 -static -D_C_US -D_FORTRAN_US
# [ F90 ] ftn -assume bscc -O3 -ip -static
# [MPIF ] ftn -assume bscc -O3 -ip -static
# [ F77 ] ftn -assume bscc -O3 -ip -static
# [Cmain] -Mnomain
# [NoOpt]  -assume bscc -O0 -static
#
# [ MAKE ] make
# [EDITOR] vim
#

In the end, however, I have to say that I liked the solution from my second post better, since it was also using the compiler drivers, but at the same time allowed yambo to do its guessing on what would be good options for the Intel compiler (which I basically copied now).
So, below is the script I used previously together with the ifort/icc scripts described in the second post.

Code: Select all

module load PrgEnv-intel fftw

export FC='/project/s148/tal/yambo/devel/ifort'
export CC='/project/s148/tal/yambo/devel/icc'
export CPP='/project/s148/tal/yambo/devel/icc -E'

MKL="-Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${MKLROOT}/lib/intel64/libmkl_core.a ${MKLROOT}/lib/intel64/libmkl_sequential.a -Wl,--end-group -lpthread -lm"

./configure \
--with-blas="$MKL" \
--with-lapack="$MKL" \
--with-blacs="${MKLROOT}/lib/intel64/libmkl_blacs_intelmpi_lp64.a" \
--with-scalapack="${MKLROOT}/lib/intel64/libmkl_scalapack_lp64.a " \
--with-fftw="${MKLROOT}/interfaces/fftw3xf/" \
--with-fftw-lib="$MKL" \
--with-iotk="/project/s148/tal/espresso-5.0.3-rosa/iotk" \
 --with-p2y="5.0.3"
And just for reference, when I call ftn, this is what actually happens:

Code: Select all

/apps/rosa/intel/13.1.0/bin/intel64/ifort -msse3 -L/opt/cray/udreg/2.3.1-1.0400.4264.3.1.gem/lib64 -L/opt/cray/ugni/2.3-1.0400.4374.4.88.gem/lib64 -L/opt/cray/pmi/4.0.0-1.0000.9282.69.4.gem/lib64 -L/opt/cray/dmapp/3.2.1-1.0400.4255.2.159.gem/lib64 -L/opt/cray/xpmem/0.1-2.0400.31280.3.1.gem/lib64 -Wl,-L/opt/cray/atp/1.6.0/lib/ -Wl,--undefined=_ATP_Data_Globals -Wl,--undefined=__atpHandlerInstall -Wl,-lAtpSigHCommData -Wl,-lAtpSigHandler -I/opt/cray/udreg/2.3.1-1.0400.4264.3.1.gem/include -I/opt/cray/ugni/2.3-1.0400.4374.4.88.gem/include -I/opt/cray/pmi/4.0.0-1.0000.9282.69.4.gem/include -I/opt/cray/dmapp/3.2.1-1.0400.4255.2.159.gem/include -I/opt/cray/gni-headers/2.1-1.0400.4351.3.1.gem/include -I/opt/cray/xpmem/0.1-2.0400.31280.3.1.gem/include -D__CRAYXE -D__CRAYXT_COMPUTE_LINUX_TARGET -D__TARGET_LINUX__ -I/opt/cray/mpt/5.6.0/gni/mpich2-/include -I/opt/cray/libsci/12.0.00//120/interlagos/include -I/opt/fftw/3.3.0.1/interlagos/include -I/usr/include/alps -L/opt/cray/mpt/5.6.0/gni/mpich2-/lib -Wl,-rpath=/opt/cray/mpt/5.6.0/gni/mpich2-/lib -L/opt/cray/libsci/12.0.00//120/interlagos/lib -L/opt/fftw/3.3.0.1/interlagos/lib -L/usr/lib/alps -Wl,--start-group -lscicpp_intel -lsci_intel_mp -lstdc++ -lfftw3_mpi -lfftw3f_mpi -lfftw3_threads -lfftw3f_threads -lfftw3 -lfftw3f -lmpichf90 -lmpich -lpmi -lalpslli -lalpsutil -lpthread -limf -lifport -lifcore -lm -Wl,--end-group -liomp5 -lpthread

Best,
Leopold

P.S. Thank you again Myrta for providing your settings using the gnu compiler together with CRAY's libsci. I will test this as well and compare performance.
Leopold Talirz
Swiss Federal Laboratories for Materials Science and Technology, Dübendorf, Switzerland
http://www.surfaces.ch

huebener
Posts: 1
Joined: Thu Oct 25, 2012 2:35 pm

Re: Problem with configure script and compiler drivers

Post by huebener » Thu Jun 12, 2014 5:19 pm

Just for future reference: I used the first script in the last post by Leopold to compile yambo on the ARCHER supercomputer (CRAY XC30). It worked basically fine, but I had to make a small tweak that could probably be avoided and might very well be due to my impatience/stupidity: The compiler (/opt/intel/composer_xe_2013_sp1.1.106/bin/intel64/ifort) did not recognize the option -Mnomain. So I changed in the configure script all the lines containing

FCMFLAG="-Mnomain"

to

FCMFLAG="-nofor_main"

I am sure there is a more elegant way, but this worked.

Cheers,
Hannes

User avatar
Daniele Varsano
Posts: 4198
Joined: Tue Mar 17, 2009 2:23 pm
Contact:

Re: Problem with configure script and compiler drivers

Post by Daniele Varsano » Thu Jun 12, 2014 10:47 pm

Dear Hannes,
many thanks.

Daniele
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/

Post Reply