Skip to content

fpm new foo && cd foo && fpm build --compiler ftn fails when ftn invokes the Cray compiler #767

@rouson

Description

@rouson

Description

On HPE Cray systems, all compilers are invoked via the ftn compiler wrapper. I'm attempting to use fpm on the NERSC Cori system after loading the environment module Pro-Env/cray, which sets the ftn wrapper to invoke the Cray Fortran compiler.

> ftn -V
Cray Fortran : Version 13.0.1  Sun Oct 02, 2022  21:27:30
> fpm new foo && cd foo && fpm build --compiler ftn 
 + mkdir -p foo
 + cd foo
 + mkdir -p foo/src
 + mkdir -p foo/app
 + mkdir -p foo/test
 + git config --get user.name > /tmp/fileHLjPW1
 + git config --get user.email > /tmp/file0ld7Hg
 + git config --get user.name > /tmp/fileVdkBuv
 + git init foo
Initialized empty Git repository in /global/u1/r/rouson/foo/.git/
 + mkdir -p build/dependencies
<WARN> Unknown compiler ftn requested! Defaults for this compiler might be incorrect
foo.f90                                failed.
[ 25%] Compiling...
ftn-78 crayftn: ERROR in command line
  The -m option has an invalid argument, "odule".
<ERROR> Compilation failed for object " src_foo.f90.o "
<ERROR>stopping due to failed compilation
STOP 1

Expected Behaviour

I expect fpm build --compiler ftn to succeed in a project created by fpm new on a HPE Cray system.

Version of fpm

0.6.0

Platform and Architecture

Linux

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfurther-info-neededFurther information is requested to move forward

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions