Skip to content

CableUserGuide_Offline_notgadi

Paul Leopardi edited this page Oct 8, 2024 · 2 revisions

== Building on a server other than Gadi

The previous page more or less assumes you are working on gadi@NCI. The build script (build3.sh) is set up for gadi. Once upon a time this script was more complicated and included the capacity to re-configure itself with the help of some user input. Essentially you only need Fortran and Netcdf.

As it is now, when you execute ./build3.sh from the offline/ directory, it first looks at the main function in build3.sh (at the bottom of build3.sh). Here $1 just means the first argument to ./build3.sh on the CLI. Assuming $1 is anything other than “mpi” (so for e.g. just ./build3.sh), the second half of the IF condition is executed.

  echo "Building cable (serial)"
  echo  ''
  host_gadi $1 

Here this $1 is just the carried version of $1 from the CLI. The important part is it calls function host_gadi(). host_gadi() is the platform specific configuration for gadi@NCI. IF you are not working on gadi - you are going to need to make your own version of host_gadi(). Below we assume your server is YYY. And we assume only specification of the essential parts that are required.

i.e

host_YYY()
   module load “FORTRAN COMPILER”
   module load “NETCDF PACKAGE”

Components which are then sent to the Makefille are gathered from these modules.

   export NCDIR=$NETCDF_ROOT'/lib/Intel'
   export NCMOD=$NETCDF_ROOT'/include/Intel'
   export CFLAGS='-O2 -fp-model precise'
   export LDFLAGS='-L'$NCDIR' -O0'
   export LD='-lnetcdf -lnetcdff'

Build3.sh also passes on which fortran compiler it is using. This is intel fortran, appropriate for gadi@NCI.

export FC='ifort'

This all assumes that a module system is being used. We haven’t encountered a HPC system that doesn’t. It is possible to set it up on a laptop and specify all these paths without any module system, however this varies widely between individual setups. We gave up on doing this several years ago, let alone supporting it.

Previous

Clone this wiki locally