|
|
(2 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| | | |
− | There will be an easier method for compiling MOM6 on raijin in the future, in the mean time here are the instructions for building the ocean-only version:
| + | These are gadi specific instructions to compile the ocean-only version of MOM6 using [https://github.com/angus-g/mom6-ninja-nci scripts developed by Angus Gibson]. |
| | | |
− | = Load appropriate models =
| + | To build ocean-only MOM6 on NCI: |
| + | <pre>cd /scratch/$PROJECT/$USER |
| + | git clone git@github.com:coecms/mom6-ninja-nci.git |
| + | cd mom6-ninja-nci |
| + | ./cms_build.sh |
| + | </pre> |
| | | |
− | | + | When this completes (it takes a few minutes) there should be a MOM6 executable at <code>ocean_only_symmetric/MOM6</code>. |
− | <syntaxhighlight lang="bash"> | |
− | module load intel-fc/17.0.1.132
| |
− | module load intel-cc/17.0.1.132
| |
− | module load openmpi/1.10.7
| |
− | module load netcdf/4.3.3.1
| |
− | </syntaxhighlight> | |
| | | |
− | = Download source code =
| + | See the [https://github.com/angus-g/mom6-ninja-nci original repository] for information on customising the build. |
| | | |
− |
| + | [[Category:MOM]] [[Category:MOM6]] [[Category:Compile]] [[Category:Ocean Models]] |
− | <syntaxhighlight lang="bash">
| |
− | git clone --recursive https://github.com/NOAA-GFDL/MOM6-examples.git MOM6-examples
| |
− | </syntaxhighlight>
| |
− | | |
− | == Copy mkmf template ==
| |
− | | |
− |
| |
− | <syntaxhighlight lang="bash">
| |
− | cd MOM6-examples
| |
− | cp /short/public/aph502/mom6/mkmf.template.nci .
| |
− | </syntaxhighlight>
| |
− | | |
− | = Shared Libraries =
| |
− | | |
− | == Make build directory ==
| |
− | | |
− |
| |
− | <syntaxhighlight lang="bash">
| |
− | mkdir -p build/shared/opt
| |
− | cd build/shared/opt
| |
− | </syntaxhighlight>
| |
− | | |
− | == Create file paths ==
| |
− | | |
− |
| |
− | | |
− |
| |
− | <syntaxhighlight lang="bash">
| |
− | cat > make_paths<<EOF rm -f path_names path_names.html ../../../src/mkmf/bin/list_paths ../../../src/FMS/ EOF chmod a+x make_paths ./make_paths
| |
− | </syntaxhighlight>
| |
− | | |
− | == Create Makefile ==
| |
− | | |
− |
| |
− | <syntaxhighlight lang="bash">
| |
− | [[code format="bash"]]
| |
− | cat > make_make<<EOF
| |
− | ../../../src/mkmf/bin/mkmf -t ../../../mkmf.template.nci -p libfms.a -c "-Duse_libMPI -Duse_netCDF -DSPMD" path_names
| |
− | EOF
| |
− | chmod a+x make_make
| |
− | ./make_make
| |
− | </syntaxhighlight>
| |
− | | |
− | == Compile ==
| |
− | | |
− |
| |
− | <syntaxhighlight lang="bash">
| |
− | cat > make_shared<<EOF
| |
− | make NETCDF=4 OPT=1 libfms.a -j
| |
− | EOF
| |
− | chmod a+x make_shared
| |
− | ./make_shared
| |
− | | |
− | cd ../../../
| |
− | </syntaxhighlight>
| |
− | | |
− | You have now compiled the FMS library, continue to the next section to compile the MOM6 executable.
| |
− | | |
− | = MOM ocean_only =
| |
− | | |
− | == Make build directory ==
| |
− | | |
− |
| |
− | <syntaxhighlight lang="bash">
| |
− | mkdir -p build/ocean_only/opt
| |
− | cd build/ocean_only/opt
| |
− | </syntaxhighlight>
| |
− | | |
− | == Create file paths ==
| |
− | | |
− |
| |
− | <syntaxhighlight lang="bash">
| |
− | cat > make_paths<<EOF
| |
− | rm -f path_names path_names.html
| |
− | ../../../src/mkmf/bin/list_paths ../../../src/MOM6/{config_src/dynamic,config_src/solo_driver,src/{*,*/*}}/
| |
− | EOF
| |
− | chmod a+x make_paths
| |
− | ./make_paths
| |
− | </syntaxhighlight>
| |
− | | |
− | == Create Makefile ==
| |
− | | |
− |
| |
− | <syntaxhighlight lang="bash">
| |
− | cat > make_make<<EOF
| |
− | ../../../src/mkmf/bin/mkmf -t ../../../mkmf.template.nci -o '-I../../shared/opt' -p 'MOM6 -L../../shared/opt -lfms' -c "-Duse_libMPI -Duse_netCDF -DSPMD" path_names
| |
− | EOF
| |
− | chmod a+x make_make
| |
− | ./make_make
| |
− | </syntaxhighlight>
| |
− | | |
− | == Compile ==
| |
− | | |
− |
| |
− | <syntaxhighlight lang="bash">
| |
− | cat > make_mom<<EOF
| |
− | make NETCDF=4 OPT=1 MOM6 -j
| |
− | | |
− | EOF
| |
− | chmod a+x make_mom
| |
− | ./make_mom
| |
− | </syntaxhighlight>
| |
− | | |
− | [[Category:Mom]] [[Category:Mom6]] [[Category:Compile]][[Category:Ocean Models]] | |
These are gadi specific instructions to compile the ocean-only version of MOM6 using scripts developed by Angus Gibson.
To build ocean-only MOM6 on NCI:
cd /scratch/$PROJECT/$USER
git clone git@github.com:coecms/mom6-ninja-nci.git
cd mom6-ninja-nci
./cms_build.sh
When this completes (it takes a few minutes) there should be a MOM6 executable at ocean_only_symmetric/MOM6
.
See the original repository for information on customising the build.