CROCO
(→BASIN) |
(→BASIN) |
||
Línea 118: | Línea 118: | ||
<PRE style="shell"> |
<PRE style="shell"> |
||
$ cp jobcomp jobcomp_orig |
$ cp jobcomp jobcomp_orig |
||
+ | $ diff jobcomp jobcomp_orig |
||
+ | 45c45 |
||
+ | < FC=ifort |
||
+ | --- |
||
+ | > FC=gfortran |
||
+ | </PRE> |
||
+ | |||
+ | And compile |
||
+ | <PRE style="shell"> |
||
+ | $ ./jobcomp > jobcomp.log |
||
</PRE> |
</PRE> |
||
Revisión de 15:05 15 jul 2025
Web page of the instalation of the ocean model CROCO in CIMA's HPC 'hydra'
Installation
CIMA's HPC has a common folder where all the people has access. This is going to be the place where CROCO model will be installed.
The installation is going to be in the following INSTALLDIR=/share/CROCO
folder.
Downloading the code (there is a GItlab repository, but by now, we are going to install closed releases)
$ wget https://gitlab.inria.fr/croco-ocean/croco/-/archive/v2.1.0/croco-v2.1.0.tar.gz
Creating the folder of the compilation (using intel compiler and shared memory dmpar) and where to deploy the code
$ mkdir $INSTALLDIR/v210 $ cd $INSTALLDIR/v210 $ mkdir -p intel/dmpar $ git clone --branch v2.1.0 https://gitlab.inria.fr/croco-ocean/croco.git croco-v2.1.0 Cloning into 'croco'... remote: Enumerating objects: 52646, done. remote: Counting objects: 100% (448/448), done. remote: Compressing objects: 100% (263/263), done. remote: Total 52646 (delta 268), reused 317 (delta 185), pack-reused 52198 (from 1) Receiving objects: 100% (52646/52646), 300.67 MiB | 4.59 MiB/s, done. Resolving deltas: 100% (40426/40426), done. Note: switching to '291e8cd11b2329ee171c7a02c52c9c481dda981e'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example: git switch -c <new-branch-name> Or undo this operation with: git switch - Turn off this advice by setting config variable advice.detachedHead to false $ ls croco GRIF create_config.bash OBSTRUCTION README.md TEST_CASES BENCH MPI_NOLAND OCEAN requirements.txt XIOS CHANGELOG.md MUSTANG PISCES SCRIPTS
Go to compile, first we set-up the environment for intel compilation
$ source /opt/load-libs.sh 1 The following libraries, compiled with Intel 2021.4.0 compilers, were loaded: * MPICH 3.4.2 * NetCDF 4 * HDF5 1.10.5 * JASPER 2.0.33 To change it please logout and login again. To load this libraries from within a script add this line to script: source /opt/load-libs.sh 1 $ cd croco
We create an ASCII file with the specificities of the compilation with intel in hydra, name CROCO_hydra_intel.env
(following the instructios from here tutorial 00)
#set environment variables for croco in HYDRA to be compiled with intel source /opt/load-libs.sh 1 export CC=icc export FC=ifort export F90=ifort export F77=ifort export NETCDF=/opt/netcdf/netcdf-4/intel/2021.4.0 export PATH=$NETCDF/bin::${PATH} export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}::${NETCDF}/lib
Loading the compilation environment
$ source CROCO_hydra_intel.env
BASIN
The simplest installation would be the 'basin' configuration. We follow these instructions basin. Assuming that the source code resides in CROCOsrc=/share/CROCO/v210/intel/dmpar/croco
$ CROCOsrc=/share/CROCO/v210/intel/dmpar/croco $ cd ${CROCOsrc} $ mkdir -p CONFIGS/BASIN cp OCEAN/cppdefs.h CONFIGS/BASIN cp OCEAN/param.h CONFIGS/BASIN cp OCEAN/jobcomp CONFIGS/BASIN cd CONFIGS/BASIN
We need to edit the configuration files.
Editing the file with the configuration
$ cp cppdefs.h cppdefs.h_orig $ diff cppdefs.h cppdefs.h_orig 18c18 < #define BASIN /* Basin Example */ --- > #undef BASIN /* Basin Example */ 56c56 < #undef REGIONAL /* REGIONAL Applications */ --- > #define REGIONAL /* REGIONAL Applications */
Editing the file with the size of the domain and configuration of the parallel environment
$ cp param.h param.h_orig $ diff param.h param.h_orig
Editing the file with the compilation
$ cp jobcomp jobcomp_orig $ diff jobcomp jobcomp_orig 45c45 < FC=ifort --- > FC=gfortran
And compile
$ ./jobcomp > jobcomp.log