Changes between Version 29 and Version 30 of Users/Model Install


Ignore:
Timestamp:
2017-05-12T17:47:33+02:00 (3 years ago)
Author:
nicolasmartin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Users/Model Install

    v29 v30  
    77== 1. Extract the NEMO code 
    88 
    9 Using your `my_login` /pw registered on this web site: 
     9Using your [[span(my_login, style=color: #BB4444 )]] /pw registered here: 
    1010{{{#!sh 
    11 svn --username "mylogin" co http://forge.ipsl.jussieu.fr/nemo/svn/branches/2015/nemo_v3_6_STABLE/NEMOGCM 
     11svn --username 'mylogin' co http://forge.ipsl.jussieu.fr/nemo/svn/branches/2015/nemo_v3_6_STABLE/NEMOGCM 
    1212}}} 
    1313 
    1414=== Description of directory tree 
    1515 
    16  
    1716The image below shows the directory tree: 
    1817 
    19 [[Image(wiki:Users/ModelInstall:nemogcm_tree.png,width=600, center)]] 
     18[[Image(wiki:Users/ModelInstall:nemogcm_tree.png,width=800, center)]] 
    2019 
    21  
    22 * `ARCH` : compilation option files, with format `arch_compiler.fcm`, the compiler name has to be provided with `–m` option 
    23 * `CONFIG` : all configurations and a `cpp.fcm` file containing the list of CPP keys to each configuration 
    24 * `EXTERNAL` : package to implement an embbeded model (AGRIF) 
    25 * `NEMO` and sub-directories: FORTRAN source codes 
    26 * `SETTE` : package to make tests to ensure the reproducibility and restartability of the code after user changes 
    27 * `TOOLS` : useful softwares to different utilities 
     20|| `ARCH`     || compilation option files, with format `arch_compiler.fcm`, the compiler name has to be provided with `–m` option || 
     21|| `CONFIG`   || all configurations and a `cpp.fcm` file containing the list of CPP keys to each configuration                    || 
     22|| `EXTERNAL` || package to implement an embedded model (AGRIF)                                                                   || 
     23|| `NEMO`     || FORTRAN source codes in several sub-directories                                                                  || 
     24|| `SETTE`    || package to make tests to ensure the reproducibility and restartability of the code after user changes            || 
     25|| `TOOLS`    || useful softwares to different utilities                                                                          || 
    2826 
    2927== 2. Extract and install XIOS 
    3028 
    31 Diagnostic outputs from NEMO are handled by the third party XIOS library. '''Important notice: XIOS needs to be installed (dowloaded and compiled) before NEMO, since the libraries are needed to successfully create NEMO executable.'''  Instructions on how to obtain and install the software see [[ModelInterfacing/InputsOutputs#ExtractingandinstallingXIOS]]. 
     29Diagnostic outputs from NEMO are handled by the third party XIOS library. 
     30 
     31'''Important notice: XIOS needs to be compiled before NEMO, since the libraries are needed to successfully create NEMO executable.'''[[BR]] 
     32Instructions on how to obtain and install the software, see [wiki:Users/ModelInterfacing/InputsOutputs#ExtractingandinstallingXIOS]. 
    3233 
    3334When you compile NEMO you will need to specify the following CPP keys: 
     
    3637   * key_xios2 if you wish to use XIOS2 in nemo_v3_6_STABLE. XIOS2 is the only version available in the trunk. 
    3738 
    38  
    3939== 3. Setup your ARCH file 
    4040 
    41 All compiler options in NEMO are controlled using files in NEMOGCM/ARCH/arch-my_arch_name.fcm where ''my_arch_name'' is the name of your architecture. It is recommended to modify an ARCH file from an architecture similar to your own architecture. You will need to set appropriate values for all of the variables in the file. the variables %NCDF_HOME, %HDF5_HOME and %XIOS_HOME should be set to the installation directories used above. 
     41All compiler options in NEMO are controlled using files in NEMOGCM/ARCH/arch-[[span(my_arch, style=color: #BB4444 )]].fcm where [[span(my_arch, style=color: #BB4444 )]] is the name of your architecture FCM file.[[BR]] 
     42It is recommended to copy and rename an ARCH file from an architecture similar to your own architecture. You will need to set appropriate values for all of the variables in the file. The FCM variables `%NCDF_HOME`, `%HDF5_HOME` and `%XIOS_HOME` should be set to the installation directories used above. 
     43[[IncludeSource(/branches/2015/nemo_v3_6_STABLE/NEMOGCM/ARCH/arch-macport_osx.fcm, start=40, end=47)]]  
    4244 
    4345== 4. Compile and create NEMO executable 
    4446 
    4547The main script to compile and create executable is called `makenemo` and located in the `CONFIG` directory. To identify the source code you need, to build the makefile and run it.[[BR]] 
    46 As an example, compile `GYRE`, with ifort on linux to create a `MY_GYRE` configuration: 
     48As an example, compile GYRE with [[span(my_arch, style=color: #BB4444 )]] to create a [[span(MY_GYRE, style=color: #BB4444 )]] configuration: 
    4749{{{#!sh 
    48 cd NEMOGCM/CONFIG; ./makenemo –m "my_arch_name" –r GYRE -n MY_GYRE 
     50cd NEMOGCM/CONFIG; ./makenemo –m 'my_arch' –r GYRE -n 'MY_GYRE' 
    4951}}} 
    5052 
    51 After successful execution of the makenemo command, the executable name `opa`is created in the EXP00 directory (in the example above, the executable is created in `CONFIG/MY_GYRE/EXP00/opa`) 
     53After 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`) 
     54 
    5255{{{#!comment 
    5356The image below shows the directory tree characterized by [[span("MY_CONFIG", style=color: #BB4444 )]] new 'branch'. All directories and fundamental files created by makenemo are highlighted in green.  
    54 In particular, even if not shown in the figure, the "WORK" folder contains links to the compiled routines. 
     57In particular, even if not shown in the figure, `WORK` folder contains links to the compiled routines. 
    5558 
    5659[[Image(Users/ModelInstall:nemogcm_tree._compiled.png,width=300)]] 
     
    5962}}} 
    6063 
    61  
    6264=== More options 
    6365 
    64 * `–n` [CONFIG]: for configuration name, existent or new config to install 
    65 * `–m` [COMPILER]: compiler choice (use files names in `NEMOGCM/ARCH`, see examples below) 
    66 * `–h`: help 
    67 * `–r` [REFCONFIG]: reference configuration as first guess when installing a new one 
    68 * `–j`[num]: number of processes to compile (`-j 0`:no compilation) 
    69 * `–d` [DIR]: NEMO subdirectory (not needed) 
    70 * `–t` [DIR]: temporary directory to store libraries 
    71 * `-clean` [CONFIG_NAME] : remove the Makefile and all the files created afterwards 
     66||Option || Argument || || 
     67|| `–n` || [CONFIG] || configuration name, existent or new config to install || 
     68|| `–m` || [COMPILER] || compiler choice (use files names in `NEMOGCM/ARCH`, see examples below) || 
     69|| `–h` || || help || 
     70|| `–r` || [REFCONFIG] || reference configuration as first guess when installing a new one || 
     71|| `–j` || [num] || number of processes to compile (`-j 0`:no compilation) || 
     72|| `–d` || [DIR] || NEMO subdirectory (not needed) || 
     73|| `–t` || [DIR] || temporary directory to store libraries || 
     74|| `-clean` || [CONFIG_NAME] || remove the Makefile and all the files created afterwards || 
    7275 
     76=== Default behavior 
    7377At the first use, you need the `-m` option to specify compiler, its options and libraries, then for next compilation, it is assumed you will be using the same compiler.[[BR]] 
    7478If `–n` option is not specified, `ORCA2_LIM` is the default configuration used. `-d` option has been implemented for use in non-interactive shell. The `WORK` directory is created under each configuration directory. 
     
    8286=== Examples 
    8387 
    84 * Compiling `GYRE`, with ifort on linux to create a `MY_GYRE` configuration 
     88* Compiling GYRE with ifort on linux to create a [[span(MY_GYRE, style=color: #BB4444 )]] configuration 
    8589{{{#!sh 
    86 makenemo –m ifort_linux –r GYRE -n MY_GYRE 
     90makenemo –m ifort_linux –r GYRE -n 'MY_GYRE' 
    8791}}} 
    88 * Create and compile `ORCA_LIM3` 
     92* Create and compile ORCA_LIM3 
    8993{{{#!sh 
    9094makenemo –n ORCA_LIM3 # and answer 
     
    113117 
    114118{{{#!sh 
    115 cd CONFIG/"MY_CONFIG"/EXP00 
     119cd CONFIG/'MY_CONFIG'/EXP00 
    116120mpirun -n $NPROCS ./opa    # $NPROCS is the number of processes ; mpirun is your MPI wrapper 
    117121}}} 
     
    119123== 6. Viewing and changing list of active CPP keys 
    120124 
    121 For a given configuration (here called [[span("MY_CONFIG", style=color: #BB4444 )]]), the list of active CPP keys can be found in  
     125For a given configuration (here called [[span(MY_CONFIG, style=color: #BB4444 )]]), the list of active CPP keys can be found in  
    122126{{{#!sh 
    123 NEMOGCM/CONFIG/"MYCONFIG"/cpp_"MY_CONFIG".fcm 
     127NEMOGCM/CONFIG/'MYCONFIG'/cpp_'MY_CONFIG'.fcm 
    124128}}} 
    125129