Difference between revisions of "DYNAMICO with LMDZ physics"

From Planets
Jump to: navigation, search
m (Compiling DYNAMICO with a LMDZ physics package)
(Explaining a known issue and how to fix it)
 
(4 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
*compile_irene-amd
 
*compile_irene-amd
  
You can change the file, which looks like this:
+
It might be wise to make a copy, i.e.:
 +
<syntaxhighlight lang="bash">
 +
cp compile_adastra-gnu compile
 +
</syntaxhighlight>
 +
 
 +
You can then edit the file to match your architecture (the '''arch''' parameter).
 +
The file should look like this:
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
# Simple example of launching the make_icosa_lmdz script with adequate options adapt to fit your own needs.
 
 
 
arch=ifort_MESOIPSL # change according to your arch file
 
arch=ifort_MESOIPSL # change according to your arch file
  
Line 30: Line 34:
  
 
Using the '''-full''' option, the script '''make_icosa_lmdz''' will compile:
 
Using the '''-full''' option, the script '''make_icosa_lmdz''' will compile:
* IOIPSL
+
* [[IOIPSL]]
* XIOS
+
* [[XIOS]]
* LMDZ.COMMON (your physics)
+
* [[Quick_Install_and_Run|LMDZ.COMMON (your physics)]]
* ICOSOAGCM (DYNAMICO)
+
* [[DYNAMICO|ICOSAGCM (DYNAMICO)]]
  
 
and then link everything in the '''ICOSA_LMDZ/bin''' folder, under the name of the executable '''icosa_lmdz.exe'''.
 
and then link everything in the '''ICOSA_LMDZ/bin''' folder, under the name of the executable '''icosa_lmdz.exe'''.
Line 39: Line 43:
 
If you use the ''' -nodeps''' option, XIOS and IOIPSL will *not* be compiled.
 
If you use the ''' -nodeps''' option, XIOS and IOIPSL will *not* be compiled.
  
The script may continue even if an error occurred, so be sure to check the full output for errors (if the compilation of the physics package failed for example).
+
The script should stop at each step of the compilation if it fails (for example the compilation of the physics package).
 +
 
 +
You can also compile each step on its own and remove the '''-full''' option (you can keep the '''-nodeps''' option) (please click on each package name for its page).
 +
 
 +
=== Known issues ===
 +
 
 +
If you obtain an error of the type:
 +
<pre>
 +
XIOS/src/io/netcdf.hpp:20:12: fatal error: netcdf_par.h: Aucun fichier ou dossier de ce nom
 +
  20 | #  include <netcdf_par.h>
 +
      |            ^~~~~~~~~~~~~~
 +
compilation terminated.
 +
</pre>
 +
 
 +
This is due to the parallel version of netcdf not being recognized by the compilation module, typically for XIOS.
 +
In that case, please open the '''arch.path''' file used by the module and change the path pointing to '''netcdf_par.h'''. The default path should look like this:
 +
<pre>
 +
NETCDF_INCDIR="$(nc-config --cflags) $(nf-config --fflags) -I/usr/lib/x86_64-linux-gnu/netcdf/mpi/include"
 +
</pre>
 +
You can find the path where '''netcdf_par.h''' is located via:
 +
<pre>
 +
locate netcdf_par.h
 +
</pre>
 +
And you can set the '''new_path''' found (without '''netcdf_par.h''') like this:
 +
<pre>
 +
NETCDF_INCDIR="$(nc-config --cflags) $(nf-config --fflags) -Inew_path"
 +
</pre>
  
 
== Running DYNAMICO with a physics package ==
 
== Running DYNAMICO with a physics package ==
  
 
Please refer to
 
Please refer to
* [[Venus - DYNAMICO]]
+
* [[Venus_-_DYNAMICO#Running_Venus_-_DYNAMICO|Venus - DYNAMICO]]
 
* [[Mars Dynamico Installation manual|Mars - DYNAMICO]]
 
* [[Mars Dynamico Installation manual|Mars - DYNAMICO]]
 
for specific details over each physics package.
 
for specific details over each physics package.

Latest revision as of 16:31, 20 November 2024

Please read the DYNAMICO installation process first.

Compiling DYNAMICO with a LMDZ physics package

Once you have downloaded DYNAMICO into the ICOSAGCM/ folder, go to the ICOSA_LMDZ folder and compile there using one of the compile example files:

  • compile_adastra-gnu
  • compile_irene-amd

It might be wise to make a copy, i.e.:

cp compile_adastra-gnu compile

You can then edit the file to match your architecture (the arch parameter). The file should look like this:

arch=ifort_MESOIPSL # change according to your arch file

# Gas Giants/generic:
make_icosa_lmdz -p std -p_opt "-b 17x23" -parallel mpi -arch ${arch} -arch_path ../ARCH -job 8  -full #-nodeps

# Venus:
#make_icosa_lmdz -p venus -parallel mpi -arch ${arch} -arch_path ../ARCH -job 8 -full #-nodeps

# Mars:
# make_icosa_lmdz -p mars -parallel mpi -arch ${arch} -arch_path ../ARCH -job 8 -full #-nodeps

# Pluto:
# make_icosa_lmdz -p pluto -p_opt "-b 17x23" -parallel mpi -arch ${arch} -arch_path ../ARCH -job 8 -full #-nodeps

You can change the options such as the parallel version you will use (-parallel mpi or mpi_omp) and the parameters for the physics package (with the -p_opt options, for example -d 48x32x50 to specify a resolution, see Quick_Install_and_Run#Compiling_the_GCM).

Using the -full option, the script make_icosa_lmdz will compile:

and then link everything in the ICOSA_LMDZ/bin folder, under the name of the executable icosa_lmdz.exe.

If you use the -nodeps option, XIOS and IOIPSL will *not* be compiled.

The script should stop at each step of the compilation if it fails (for example the compilation of the physics package).

You can also compile each step on its own and remove the -full option (you can keep the -nodeps option) (please click on each package name for its page).

Known issues

If you obtain an error of the type:

XIOS/src/io/netcdf.hpp:20:12: fatal error: netcdf_par.h: Aucun fichier ou dossier de ce nom
   20 | #  include <netcdf_par.h>
      |            ^~~~~~~~~~~~~~
compilation terminated.

This is due to the parallel version of netcdf not being recognized by the compilation module, typically for XIOS. In that case, please open the arch.path file used by the module and change the path pointing to netcdf_par.h. The default path should look like this:

NETCDF_INCDIR="$(nc-config --cflags) $(nf-config --fflags) -I/usr/lib/x86_64-linux-gnu/netcdf/mpi/include"

You can find the path where netcdf_par.h is located via:

locate netcdf_par.h

And you can set the new_path found (without netcdf_par.h) like this:

NETCDF_INCDIR="$(nc-config --cflags) $(nf-config --fflags) -Inew_path"

Running DYNAMICO with a physics package

Please refer to

for specific details over each physics package.