Errors compiling roms on Cray cluster

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
LeaF_7
Posts: 21
Joined: Tue Aug 12, 2014 8:32 pm
Location: Institute of Marine Research

Errors compiling roms on Cray cluster

#1 Unread post by LeaF_7 »

Hi,
I am trying to compile Roms on a cray cluster, but it gives the error message as follows. While I am not a very skilled cluster user.

Can anyone tells me what the problem is?

Thanks a lot!

Fan

Code: Select all

cd /work/fanlin/roms_kate_ser/Apps/YellowSea/Build; /opt/cray/craype/2.4.2/bin/ftn -c  -O3 -Mfree mod_iounits.f90
ftn-78 crayftn: ERROR in command line
  The -M option has an invalid argument, "free".
make: *** [/work/fanlin/roms_kate_ser/Apps/YellowSea/Build/mod_iounits.o] Error 1

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Errors compiling roms on Cray cluster

#2 Unread post by kate »

On the Cray, there may be more than one available compiler, but they will all be called "ftn". Do you know which one you are using? Can you show "module list"? On our system, check out the "PrgEnv" module - I have PrgEnv-intel/4.2.34 currently loaded.

Code: Select all

fish2 1140% module avail PrgEnv

------------------------------- /opt/modulefiles -------------------------------
PrgEnv-cray/4.0.46           PrgEnv-intel/4.0.46
PrgEnv-cray/4.2.34(default)  PrgEnv-intel/4.2.34(default)
PrgEnv-gnu/4.0.46            PrgEnv-pgi/4.0.46
PrgEnv-gnu/4.2.34(default)   PrgEnv-pgi/4.2.34(default)
You can have any one of these loaded - but only one at a time.

Did you select "ftn" for the FORT variable in your build script/makefile?

So, now go into the Compilers directory. There is probably a Linux-ftn.mk file. If this is the trunk ROMS, it will say "CRAY FTN cross-compiler with Linux" at the top. If this is my branch, it will say "PGI Fortran compiler on Linux (on Cray)". Actually, the latter has the "-Mfree" in it. My local file on the Cray system has "-free" instead, which is what ifort wants. You need to know which compiler you are using in order to know which options to give it. Compare with the Linux-ifort.mk file in that Compilers directory. If you are using the actual Cray compiler, you might have to read the man page to find out how to tell it to use F90 free format.

LeaF_7
Posts: 21
Joined: Tue Aug 12, 2014 8:32 pm
Location: Institute of Marine Research

Re: Errors compiling roms on Cray cluster

#3 Unread post by LeaF_7 »

Thanks a lot for you reply, kate.

Code: Select all

--------------------------------------------------------------- /opt/cray/modulefiles ----------------------------------------------------------------
PrgEnv-cray/5.2.40(default)  PrgEnv-gnu/5.2.40(default)   PrgEnv-intel/5.2.40(default) PrgEnv-pgi/5.2.40(default)
It's like the cray compiler is the default one. I switch it to ifort and modified the Linux-ftn.mk file as you suggested, it seemed working.
Will try to learn more about cray compiler stuff.

Thanks again for the help!

Fan

Post Reply