Compiler detection

Moderator: pouillon

Post Reply
Jordan
Posts: 282
Joined: Tue May 07, 2013 9:47 am

Compiler detection

Post by Jordan » Thu Aug 21, 2014 7:39 pm

Hi,

On NERSC Hopper supercomputer, they ask to use a wrapper "ftn" as for a fortran compiler, no matter the compiler we use (intel,gcc,cray).
But when typing

Code: Select all

ftn -V
ftn --version

return a first line that is useless and then the compiler vendor/version.

The problem is that in the configure script (or more precisely m4/lang-fortran.m4) the detection of the compiler is done using

Code: Select all

$1 -V | head -n 1

which will fail for all compiler since the first line is not related to the compiler.

I could bypass this behavior for my cas (Intel) modifying the line with

Code: Select all

sed -n "2p"

which worked.
Abinit now detects "intel 13.1" instead of "generic 0.0".

This issue caused the compilation line not to use the option "-module" which messed up the module compilation and crashed at the very beginning.

Maybe the "head -n 1" should be replaced by a grep line the next line ?

Anyways, I had the problem and solved it myself but I wanted to report it here for any other user in the same situation.

Cheers

Jordan

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: Compiler detection

Post by pouillon » Tue Aug 26, 2014 12:06 pm

For unusual configurations, you can use the --with-fc-vendor and --with-fc-version options of configure, in order to bypass the build-system detection process.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

Post Reply