Changes between Version 28 and Version 29 of Documentation/UserGuide/InstallingORCHIDEE


Ignore:
Timestamp:
05/29/20 06:53:29 (2 years ago)
Author:
bguenet
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/UserGuide/InstallingORCHIDEE

    v28 v29  
    88* It's best to install XIOS (the routines which manage input and output of the whole IPSL suite of models) first on your computer, and then compile ORCHIDEE with the same options.  Advice on installing XIOS on a personal computer is found here: https://forge.ipsl.jussieu.fr/igcmg_doc/wiki/Doc/ComputingCenters/LocalPC 
    99* If you have an account at LSCE, IDRIS or the TGCC computers, follow the procedure to download and compile ORCHIDEE as described here: [wiki:Documentation/UserGuide/InstallingORCHIDEEBasic]''' 
    10 * The text below contains more details about installing libraries and ORCHIDEE with gfortran on a personal Linux computer.  If the libraries already exist on your computer, you can may be able to use the above pages. 
     10* The text below contains more details about installing libraries and ORCHIDEE with gfortran on a personal Linux computer.  If the libraries already exist on your computer, you can use the above pages. 
    1111 
    1212This installation guide has been tested on a laptop computer using Ubuntu 16.04 version. 
     
    1414Follow the steps below and you should be able to compile and launch ORCHIDEE on a single processor for a single site. 
    1515 
    16 ORCHIDEE can be installed in serial (single processor) or parallel (multiple processors) mode. This installation is oriented for parallel installation, which is the default, and MPI libraries are mature enough that they typically install easily. One can always run ORCHIDEE with a single processor even if the compilation was done for a parallel mode, but the opposite is not true (a serial executable cannot be run on multiple processors).  The installation requires a few packages to be installed on the system before starting installation of ORCHIDEE. These are: 
     16ORCHIDEE can be installed in serial (single processor) or parallel (multiple processors) mode. This installation is oriented for parallel installation, which is the default, and MPI libraries are mature enough that they typically install easily. One can always run ORCHIDEE with a single processor even if the compilation was done for a parallel mode, but the opposite is not possible (a serial executable cannot be run on multiple processors).  The installation requires a few packages to be installed on the system before starting installation of ORCHIDEE. These are: 
    1717 
    1818* szlib 
     
    2525 
    2626 
    27 The list of packages should be installed in the order listed above.  note that many of these packages come pre-installed on many Linux distributions.  A common way to check can be done by checking if the netcdf installation has links to the other packages. 
    28  
    29 {{{ 
    30 > nc-config --has-szlib 
    31 > nc-config --has-hdf5 
    32 > nc-config --has-parallel 
    33 > nc-config --has-fortran 
    34 }}} 
     27The list of packages should be installed in the order listed above.  Note that many of these packages come pre-installed on many Linux distributions and if links between packages is needed it is generally done by default.  A common way to check can be done by checking if the netcdf installation has links to the other packages. 
     28 
     29{{{ 
     30nc-config --has-szlib 
     31nc-config --has-hdf5 
     32nc-config --has-parallel 
     33nc-config --has-fortran 
     34}}} 
     35 
    3536 
    3637If you do not have nc-config, then you must install the NetCDF library: 
     
    4041 
    4142=== 1.a Package installation (not tested) === 
    42 NetCDF is currently available as a package for many Linux distributions. For Ubuntu, for example, a package exists. Make sure that the netcdf is compiled with the same compiler as with you'll compile ORCHIDEE (here, gfortan). This installation has not yet been tested, but try it (with apt-get or whatever package manager exists on your distribution).  If it works, go to step 2. 
     43NetCDF is currently available as a package for many Linux distributions. For Ubuntu, for example, a package already exists. Make sure that the netcdf is compiled with the same compiler as with you'll compile ORCHIDEE (here, gfortan). This installation has not yet been tested, but try it (with apt-get or whatever package manager exists on your distribution).  If it works, go to step 2 
    4344 
    4445 
     
    5051 
    5152Download netcdf-c : 
    52 Open a terminal and type the following command (> represents the command prompt and should not be typed) to download the latest NetCDF version (as of the time of writing, 4.7.3 is the most recent) :  
    53 {{{ 
    54     >   wget https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-c-4.7.3.tar.gz 
     53Open a terminal and type the following command to download the latest NetCDF version (as of the time of writing, 4.7.3 is the most recent) :  
     54{{{ 
     55wget https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-c-4.7.3.tar.gz 
    5556}}} 
    5657Older versions can be download with: 
    5758{{{ 
    58     >   wget https://github.com/Unidata/netcdf-c/archive/X.Y.Z.tar.gz 
     59wget https://github.com/Unidata/netcdf-c/archive/X.Y.Z.tar.gz 
    5960}}} 
    6061(where X, Y, and Z are 4.6.1, for example, or 4.7.0). 
     
    6263Extract the archive : 
    6364{{{ 
    64     >    tar -xvzf netcdf-c-X.Y.Z.tar.gz 
     65tar -xvzf netcdf-c-X.Y.Z.tar.gz 
    6566}}} 
    6667A directory called netcdf-c-X.Y.Z will be created. Go inside it : 
    6768{{{ 
    68     >    cd  netcdf-c-X.Y.Z 
     69cd  netcdf-c-X.Y.Z 
    6970}}} 
    7071 
     
    7475 
    7576{{{ 
    76       >  ./configure  --help 
     77./configure  --help 
    7778}}} 
    7879 
     
    8283 
    8384{{{ 
    84 > ./configure 
     85./configure 
    8586}}} 
    8687 
     
    138139To complete the installation, type : 
    139140{{{ 
    140       sudo su 
     141      sudo su 
    141142}}} 
    142143On Fedora : 
    143144{{{ 
    144       su 
     145      su 
    145146}}} 
    146147Enter your password then execute the following commands in order: 
    147148 
    148149{{{ 
    149       > make 
     150      make 
    150151}}} 
    151152( compiles NetCDF on your computer) 
    152153Then 
    153154{{{ 
    154       > make check 
     155      make check 
    155156}}} 
    156157( tests the compilation ) 
     
    159160 
    160161{{{ 
    161       > make install 
     162      make install 
    162163}}} 
    163164(copies the files to their final destination) 
     
    194195 
    195196{{{ 
    196      rm -rf netcdf-c-X.Y.Z.tar.gz netcdf-c-X.Y.Z 
     197     rm -rf netcdf-c-X.Y.Z.tar.gz netcdf-c-X.Y.Z 
    197198}}} 
    198199 
     
    211212The first step to installing ORCHIDEE is thus to install the modipsl environment into a folder.  This folder will eventually hold your ORCHIDEE model source code and the configuration files to run the simulation:   
    212213{{{ 
    213       svn co http://forge.ipsl.jussieu.fr/igcmg/svn/modipsl/trunk MYDIRECTORY 
     214      svn co http://forge.ipsl.jussieu.fr/igcmg/svn/modipsl/trunk MYDIRECTORY 
    214215}}} 
    215216 
     
    218219You can install a public or a private version of ORCHIDEE. [wiki:HowTo/InstallingORCHIDEEBasic Read more about installing different versions of ORCHIDEE.] To install the latest tagged version (tagged versions are major releases): 
    219220{{{ 
    220       > cd MYDIRECTORY/util 
    221       > ./model ORCHIDEE_trunk 
     221      cd MYDIRECTORY/util 
     222      ./model ORCHIDEE_trunk 
    222223}}} 
    223224 
    224225To install older tagged version (e.g., 2.1 or 2.0): 
    225226{{{ 
    226       > cd MYDIRECTORY/util 
    227       > ./model ORCHIDEE_2_1 
     227      cd MYDIRECTORY/util 
     228      ./model ORCHIDEE_2_1 
    228229      or 
    229       > ./model ORCHIDEE_2_0 
     230      ./model ORCHIDEE_2_0 
    230231}}} 
    231232 
     
    247248The target architecture will be: gfortran 
    248249 
    249 You may see the various environment configurations for ORCHIDEE in "modipsl/util/" by: 
    250 {{{ 
    251     > vi AA_make.gdef 
    252 }}} 
     250You may see the various environment configurations for ORCHIDEE by: 
     251{{{ 
     252cd modipsl/util/ 
     253vi AA_make.gdef 
     254}}} 
     255 
    253256 
    254257The configuration is declared between lines 325-349 for "gfortran" in [http://forge.ipsl.jussieu.fr/igcmg/browser/modipsl/trunk/util/AA_make.gdef?rev=448 AA_make.gdef using modipsl revision 4448]. 
    255258 
    256 Create makefiles with the specific target for compiler '''gfortran''', first modify if necessary the path to netcdf and then use the command ./ins_make -t gfortran to create makefiles : 
    257  
    258 {{{ 
    259     > vi AA_make.gdef   # modify eventually following lines ( The modifications can be seen by + and - at the left column of the text below ) 
     259Create makefiles with the specific target for compiler '''gfortran''', first modify if necessary the path to netcdf and then use the command  
     260{{{ 
     261./ins_make -t gfortran 
     262}}} 
     263to create makefiles : 
     264 
     265{{{ 
     266    vi AA_make.gdef   # modify eventually following lines ( The modifications can be seen by + and - at the left column of the text below, delete the line with – and add the line with + ) 
    260267         @@ -304,16 +304,16 @@ 
    261268 #-Q- gfortran  M_K = make 
     
    289296 #-Q- lxiv8    FCM_ARCH=ifort_LSCE 
    290297    
    291     > ./ins_make -t gfortran    # This step is where you define thee target architecture that you want to use for installation ( in our case gfortran) 
     298    ./ins_make -t gfortran    # This step is where you define thee target architecture that you want to use for installation ( in our case gfortran) 
    292299}}} 
    293300 
     
    296303 
    297304{{{ 
    298      > cd modipsl/modeles 
    299      > cp XIOS/arch/arch-GCC_LINUX.env XIOS/arch/arch-gfortran.env 
    300      > cp XIOS/arch/arch-GCC_LINUX.fcm XIOS/arch/arch-gfortran.fcm 
    301      > cp XIOS/arch/arch-GCC_LINUX.path XIOS/arch/arch-gfortran.path 
    302      > touch ORCHIDEE/arch/arch-gfortran.fcm 
    303      > touch ORCHIDEE/arch/arch-gfortran.path 
     305     cd modipsl/modeles 
     306     cp XIOS/arch/arch-GCC_LINUX.env XIOS/arch/arch-gfortran.env 
     307     cp XIOS/arch/arch-GCC_LINUX.fcm XIOS/arch/arch-gfortran.fcm 
     308     cp XIOS/arch/arch-GCC_LINUX.path XIOS/arch/arch-gfortran.path 
     309     touch ORCHIDEE/arch/arch-gfortran.fcm 
     310     touch ORCHIDEE/arch/arch-gfortran.path 
    304311}}} 
    305312 
     
    313320- In my case, installation gave an error where it did not read c++ type comments in fortran files, therefore, I needed to include a library in fortran part hence the compiler could read c++ type comments in fortran compilation.  
    314321 
     322To modify them, go through the steps below.  
    315323 
    316324In the XIOS folder: 
     
    439447{{{ 
    440448 
    441    > cd modipsl/config/ORCHIDEE_OL 
    442    > ./make with_xios 
     449   cd modipsl/config/ORCHIDEE_OL 
     450   ./make with_xios 
    443451}}} 
    444452- '''./make''' can be '''./gmake''' (or some other alias) in certain systems, you should verify what you have in your system, or ask to your system administrator about what they use.