Page 1 of 1

Compilation in Cray system

Posted: Mon Nov 08, 2010 6:06 pm
by hplan
Hi,

I tried to build yambo-3.2.1-r448 in nersc facility with cray system, but failed.
And relevant information is as follows:

checking for Fortran libraries of ftn... -lsci_quadcore -lsma -lmpichf90 -lmpich -lpmi -lrt -L/opt/cray/pmi/1.0-1.0000.7628.10.2.ss/lib64 -L/opt/cray/mpt/4.1.0.1/xt/seastar/mpich2-pgi/lib -L/opt/xt-libsci/10.4.3/pgi/lib -L/opt/cray/mpt/4.1.0.1/xt/sma/lib -L/opt/xt-xcpe/2.2.48B/lib -L/opt/xt-pe/default/lib -L/opt/xt-xcpe/2.2.48B/lib/snos64 -L/opt/xt-pe/default/lib/snos64 -L/opt/cray/xt-sysroot/2.2.20091207/usr/lib64 -L/opt/cray/xt-sysroot/2.2.20091207/lib64 -L/opt/cray/xt-sysroot/2.2.20091207/usr/lib/alps -L/usr/lib/alps -lalpslli -lalpsutil -lportals -lpthread -L/opt/pgi/10.3.0/linux86-64/10.3/lib -L/usr/lib64 -L/usr/lib64/gcc/x86_64-suse-linux/4.1.2 -lpgf90 -lpgf90_rpm1 -lpgf902 -lpgf90rtl -lpgftnrtl -lnspgc -lpgc -lm -lgcc_eh
checking for dummy main to link with Fortran libraries... unknown
configure: error: linking to Fortran libraries from C fails
See `config.log' for more details.

And config.log file is attached.

Thanks.

Cheers,

Haiping

Re: Compilation in Cray system

Posted: Wed Nov 10, 2010 10:46 am
by andrea marini
As far as I can see from the web the ftn compiler is a PGI-based compiler, right ? It is not included in the supported compilers of Yambo. I have added ftn as a PGI-like compiler in the configure attached.

Tru to using it but do not pass to the compiler the precompiler options (-D__PGI etc). The configure should find them itself. Otherwise it can get confused.

Let me know if it works.

Andrea

Re: Compilation in Cray system

Posted: Thu Nov 11, 2010 5:37 pm
by hplan
Thanks, Andrea,

I tried your configure script. But it failed again, almost with the error information.
checking how to get verbose linking output from ftn... -v
checking for Fortran libraries of ftn... -L/opt/cray/pmi/1.0-1.0000.7628.10.2.ss/lib64 -L/opt/cray/mpt/4.1.0.1/xt/seastar/mpich2-pgi/lib -L/opt/xt-libsci/10.4.3/pgi/lib -L/opt/cray/mpt/4.1.0.1/xt/sma/lib -L/opt/xt-xcpe/2.2.48B/lib -L/opt/xt-pe/default/lib -L/opt/xt-xcpe/2.2.48B/lib/snos64 -L/opt/xt-pe/default/lib/snos64 -L/opt/cray/xt-sysroot/2.2.20091207/usr/lib64 -L/opt/cray/xt-sysroot/2.2.20091207/lib64 -L/opt/cray/xt-sysroot/2.2.20091207/usr/lib/alps -L/usr/lib/alps -L/opt/pgi/10.3.0/linux86-64/10.3/lib -L/usr/lib64 -L/usr/lib64/gcc/x86_64-suse-linux/4.1.2 -lsci_quadcore -lsma -lmpichf90 -lmpich -lpmi -lrt -lalpslli -lalpsutil -lportals -lpthread -lpgf90 -lpgf90_rpm1 -lpgf902 -lpgf90rtl -lpgftnrtl -lnspgc -lpgc -lm
checking for dummy main to link with Fortran libraries... unknown
configure: error: in `/global/homes/h/hplan/yambo':
configure: error: linking to Fortran libraries from C fails
I attached config.log file.
Thank you,

Best,

Haiping
andrea marini wrote:As far as I can see from the web the ftn compiler is a PGI-based compiler, right ? It is not included in the supported compilers of Yambo. I have added ftn as a PGI-like compiler in the configure attached.

Tru to using it but do not pass to the compiler the precompiler options (-D__PGI etc). The configure should find them itself. Otherwise it can get confused.

Let me know if it works.

Andrea

Re: Compilation in Cray system

Posted: Fri Nov 12, 2010 2:30 pm
by andrea marini
The problem is that the configure cannot find the correct options to pass to the C/Fortran compilers to link a C main with fortran libraries. This has nothing to do with Yambo. We can code in the configure the correct options only once we know them.

So, you should ask to the administrator (or any other expert) of the machine what are the options to be passed to the C compiler and to the Fortran compiler to link a C main against a Fortran library.

The best we can do is to provide you a simple test (1 C+1 Fortran routine) to be compiled in order to find the correct options. We are working on it.

Andrea

Re: Compilation in Cray system

Posted: Sat Nov 13, 2010 7:20 pm
by hplan
thank you, Andrea.
I will consult system support for more detail.

Thank you again for help.

Best.

Haiping

Re: Compilation in Cray system

Posted: Tue Nov 23, 2010 4:12 am
by hplan
Hi, Andrea,

The technique support suggested me to make symbolic link for 'ftn' by 'mpif90'. After this setting, the configure script can recognize the parallel environment.
The compilation seems fine. I will report whether it works or not.

Thank you.

Best,

Haiping

Re: Compilation in Cray system

Posted: Tue Nov 23, 2010 1:08 pm
by Conor Hogan
Great! Let us know if it works out.

Re: Compilation in Cray system

Posted: Thu Apr 18, 2013 11:18 pm
by arlonne
hplan wrote:
The technique support suggested me to make symbolic link for 'ftn' by 'mpif90'. After this setting, the configure script can recognize the parallel environment.
The compilation seems fine. I will report whether it works or not.
I have the same problem on cray machines. what's the meaning of replace symbolic link of 'ftn' by 'mpif90'? does it look like LD=mpif90?
can you show me your successful configure command?

Thank you,
longhua

Re: Compilation in Cray system

Posted: Wed Apr 24, 2013 10:25 am
by myrta gruning
Hallo

no it means you have to use the
ln -s TARGET LINK_NAME
It is a shell command, TARGET is the existing file, link_name is the 'fake' name you want to give to it just to trick the configure script.

m

Re: Compilation in Cray system

Posted: Sat May 18, 2013 6:26 pm
by matdisor
Here is what I did.

1. Cray use wrapper ftn. What you need to do is to modify configure file by adding ftn to the end of lines begining with

Code: Select all

for ac_prog in
For example:
for ac_prog in mpif90 mpxlf90 mpxlf mpf90 mpxlf95 mpxlf_r ftn
2. If you want to use libsci, you should also modify configure file so that it bypass checking lapackm blas, scalapack (enable all, but do not compile lapack blas).
And configure your yambo with the floowing options:

Code: Select all

--with-blas="" --with-lapack="" --with-scalapack=""