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.
Users/ModelInstall (diff) – NEMO

Changes between Version 13 and Version 14 of Users/ModelInstall


Ignore:
Timestamp:
2017-05-11T15:28:16+02:00 (7 years ago)
Author:
timgraham
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Users/ModelInstall

    v13 v14  
    1717== 2. Extract and install XIOS 
    1818 
    19 1 - Install the NetCDF4 library: 
    20 XIOS needs NetCDF4 (not NetCDF3). In addition, if you want to use the "one_file" mode (see bellow), you will need the hdf/netcdf flibraries properly compiled to allow parallel IO. 
    21  
    22 Note that NetCDF files created by XIOS are not compatible with NetCDF3. The softwares you use to see or analyze NEMO outputs needs to be linked with NetCDF4 and not NetCDF3. 
    23  
    24 2 - Download XIOS 
    25 The up to date version of XIOS is XIOS2 (previoulsy XIOS1). 
    26 XIOS uses xml input files. Those are slightly different from XIOS1 to XIOS2. For the moment, interface for both XIOS1 and XIO2 are available in NEMO, so as the xml files for both. 
    27 From nemo_v3_6_STABLE and further, use of XIOS2 is now strongly suggested. 
    28  
    29 Download the XIOS2 software (this will create your xios-2.0 directory): 
    30 cd $HOME 
    31 svn co -r 819 http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/trunk xios-2.0 
    32 ln -s xios-2.0 XIOS 
    33  
    34 Install the XIOS library and executable: 
    35 Follow the documentation available here: http://forge.ipsl.jussieu.fr/ioserver/wiki/documentation 
    36  
    37 Compile NEMO (see NEMO quickstart guide) using appropriate directives : 
    38 - NEMO must be compiled with with following cpp keys (see your NEMOCGM/CONFIG/"MY_CONFIG"/cpp*.fcm file: 
    39  
    40   key_iomput and key_mpp_mpi 
    41 and also (if using XIOS2) 
    42  
    43  key_xios2 
    44 - you need to set appropriate PATHS for XIOS libraries in your ARCH/arch-xxxx.fcm file, 
    45  
    46 see for example in NEMOGCM/ARCH, the arch files: arch-macport_osx.fcm, arch-PW6_VARGAS.fcm, arch-X64_CURIE.fcm or NOC  
    47 Input files for XIOS: 
    48 You need the following files: 
    49  
    50 domain_def.xml 
    51 field_def.xml 
    52 iodef.xml 
    53 Templates can be found here: 
    54  
    55 NEMOGCM/CONFIG/SHARED for field_def.xml and domain_def.xml 
    56 see NEMOGCM/CONFIG/ORCA2_LIM for examples of iodef*.xml 
    57  
    58 (Templates for XIOS2 version are different from XIOS1 and can be found here: 
    59  
    60 NEMOGCM/CONFIG/NEMOGCM/CONFIG/GYRE_XIOS for field_def.xml, file_def.xml, domain_def.xml, and example of iodef.xml) 
    61  
    62 Run XIOS in attached mode: XIOS used as a library in NEMO, NEMO is the unique executable 
    63 This mode has bad performances but is convenient as you have only one executable. It is suitable if you use a relatively low number of cores. 
    64  
    65 Define the attached mode in iodef.xml: 
    66  
    67       <variable id="using_server" type="boolean">false</variable> 
    68 Choose the number of files created: 
    69  
    70 You can create as many files as NEMO cores or produce directly 1 file for all NEMO cores, by choosing the attribute type of the tag "file_definition" in iodef.xml 
    71  
    72  - As many files as NEMO cores : 
    73  
    74     <file_definition type="multiple_file" sync_freq="1d" min_digits="4"> 
    75 Note that in this case, the files you will get are not located on the subdomains used in the mpi domain decomposition of NEMO. XIOS (even when it is used as a library) creates its own mpi domain decomposition in order to have subdomains containing complete lines (better for IO performances). 
    76  
    77  - A unique file for all NEMO cores: 
    78  
    79     <file_definition type="one_file" sync_freq="1d" min_digits="4"> 
    80 Note that this mode is not available if you compiled XIOS with the option "--netcdf_lib netcdf4_seq" or if the hdf/netcdf flibraries are not properly compiled to allow parallel IO. 
    81  
    82 Check and eventually change the buffer_size 
    83  
    84 The buffer size is defined in iodef.xml according to your domain size, the number of cores you use and the memory available on your machine. 
    85 Note that you will get a clear error message if this buffer is too small: 
    86  
    87       <variable id="buffer_size" type="integer">10000000</variable> 
    88  Buffer_size must be bigger than jpi*jpj*jpk*8*3 (with jpi(not jpiglo) and jpj(not jpjglo) NEMO subdomain size) 
    89  
    90 Run NEMO: 
    91  
    92 mpirun -np x ./opa 
    93 Run XIOS in detached (or server) mode: XIOS used as a library in NEMO and as an external executable. 
    94 This mode has the best performances but is less convenient as you have to deal with two executables (NEMO and XIOS). 
    95  
    96 Define the mode in iodef.xml: 
    97  
    98       <variable id="using_server"              type="boolean">true</variable> 
    99 Choose the number of files created: 
    100  
    101 If you want to create 1 file per XIOS core or produce directly 1 file for all XIOS cores by choosing the attribute type of the tag "file_definition" in iodef.xml 
    102  - One file per XIOS core : 
    103  
    104     <file_definition type="multiple_file" sync_freq="1d" min_digits="4"> 
    105  - A unique file for all XIOS cores: 
    106  
    107     <file_definition type="one_file" sync_freq="1d" min_digits="4"> 
    108 Note that this mode is not available if you compiled XIOS with the option "--netcdf_lib netcdf4_seq" or if the hdf/netcdf flibraries are not properly compiled to allow parallel IO. 
    109  
    110 Check and eventually change the buffer_size 
    111  
    112 The buffer size is defined in iodef.xml according to your domain size, the number of cores you use and the memory available on your machine. 
    113 Note that you will get a clear error message if this buffer is too small: 
    114  
    115       <variable id="buffer_size"               type="integer">10000000</variable> 
    116  Buffer_size must be bigger than jpi*jpj*jpk*8*3 (with jpi(not jpiglo) and jpj(not jpjglo) the subdomain size) 
    117  
    118 Copy xios executable in the directory to run NEMO: 
    119  
    120  cp XIOS/bin/xios_server.exe . 
    121 Create once for all app.txt file: 
    122  
    123 cat >app.txt 
    124 -np x ./opa             # nemo will run on x cores 
    125 -np y ./xios_server.exe # xios will run on y cores 
    126 Run NEMO: 
    127  
    128 mpirun --app app.txt 
    129 Advanced options: 
    130  
    131 From version 482 of XIOS onwards, several advanced features have been added to the server's capabilities. These include: the ability to perform computations with combinations of output fields; the ability to change the precision of output variables and the ability to add user-defined attributes. The following PDF document contains details and some worked examples: 
    132 * Documentation: [attachment:wiki:Users/ModelInstall:newxios_functions_zooms.pdf] 
     19Diagnostic outputs from NEMO are handled by the third party XIOS library. Instructions on how to obtain and install the softward see [[ModelInterfacing/InputsOutputs]]. 
    13320 
    13421 
    135 == 3. Compile and create NEMO executable 
     22== 3. Setup your ARCH file 
     23 
     24All compiler options in NEMO are controlled using files in NEMOGCM/ARCH/arch-**.fcm where ** 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. 
     25 
     26== 4. Compile and create NEMO executable 
    13627 
    13728The 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]] 
     
    210101}}} 
    211102 
    212 This text file can be edited to change the list of active cpp keys. Once changed, one needs to recompile NEMO using the makenemo command in order ofr this change to be taken in account. 
     103This text file can be edited to change the list of active cpp keys. Once changed, one needs to recompile NEMO using the makenemo command in order for this change to be taken in account.