Différences entre versions de « MITgcm »

De POLR
Sauter à la navigation Sauter à la recherche
(Page créée avec « = Introduction = Coming soon [http://mitgcm.org/] = User Guide = == '''Get the code'''== To install MITgcm in your account, please place you to : /share/work/user_name... »)
 
 
(13 versions intermédiaires par 3 utilisateurs non affichées)
Ligne 5 : Ligne 5 :
  
 
= User Guide =
 
= User Guide =
== '''Get the code'''==
+
== Get the code==
  
 
To install MITgcm in your account, please place you to : /share/work/user_name
 
To install MITgcm in your account, please place you to : /share/work/user_name
Ligne 22 : Ligne 22 :
 
A list of verifications available can be found here: [http://mitgcm.org/viewvc/MITgcm/MITgcm/verification/]
 
A list of verifications available can be found here: [http://mitgcm.org/viewvc/MITgcm/MITgcm/verification/]
  
 
+
==Play with verification==
=='''Play with verification'''==
 
  
 
1- Place you to /share/work/user_name/MITgcm and create a folder '''run''', and place you into (you can add a subfolder with the name of the specific verification you will use)
 
1- Place you to /share/work/user_name/MITgcm and create a folder '''run''', and place you into (you can add a subfolder with the name of the specific verification you will use)
Ligne 33 : Ligne 32 :
  
 
  build  code_ad  CVS    input_ad  README  run
 
  build  code_ad  CVS    input_ad  README  run
  code  code_oad  input  input_oad  results
+
  code  code_oad  input  input_oad  results
  
 
== Compilation==
 
== Compilation==
Ligne 44 : Ligne 43 :
 
   cd ..
 
   cd ..
  
 +
You also need to verify that all the packages required for the compilation of the verifications are in the MITgcm/pkg folder.
 +
If it is not the case, make a symbolic link between your /pkg verifications folder and MITgcm/pkg as example :
 +
ln -s /share/work/user_name/MITgcm/MITgcm_contrib/darwin2/pkg/* .  ''# If you are in  MITgcm/pkg''
 +
 +
==Run the model==
 
3- Prepare your test_case folder, and copy-past or make a symbolic link the '''input''' data you will need to run it after compilation
 
3- Prepare your test_case folder, and copy-past or make a symbolic link the '''input''' data you will need to run it after compilation
 
  mkdir test_case  
 
  mkdir test_case  
Ligne 53 : Ligne 57 :
 
(you may have to modify on the '''prepare_run''' file ligne 10: dir: ../../input or other place where the data will be read)
 
(you may have to modify on the '''prepare_run''' file ligne 10: dir: ../../input or other place where the data will be read)
  
   ln -s ../../build/mitgcmuv .  ''Make a symbolic link with the executable
+
   ln -s ../../build/mitgcmuv .  ''Make a symbolic link with the executable''
.''
 
  
 
4- Create a /tmp folder to take care of the pickup file.
 
4- Create a /tmp folder to take care of the pickup file.
  
 +
4bis- If you run your model with a launch file (''launch.sh''), copy paste it here
  
 
5- You are ready to run the model:
 
5- You are ready to run the model:
   ./mitgcmuv > output.txt
+
   ./mitgcmuv > output.txt OR  qsub launch.sh
 +
For the last method you can use then ''qstat -u'' to see how your run is going
  
 
==Generated files==
 
==Generated files==
 +
coming soon
 +
 +
==Packages==
 +
Coming soon
 +
 +
== Diagnostics==
 +
Coming soon
 +
 +
== Tools box ==
 +
 +
=== Launch file ===
 +
Here you can find a launch.sh type file that you may copy paste and modify
 +
#!/bin/bash
 +
#
 +
#PBS -l walltime='''24:00:00'''      # Time that I want to allow for my run
 +
#PBS -q default
 +
#PBS -N '''NAME'''                  # Name of my run that I will see if I do ''qstat''
 +
#PBS -r n
 +
#PBS -l nodes=1:ppn=1                # Need to be equal with the nPx and nPy specified in Size.h
 +
#PBS -e Run.stderr
 +
#PBS -o Run.stdout
 +
echo "start from HERE"`date`
 +
echo "Host="`hostname`
 +
cat $PBS_NODEFILE | sort | uniq
 +
HOMEDIR=$PBS_O_WORKDIR
 +
cd $HOMEDIR
 +
cat $PBS_NODEFILE > hostname-run
 +
RUNDIR=$(basename $PBS_O_WORKDIR)
 +
module add gcc/4.9.2
 +
module add dot
 +
module load openmpi/1.8.3_new-gcc-4.9.2
 +
time mpirun --bind-to hwthread -np 1 --mca mpi_yield_when_idle 0  --mca btl tcp,sm,self  mitgcmuv
 +
echo "" ; echo "run ended at: "`date`
 +
cd $HOMEDIR
 +
 +
 +
[[Category:Modèles numériques]]
 +
[[Category:MITgcm]]
 +
[[Category:COFFRE]]

Version actuelle datée du 9 avril 2020 à 15:40

Introduction

Coming soon [1]

User Guide

Get the code

To install MITgcm in your account, please place you to : /share/work/user_name

   export CVSROOT=':pserver:cvsanon@mitgcm.org:/u/gcmpack'
   cvs login 
     ( enter the CVS password: "cvsanon" )
   cvs co -P MITgcm

If you want a specific verification to play with, place you to :/share/work/user_name/MITgcm/verification

cvs co -P -d verif_name MITgcm/verification/verif_name .

!!! Pay attention this can download a second time all the MITgcm model...

A list of verifications available can be found here: [2]

Play with verification

1- Place you to /share/work/user_name/MITgcm and create a folder run, and place you into (you can add a subfolder with the name of the specific verification you will use)

2- Copy paste in this folder the verification that you want to play with

  cp -r /share/work/user_name/MITgcm/verification/verif_name/* .

If you are at the right place (/share/work/user_name/MITgcm/run/[subfolders]) an that you copy paste correctly you should found the following folders:

build  code_ad   CVS    input_ad   README   run
code   code_oad  input  input_oad  results

Compilation

From here you will be able to compile the code:

 cd build
 ../../../tools/genmake2 -mods ../code
 make depend
 make
 cd ..

You also need to verify that all the packages required for the compilation of the verifications are in the MITgcm/pkg folder. If it is not the case, make a symbolic link between your /pkg verifications folder and MITgcm/pkg as example :

ln -s /share/work/user_name/MITgcm/MITgcm_contrib/darwin2/pkg/* .  # If you are in  MITgcm/pkg

Run the model

3- Prepare your test_case folder, and copy-past or make a symbolic link the input data you will need to run it after compilation

mkdir test_case 
  mkdir test_1
    cd test_1
     cp -r /share/work/user_name/MITgcm/run/verif_name/input/* .   OR  ln -s ../../input/* .
      ../../input_ad/prepare_run  

(you may have to modify on the prepare_run file ligne 10: dir: ../../input or other place where the data will be read)

 ln -s ../../build/mitgcmuv .   Make a symbolic link with the executable

4- Create a /tmp folder to take care of the pickup file.

4bis- If you run your model with a launch file (launch.sh), copy paste it here

5- You are ready to run the model:

 ./mitgcmuv > output.txt  OR  qsub launch.sh

For the last method you can use then qstat -u to see how your run is going

Generated files

coming soon

Packages

Coming soon

Diagnostics

Coming soon

Tools box

Launch file

Here you can find a launch.sh type file that you may copy paste and modify

#!/bin/bash
#
#PBS -l walltime=24:00:00      # Time that I want to allow for my run
#PBS -q default
#PBS -N NAME                   # Name of my run that I will see if I do qstat
#PBS -r n
#PBS -l nodes=1:ppn=1                # Need to be equal with the nPx and nPy specified in Size.h
#PBS -e Run.stderr
#PBS -o Run.stdout
echo "start from HERE"`date`
echo "Host="`hostname`
cat $PBS_NODEFILE | sort | uniq
HOMEDIR=$PBS_O_WORKDIR
cd $HOMEDIR
cat $PBS_NODEFILE > hostname-run
RUNDIR=$(basename $PBS_O_WORKDIR) 
module add gcc/4.9.2
module add dot
module load openmpi/1.8.3_new-gcc-4.9.2
time mpirun --bind-to hwthread -np 1 --mca mpi_yield_when_idle 0  --mca btl tcp,sm,self  mitgcmuv
echo "" ; echo "run ended at: "`date`
cd $HOMEDIR