Changes between Version 29 and Version 30 of Users/ModelInstall
- Timestamp:
- 2017-05-12T17:47:33+02:00 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Users/ModelInstall
v29 v30 7 7 == 1. Extract the NEMO code 8 8 9 Using your `my_login` /pw registered on this web site:9 Using your [[span(my_login, style=color: #BB4444 )]] /pw registered here: 10 10 {{{#!sh 11 svn --username "mylogin"co http://forge.ipsl.jussieu.fr/nemo/svn/branches/2015/nemo_v3_6_STABLE/NEMOGCM11 svn --username 'mylogin' co http://forge.ipsl.jussieu.fr/nemo/svn/branches/2015/nemo_v3_6_STABLE/NEMOGCM 12 12 }}} 13 13 14 14 === Description of directory tree 15 15 16 17 16 The image below shows the directory tree: 18 17 19 [[Image(wiki:Users/ModelInstall:nemogcm_tree.png,width= 600, center)]]18 [[Image(wiki:Users/ModelInstall:nemogcm_tree.png,width=800, center)]] 20 19 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 || 28 26 29 27 == 2. Extract and install XIOS 30 28 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]]. 29 Diagnostic 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]] 32 Instructions on how to obtain and install the software, see [wiki:Users/ModelInterfacing/InputsOutputs#ExtractingandinstallingXIOS]. 32 33 33 34 When you compile NEMO you will need to specify the following CPP keys: … … 36 37 * key_xios2 if you wish to use XIOS2 in nemo_v3_6_STABLE. XIOS2 is the only version available in the trunk. 37 38 38 39 39 == 3. Setup your ARCH file 40 40 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. 41 All 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]] 42 It 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)]] 42 44 43 45 == 4. Compile and create NEMO executable 44 46 45 47 The 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:48 As an example, compile GYRE with [[span(my_arch, style=color: #BB4444 )]] to create a [[span(MY_GYRE, style=color: #BB4444 )]] configuration: 47 49 {{{#!sh 48 cd NEMOGCM/CONFIG; ./makenemo –m "my_arch_name" –r GYRE -n MY_GYRE50 cd NEMOGCM/CONFIG; ./makenemo –m 'my_arch' –r GYRE -n 'MY_GYRE' 49 51 }}} 50 52 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`) 53 After 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 52 55 {{{#!comment 53 56 The 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.57 In particular, even if not shown in the figure, `WORK` folder contains links to the compiled routines. 55 58 56 59 [[Image(Users/ModelInstall:nemogcm_tree._compiled.png,width=300)]] … … 59 62 }}} 60 63 61 62 64 === More options 63 65 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 || 72 75 76 === Default behavior 73 77 At 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]] 74 78 If `–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. … … 82 86 === Examples 83 87 84 * Compiling `GYRE`, with ifort on linux to create a `MY_GYRE`configuration88 * Compiling GYRE with ifort on linux to create a [[span(MY_GYRE, style=color: #BB4444 )]] configuration 85 89 {{{#!sh 86 makenemo –m ifort_linux –r GYRE -n MY_GYRE90 makenemo –m ifort_linux –r GYRE -n 'MY_GYRE' 87 91 }}} 88 * Create and compile `ORCA_LIM3`92 * Create and compile ORCA_LIM3 89 93 {{{#!sh 90 94 makenemo –n ORCA_LIM3 # and answer … … 113 117 114 118 {{{#!sh 115 cd CONFIG/ "MY_CONFIG"/EXP00119 cd CONFIG/'MY_CONFIG'/EXP00 116 120 mpirun -n $NPROCS ./opa # $NPROCS is the number of processes ; mpirun is your MPI wrapper 117 121 }}} … … 119 123 == 6. Viewing and changing list of active CPP keys 120 124 121 For a given configuration (here called [[span( "MY_CONFIG", style=color: #BB4444 )]]), the list of active CPP keys can be found in125 For a given configuration (here called [[span(MY_CONFIG, style=color: #BB4444 )]]), the list of active CPP keys can be found in 122 126 {{{#!sh 123 NEMOGCM/CONFIG/ "MYCONFIG"/cpp_"MY_CONFIG".fcm127 NEMOGCM/CONFIG/'MYCONFIG'/cpp_'MY_CONFIG'.fcm 124 128 }}} 125 129