Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Wed Jan 17, 2018 2:38 pm




Post new topic Reply to topic  [ 4 posts ] 

All times are UTC

Author Message
PostPosted: Tue Dec 05, 2017 9:30 pm 
Offline
User avatar

Joined: Tue Jul 01, 2003 4:12 am
Posts: 487
Location: NIWA
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=Linux+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:
File comment: Makefile for Cray ftn with PrgEnv-intel
Linux-ftn-intel.mk [4.54 KiB]
Downloaded 7 times
File comment: Makefile for Cray ftn with PrgEnv-cray
Linux-ftn-cray.mk [4.48 KiB]
Downloaded 6 times
Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 05, 2017 9:46 pm 
Offline
User avatar

Joined: Tue Jul 01, 2003 4:12 am
Posts: 487
Location: NIWA
Oops, forgot compiler options needed for OpenMP on the Intel variant. Corrected file attached.


Attachments:
File comment: Makefile for Cray ftn compiler with PrgEnv-intel. Corrected OpenMP options.
Linux-ftn-intel.mk [4.57 KiB]
Downloaded 8 times
Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 05, 2017 10:32 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3278
Location: IMS/UAF, USA
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.


Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 06, 2017 1:34 am 
Offline
User avatar

Joined: Tue Jul 01, 2003 4:12 am
Posts: 487
Location: NIWA
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:
File comment: Makefile for Cray ftn compiler with PrgEnv-gnu
Linux-ftn-gnu.mk [5.04 KiB]
Downloaded 7 times
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group