New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 10558 for NEMO/trunk/INSTALL.rst – NEMO

Ignore:
Timestamp:
2019-01-22T18:18:13+01:00 (6 years ago)
Author:
acc
Message:

Update of INSTALL.rst

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/INSTALL.rst

    r10557 r10558  
    1 ********************* 
    2 Install the framework 
    3 ********************* 
     1***************************** 
     2Obtaining and installing NEMO 
     3***************************** 
    44 
    55.. contents:: 
     
    163163Folder intended to contain your customised routines (modified from initial ones or new entire routines) 
    164164 
    165 When you compile NEMO you will need to specify the following CPP keys: 
    166  
    167 *   key_iomput 
    168 *   key_mpp_mpi 
    169  
    170165After successful execution of makenemo command, the executable called opa is created in the EXP00 directory (in the example above, the executable is created in CONFIG/MY_GYRE/EXP00). 
    171 More options 
    172  
    173 .. 
    174    .. literalinclude:: 
     166 
     167More makenemo options 
     168--------------------- 
     169 
     170``makenemo`` has several other options that can control which source files are selected and the operation 
     171of the build process itself. These are: 
     172 
     173.. code-block:: sh 
     174 
     175        Optional: 
     176           -d   Set of new sub-components (space separated list from ./src directory) 
     177           -e   Path for alternative patch  location (default: 'MY_SRC' in configuration folder) 
     178           -h   Print this help 
     179           -j   Number of processes to compile (0: no build) 
     180           -n   Name for new configuration 
     181           -s   Path for alternative source location (default: 'src' root directory) 
     182           -t   Path for alternative build  location (default: 'BLD' in configuration folder) 
     183           -v   Level of verbosity ([0-3]) 
     184 
     185These options can be useful for maintaining several code versions with only minor differences but they  
     186should be used sparingly. Note however the ``-j`` option which should be used more routinely to speed up 
     187the build process. For example: 
     188 
     189.. code-block:: sh 
     190 
     191        ./makenemo –m 'my_arch' –r GYRE -n 'MY_GYRE' -j 8 
     192 
     193which will compile up to 8 modules simultaneously. 
     194 
    175195 
    176196Default behaviour 
    177197----------------- 
    178198 
    179     At the first use, you need the -m option to specify the architecture configuration file (compiler and its options, routines and libraries to include), then for next compilation, it is assumed you will be using the same compiler. 
    180     If –n option is not specified, ORCA2_LIM is the default configuration used.  
     199At the first use, you need the -m option to specify the architecture 
     200configuration file (compiler and its options, routines and libraries to 
     201include), then for next compilation, it is assumed you will be using the 
     202same compiler.  If the –n option is not specified the last compiled configuration 
     203will be used. 
    181204 
    182205Tools used during the process 
    183206----------------------------- 
    184207 
    185     functions.sh : bash functions used by makenemo, for instance to create the WORK directory 
    186     cfg.txt : text list of configurations and source directories 
    187     bld.cfg : FCM rules to compile  
     208*   functions.sh : bash functions used by makenemo, for instance to create the WORK directory 
     209*   cfg.txt : text list of configurations and source directories 
     210*   bld.cfg : FCM rules to compile  
    188211 
    189212Examples 
    190213-------- 
     214 
     215.. code-block:: sh 
    191216 
    192217        echo "Example to install a new configuration MY_CONFIG"; 
     
    219244For the reference configurations, the EXP00 folder also contains the initial input files (namelists, \*xml files for the IOs…). If the configuration also needs NetCDF input files, this should be downloaded here from the corresponding tar file, see Users/Reference Configurations 
    220245 
    221    cd 'MY_CONFIG'/EXP00 
    222    mpirun -n $NPROCS ./opa    # $NPROCS is the number of processes ; mpirun is your MPI wrapper 
     246.. code-block:: sh 
     247 
     248        cd 'MY_CONFIG'/EXP00 
     249        mpirun -n $NPROCS ./opa    # $NPROCS is the number of processes ; mpirun is your MPI wrapper 
     250 
    223251 
    224252Viewing and changing list of active CPP keys 
    225253============================================ 
    226254 
    227 For a given configuration (here called MY_CONFIG), the list of active CPP keys can be found in:: 
    228  
    229    NEMOGCM/CONFIG/'MYCONFIG'/cpp_'MY_CONFIG'.fcm 
     255For a given configuration (here called MY_CONFIG), the list of active CPP keys can be found in: 
     256 
     257.. code-block:: sh 
     258 
     259        NEMOGCM/CONFIG/'MYCONFIG'/cpp_'MY_CONFIG'.fcm 
     260 
    230261 
    231262This text file can be edited to change the list of active CPP keys. Once changed, one needs to recompile opa executable using makenemo command in order for this change to be taken in account. 
     263Note that most NEMO configurations will need to specify the following CPP keys: 
     264 
     265*   key_iomput 
     266*   key_mpp_mpi 
     267 
    232268 
    233269.. _HDF5:   http://www.hdfgroup.org/downloads/hdf5 
Note: See TracChangeset for help on using the changeset viewer.