Christopher Bull bio photo

Christopher Bull

Aspiring Oceanographer at Northumbria University. Big data python enthusiast. Outdoor adventurer.

Email Twitter Github

We take the steps of downloading, compiling and testing NEMO4.2 code on ARCHER2. This post is written by TiPACCs PDRA Alethea Mountford (alethea.mountford@northumbria.ac.uk), thanks Alethea!

Pre-requisites:

Suggested reading:

Installing NEMO

Get NEMO4.2.0, note that as of the NEMO4.2.0 release, svn is no longer supported. Further reading on the NEMO site

git clone --branch 4.2.0 https://forge.nemo-ocean.eu/nemo/nemo.git NEMORC

Build NEMO

Log-into ARCHER2. Based on NEMO4 ARCHER2 help page. Set-up your environment with:

module -s restore /work/n01/shared/acc/n01_modules/ucx_env

From: /work/n01/shared/nemo/ARCH/arch-X86_ARCHER2-Cray_4.2.fcm put into your ARCH folder, i.e., /work/n02/n02/asmou/NEMORC/arch/arch-X86_ARCHER2-Cray_4.2.fcm

%NCDF_HOME           $NETCDF_DIR
%HDF5_HOME           $HDF5_DIR
%XIOS_HOME           /work/n01/shared/nemo/xios-trunk
#OASIS_HOME          

%NCDF_INC            -I%NCDF_HOME/include -I%HDF5_HOME/include
%NCDF_LIB            -L%HDF5_HOME/lib -L%NCDF_HOME/lib -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lz
%XIOS_INC            -I%XIOS_HOME/inc
%XIOS_LIB            -L%XIOS_HOME/lib -lxios
#OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
#OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip

%CPP                 cpp -Dkey_nosignedzero
%FC                  ftn
%FCFLAGS             -em -s integer32 -s real64 -O0 -hflex_mp=intolerant -N1023
%FFLAGS              -em -s integer32 -s real64 -O0 -hflex_mp=intolerant -N1023
%LD                  CC
%FPPFLAGS            -P -traditional
%LDFLAGS             -lmpifort_cray
%AR                  ar
%ARFLAGS             -r
%MK                  gmake
%USER_INC            %XIOS_INC %NCDF_INC
%USER_LIB            %XIOS_LIB %NCDF_LIB
#USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
#USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB

%CC                  cc -Wl,"--allow-multiple-definition"
%CFLAGS              -O1 -Wl,"--allow-multiple-definition"

Add -J flag to FC_MODSEARCH in /work/n02/n02/asmou/NEMORC/ext/FCM/lib/Fcm/Config.pm, should look like

FC_MODSEARCH => '-J',                # FC flag, specify "module" path

Test compile works, i.e.,

cd /work/n02/n02/asmou/NEMORC
./makenemo -r WED025 -m X86_ARCHER2-Cray_4.2 -j 16
ls -lah cfgs/WED025/BLD/bin/nemo.exe

If -Dkey_nosignedzero has been added to arch-X86_ARCHER2-Cray_4.2.fcm then key_nosignedzero should have been added to cpp_WED025.fcm, i.e should have:

bld::tool::fppkeys key_xios key_si3 key_qco key_isf key_nosignedzero

If key_nosignedzero is not present in cpp_WED025.fcm, this can be added manually during compile:

./makenemo -r WED025 -m X86_ARCHER2-Cray_4.2 add_key “key_nosignedzero” -j 16

Make sure to link the correct xios server (trunk, not 2.5) in your working directory:

ln -s /work/n01/shared/nemo/xios-trunk/bin/xios_server.exe xios_server.exe
In category: nemo4