Make files for Cray cluster

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
User avatar
m.hadfield
Posts: 520
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

Make files for Cray cluster

#1 Post by m.hadfield » Tue Dec 05, 2017 9:30 pm

Here in New Zealand we have access to a new Cray XC50 (whoopee!) and I have been working out how to build ROMS on it. As discussed in this thread

viewtopic.php?f=31&t=4086&p=15704&hilit ... ftn#p15704

it has 3 programming environments, PrgEnv-cray, PrgEnv-intel, PrgEnv-gnu, all using the ftn command to invoke the Fortran compiler, but with different options supported by the different back-ends. (It also has a tendency to switch from one programming environment to another when you don't intend it, but I digress...).

I have created files Linux-ftn-cray.mk and Linux-ftn-intel.mk for the cray and intel environments respectively. (I haven't done Gnu yet, as I expect performance to be lower.) I have also included, at the end of this message, Bash functions that load the modules and set the environment variables need to use these make files on our system. Note that you don't set USE_MPIF90

The existing Linux-ftn.mk seems to be a composite of the Cray options in the first half of the makefile and Gnu options (-free-form and -fixed-form) in the second. I think it's broken.

Perhaps the makefiles I've attached could be added to the repository?

---------------------------------------------------------

function set-roms-cray ()
{
echo Setting environment variables for ROMS with PrgEnv-cray

module unload PrgEnv-gnu PrgEnv-intel
module load PrgEnv-cray craype-x86-skylake cray-netcdf

export FORT=ftn-cray

export USE_NETCDF4=on
}

function set-roms-intel ()
{
echo Setting environment variables for ROMS with PrgEnv-intel

module unload PrgEnv-cray PrgEnv-gnu
module load PrgEnv-intel craype-broadwell cray-netcdf cray-hdf5

export FORT=ftn-intel

export USE_NETCDF4=on
}


On our system, these require the following
Attachments
Linux-ftn-intel.mk
Makefile for Cray ftn with PrgEnv-intel
(4.54 KiB) Downloaded 82 times
Linux-ftn-cray.mk
Makefile for Cray ftn with PrgEnv-cray
(4.48 KiB) Downloaded 85 times

User avatar
m.hadfield
Posts: 520
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

Re: Make files for Cray cluster

#2 Post by m.hadfield » Tue Dec 05, 2017 9:46 pm

Oops, forgot compiler options needed for OpenMP on the Intel variant. Corrected file attached.
Attachments
Linux-ftn-intel.mk
Makefile for Cray ftn compiler with PrgEnv-intel. Corrected OpenMP options.
(4.57 KiB) Downloaded 84 times

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

Re: Make files for Cray cluster

#3 Post by kate » Tue Dec 05, 2017 10:32 pm

Cool! I've been deleting the Compilers files I can no longer test on my branch. It's been many a year since I've had access to a Cray. That Linux-ftn thing you didn't like might have come from me for a cross-compiler running on Linux for a Cray, not necessarily the same sort of system you have now.

User avatar
m.hadfield
Posts: 520
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

Re: Make files for Cray cluster

#4 Post by m.hadfield » Wed Dec 06, 2017 1:34 am

Here, for completeness, is Linux-ftn-gnu.mk. Build time with the Gnu programming environment is much less than for the others; I conjecture this might be due to a lack of inter-procedural optimizations at link time. I expect run-time performance to be poor, but the Gnu option might be useful when debugging.

I'll test these for a bit longer and then submit them in a Trac ticket.
Attachments
Linux-ftn-gnu.mk
Makefile for Cray ftn compiler with PrgEnv-gnu
(5.04 KiB) Downloaded 67 times

Post Reply