WhatIs: The makelmdz fcm script : Différence entre versions

De LMDZPedia
Aller à : navigation, rechercher
(Page créée avec « == The makelmdz_fcm script to compile LMDZ == The makelmdz_fcm script is the bash script that you use to compile LMDZ. This is where one sets various options (e.g which p... »)
 
 
(2 révisions intermédiaires par le même utilisateur non affichées)
Ligne 4 : Ligne 4 :
  
 
To list available options, run "makelmdz_fcm -h", which should return something like:
 
To list available options, run "makelmdz_fcm -h", which should return something like:
 
+
<pre>
Usage :
+
Usage :
makelmdz_fcm [options] -arch nom_arch exec
+
makelmdz_fcm [options] -arch nom_arch exec
[-h]                      : brief help
+
[-h]                      : brief help
[-d [[IMx]JMx]LM]          : IM, JM, LM are the dimensions in x, y, z (default: 96x72x19)
+
[-d [[IMx]JMx]LM]          : IM, JM, LM are the dimensions in x, y, z (default: 96x72x19)
[-p PHYS]                  : set of physical parametrizations (in libf/phyPHYS), (default: lmd)
+
[-p PHYS]                  : set of physical parametrizations (in libf/phyPHYS), (default: lmd)
[-prod / -dev / -debug]    : compilation mode production (default) / developement / debug
+
[-prod / -dev / -debug]    : compilation mode production (default) / developement / debug
[-c false/MPI1/OMCT]      : coupling with ocean model : MPI1/OMCT/false (default: false)
+
[-c false/MPI1/OMCT]      : coupling with ocean model : MPI1/OMCT/false (default: false)
[-v false/orchidee2.0/orchidee1.9/true] : version of the vegetation model to include (default: false)
+
[-v false/orchidee2.0/orchidee1.9/true] : version of the vegetation model to include (default: false)
 
           false      : no vegetation model
 
           false      : no vegetation model
 
           orchidee2.1 : compile using ORCHIDEE 2.1 (or more recent version)
 
           orchidee2.1 : compile using ORCHIDEE 2.1 (or more recent version)
Ligne 18 : Ligne 18 :
 
           orchidee1.9 : compile using ORCHIDEE up to the version including OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6
 
           orchidee1.9 : compile using ORCHIDEE up to the version including OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6
 
           true        : (obsolete; for backward compatibility) use ORCHIDEE tag 1.9-1.9.6
 
           true        : (obsolete; for backward compatibility) use ORCHIDEE tag 1.9-1.9.6
[-chimie INCA/false]      : with INCA chemistry model or without (default: false)
+
[-chimie INCA/false]      : with INCA chemistry model or without (default: false)
[-cosp true/false]    : compile with/without cosp package (default: false)
+
[-cosp true/false]    : compile with/without cosp package (default: false)
[-cosp2 true/false]    : compile with/without cosp2 package (default: false)
+
[-cosp2 true/false]    : compile with/without cosp2 package (default: false)
[-cospv2 true/false]    : compile with/without cospv2 package (default: false)
+
[-cospv2 true/false]    : compile with/without cospv2 package (default: false)
[-sisvat true/false]  : compile with/without sisvat package (default: false)
+
[-inlandsis true/false]  : compile with/without inlandsis package (default: false)
[-rrtm true/false]    : compile with/without rrtm package (default: false)
+
[-rrtm true/false]    : compile with/without rrtm package (default: false)
[-dust true/false]    : compile with/without the dust package by Boucher and co (default: false)
+
[-rad old/rrtm/ecrad]    : compile with old/rrtm/ecrad radiatif code (default: old)
[-strataer true/false]    : compile with/without the strat aer package by Boucher and co (default: false)
+
[-dust true/false]    : compile with/without the dust package by Boucher and co (default: false)
[-parallel none/mpi/omp/mpi_omp] : parallelism (default: none) : mpi, openmp or mixted mpi_openmp
+
[-strataer true/false]    : compile with/without the strat aer package by Boucher and co (default: false)
[-g GRI]                  : grid configuration in dyn3d/GRI_xy.h  (default: reg, inclues a zoom)
+
[-isotopes true/false]    : compile with/without water isotopes in the physics
[-io ioipsl/mix/xios]                  : Input/Output library (default: ioipsl)
+
[-isoverif true/false]    : compile with/without verifications for water isotopes in the physics
[-include INCLUDES]        : extra include path to add
+
[-diagiso true/false]    : compile with/without special diagnostics for water isotopes in the physics
[-cpp CPP_KEY]            : additional preprocessing definitions
+
[-isotrac true/false]    : compile with/without tracers of water isotopes in the physics
[-adjnt]                  : adjoint model, not operational ...
+
[-parallel none/mpi/omp/mpi_omp] : parallelism (default: none) : mpi, openmp or mixted mpi_openmp
[-mem]                    : reduced memory dynamics (if in parallel mode)
+
[-g GRI]                  : grid configuration in dyn3d/GRI_xy.h  (default: reg, inclues a zoom)
[-filtre NOMFILTRE]        : use filtre from libf/NOMFILTRE (default: filtrez)
+
[-io ioipsl/mix/xios]                  : Input/Output library (default: ioipsl)
[-link LINKS]              : additional links with other libraries
+
[-include INCLUDES]        : extra include path to add
[-j n]                    : active parallel compiling on ntask
+
[-cpp CPP_KEY]            : additional preprocessing definitions
[-full]                    : full recompiling  
+
[-adjnt]                  : adjoint model, not operational ...
[-libphy]                  : only compile physics package (no dynamics or main program)
+
[-mem]                    : reduced memory dynamics (obsolete flag; always on in parallel mode)
[-fcm_path path]          : path to the fcm tool (default: tools/fcm/bin)
+
[-filtre NOMFILTRE]        : use filtre from libf/NOMFILTRE (default: filtrez)
[-ext_src path]            : path to an additional set of routines to compile with the model
+
[-link LINKS]              : additional links with other libraries
[-arch_path path]          : path to architecture files (default: arch)
+
[-j n]                    : active parallel compiling on ntask
  -arch nom_arch            : target architecture  
+
[-full]                    : full recompiling  
 +
[-libphy]                  : only compile physics package (no dynamics or main program)
 +
[-fcm_path path]          : path to the fcm tool (default: tools/fcm/bin)
 +
[-ext_src path]            : path to an additional set of routines to compile with the model
 +
[-arch_path path]          : path to architecture files (default: arch)
 +
-arch nom_arch            : target architecture  
 
  exec                      : executable to build
 
  exec                      : executable to build
 
+
</pre>
 
The user must at the very least provide the name of the executable (typically "gcm")  and the mandatory option "-arch" with the target architecture name (e.g. "local" or "gfortran_CICLAD").
 
The user must at the very least provide the name of the executable (typically "gcm")  and the mandatory option "-arch" with the target architecture name (e.g. "local" or "gfortran_CICLAD").
  
 +
== Some extra info about various makelmdz_fcm options ==
 +
<pre>-d IMxJMxLM</pre>
 
As LMDZ works on a fixed grid (set when compiling), option "-d" is also almost always used to specify the number of grid points iimxjjmxlllm (where iim is the number of points along longitude, jjm is the number of points along latitude and llm the number of atmospheric layers).
 
As LMDZ works on a fixed grid (set when compiling), option "-d" is also almost always used to specify the number of grid points iimxjjmxlllm (where iim is the number of points along longitude, jjm is the number of points along latitude and llm the number of atmospheric layers).
  
13/05/2020
+
If compiling the 1D model, then only the number of layers (llm) needs be specified, e.g. <code>-d 78</code> to compile <code>lmdz1d</code>.
 +
 
 +
<pre>-j n</pre>
 +
With this option one can speed up compilation by letting <code>make</code> compile simultaneously (and if possible) up to <code>n</code> routines in parallel (note that this "parallel compilation" has nothing to do with the code being compiled for serial or parallel use as specified via option <code>-parallel ...</code>). In practice using <code>-j 8</code> or <code>-j 4</code> works well.
 +
 
 +
<pre>-parallel none/mpi/omp/mpi_omp</pre>
 +
This option is to specify whether the model should be compiled in serial mode (default) or in parallel using MPI (<code>mpi</code>) only, or using OpenMP (<code>omp</code>) only, or both MPI and OpenMP (<code>mpi_omp</code>).
 +
 
 +
In practice, one most often needs to run in parallel and using both MPI and OpenMP, so <code>-parallel mpi_omp</code> is advised.
 +
 
 +
<pre>-io ioipsl/mix/xios</pre>
 +
This option specifies which IO (Input/Output) library is going to be used by the model. Default is <code>-io ioipsl</code>, which is becoming depreciated for the GCM but mandatory for the 1D model. Note that when compiling with XIOS: <code>-io xios</code> on still needs to also use the IOIPSL library (which handles the reading of the run.def and companion files).
 +
 
 +
<pre>-full</pre>
 +
Impose a full cleanup (i.e. removing past object and library files) to ensure recompiling the model from scratch.
 +
 
 +
21/03/2022
  
 
[[Category:WhatIs]]
 
[[Category:WhatIs]]

Version actuelle en date du 21 mars 2022 à 11:43

The makelmdz_fcm script to compile LMDZ

The makelmdz_fcm script is the bash script that you use to compile LMDZ. This is where one sets various options (e.g which physics package to compile the model with, what grid resolution to use, etc.).

To list available options, run "makelmdz_fcm -h", which should return something like:

Usage :
makelmdz_fcm [options] -arch nom_arch exec
[-h]                       : brief help
[-d [[IMx]JMx]LM]          : IM, JM, LM are the dimensions in x, y, z (default: 96x72x19)
[-p PHYS]                  : set of physical parametrizations (in libf/phyPHYS), (default: lmd)
[-prod / -dev / -debug]    : compilation mode production (default) / developement / debug
[-c false/MPI1/OMCT]       : coupling with ocean model : MPI1/OMCT/false (default: false)
[-v false/orchidee2.0/orchidee1.9/true] : version of the vegetation model to include (default: false)
          false       : no vegetation model
          orchidee2.1 : compile using ORCHIDEE 2.1 (or more recent version)
          orchidee2.0 : compile using ORCHIDEE 2.0
          orchidee1.9 : compile using ORCHIDEE up to the version including OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6
          true        : (obsolete; for backward compatibility) use ORCHIDEE tag 1.9-1.9.6
[-chimie INCA/false]       : with INCA chemistry model or without (default: false)
[-cosp true/false]    : compile with/without cosp package (default: false)
[-cosp2 true/false]    : compile with/without cosp2 package (default: false)
[-cospv2 true/false]    : compile with/without cospv2 package (default: false)
[-inlandsis true/false]  : compile with/without inlandsis package (default: false)
[-rrtm true/false]    : compile with/without rrtm package (default: false)
[-rad old/rrtm/ecrad]    : compile with old/rrtm/ecrad radiatif code (default: old)
[-dust true/false]    : compile with/without the dust package by Boucher and co (default: false)
[-strataer true/false]    : compile with/without the strat aer package by Boucher and co (default: false)
[-isotopes true/false]    : compile with/without water isotopes in the physics
[-isoverif true/false]    : compile with/without verifications for water isotopes in the physics
[-diagiso true/false]    : compile with/without special diagnostics for water isotopes in the physics
[-isotrac true/false]    : compile with/without tracers of water isotopes in the physics
[-parallel none/mpi/omp/mpi_omp] : parallelism (default: none) : mpi, openmp or mixted mpi_openmp
[-g GRI]                   : grid configuration in dyn3d/GRI_xy.h  (default: reg, inclues a zoom)
[-io ioipsl/mix/xios]                   : Input/Output library (default: ioipsl)
[-include INCLUDES]        : extra include path to add
[-cpp CPP_KEY]             : additional preprocessing definitions
[-adjnt]                   : adjoint model, not operational ...
[-mem]                     : reduced memory dynamics (obsolete flag; always on in parallel mode)
[-filtre NOMFILTRE]        : use filtre from libf/NOMFILTRE (default: filtrez)
[-link LINKS]              : additional links with other libraries
[-j n]                     : active parallel compiling on ntask
[-full]                    : full recompiling 
[-libphy]                  : only compile physics package (no dynamics or main program)
[-fcm_path path]           : path to the fcm tool (default: tools/fcm/bin)
[-ext_src path]            : path to an additional set of routines to compile with the model
[-arch_path path]          : path to architecture files (default: arch)
 -arch nom_arch            : target architecture 
 exec                      : executable to build

The user must at the very least provide the name of the executable (typically "gcm") and the mandatory option "-arch" with the target architecture name (e.g. "local" or "gfortran_CICLAD").

Some extra info about various makelmdz_fcm options

-d IMxJMxLM

As LMDZ works on a fixed grid (set when compiling), option "-d" is also almost always used to specify the number of grid points iimxjjmxlllm (where iim is the number of points along longitude, jjm is the number of points along latitude and llm the number of atmospheric layers).

If compiling the 1D model, then only the number of layers (llm) needs be specified, e.g. -d 78 to compile lmdz1d.

-j n

With this option one can speed up compilation by letting make compile simultaneously (and if possible) up to n routines in parallel (note that this "parallel compilation" has nothing to do with the code being compiled for serial or parallel use as specified via option -parallel ...). In practice using -j 8 or -j 4 works well.

-parallel none/mpi/omp/mpi_omp

This option is to specify whether the model should be compiled in serial mode (default) or in parallel using MPI (mpi) only, or using OpenMP (omp) only, or both MPI and OpenMP (mpi_omp).

In practice, one most often needs to run in parallel and using both MPI and OpenMP, so -parallel mpi_omp is advised.

-io ioipsl/mix/xios

This option specifies which IO (Input/Output) library is going to be used by the model. Default is -io ioipsl, which is becoming depreciated for the GCM but mandatory for the 1D model. Note that when compiling with XIOS: -io xios on still needs to also use the IOIPSL library (which handles the reading of the run.def and companion files).

-full

Impose a full cleanup (i.e. removing past object and library files) to ensure recompiling the model from scratch.

21/03/2022