GEM 5.0 running : Différence entre versions
m (→b) Set up directory) |
m (→b) Set up directory) |
||
Ligne 14: | Ligne 14: | ||
For GEM4 with: '''. s.ssmuse.dot GEM/x/4.8.lts12''' or the alias '''4812''' | For GEM4 with: '''. s.ssmuse.dot GEM/x/4.8.lts12''' or the alias '''4812''' | ||
For GEM5 with: '''. r.load.dot GEM/x/5.0''' or the alias '''500''' | For GEM5 with: '''. r.load.dot GEM/x/5.0''' or the alias '''500''' | ||
+ | <br> | ||
+ | '''1) Open experiment'''<br> | ||
First you have to "'''open the experiment'''" to do the initial setup, create files to find original source code, creates links to the building directory and Makefiles etc. with: | First you have to "'''open the experiment'''" to do the initial setup, create files to find original source code, creates links to the building directory and Makefiles etc. with: | ||
'''ouv_exp_gem''' | '''ouv_exp_gem''' | ||
Ligne 19: | Ligne 21: | ||
You have to do this only once. <br> | You have to do this only once. <br> | ||
− | Then | + | '''2) Create dependency'''<br> |
− | + | Then you need to create the dependencies (which routines includes which include files and, vice versa, which include files are included in which routine). You need to '''redo this whenever you include another include file in a routine'''!!!: | |
− | + | '''make dep''' | |
− | + | <br> | |
+ | '''3) Compile'''<br> | ||
+ | Whenever you modified or added a routine you need to create the object file(s). If you added a subroutine all you need to do is | ||
+ | |||
+ | '''make obj''' (create object files) | ||
+ | '''make gemdm''' (create main GEM executable) | ||
Source code | Source code |
Version depuis le 17 de juin 2020 à 20:52
Matières
Creating the executable
a) Create directory
First create yourself a directory under your home(!) in which you want to create the executable.
I usually call mine:
~/gem/${GEM_version}/Abs/...
For GEM4: GEM_version=v_4.8.12.u
For GEM5: GEM_version=v_5.0.0
b) Set up directory
Go into the executable directory you created above.
Whenever you want to create/modify an executable you need to set the model environment first:
For GEM4 with: . s.ssmuse.dot GEM/x/4.8.lts12 or the alias 4812 For GEM5 with: . r.load.dot GEM/x/5.0 or the alias 500
1) Open experiment
First you have to "open the experiment" to do the initial setup, create files to find original source code, creates links to the building directory and Makefiles etc. with:
ouv_exp_gem rdemklink -v
You have to do this only once.
2) Create dependency
Then you need to create the dependencies (which routines includes which include files and, vice versa, which include files are included in which routine). You need to redo this whenever you include another include file in a routine!!!:
make dep
3) Compile
Whenever you modified or added a routine you need to create the object file(s). If you added a subroutine all you need to do is
make obj (create object files) make gemdm (create main GEM executable)
Source code Once you set the environment the variables $gemdyn and $rpnphy will get set, pointing to the source code in the environment: This will also allow you to access the source code in the environment under:
${gemdyn}/src/*/* ${rpnphy}/src/*/*
Listings
While the model is running is produces several listings. They all start with the name of the experiment, exp, followed by the year and month of the current month:
${exp}_YYYYMM_*
When starting a simulation with 'Chunk_lance' the output of the main 'chunk_job' will go into a listing called:
cjob_${exp}.n.*
While a month is running all listings will go into the directory:
~/listings/${TRUE_HOST}
At the end of a month all model listings (${exp}_YYYYMM_*) will get archived under:
${CLIMAT_archdir}/${exp}/Listings/listings_${exp}.zip
These are the different types of listings:
a) Model listings
- ${exp}_YYYYMM_S*
This is the output of the Scripts which prepare directories and update the config files. When starting a simulation with 'Um_lance' this output appears in the window in which you executed the command. When a simulation is started with 'Chunk_lance' or when a second month is launched automatically the output of the scripts get redirected into a listing with the name ${exp}_S*.
- ${exp}_YYYYMM_M*
This is the main model output.
When a model job is running, each MPI process will write is output in a separate file, so while a simulation is running you will only see the first part of the output in the listing. Close to the end you will find a line starting with:
INFO: temporary listings for all members in ...
Under that path you will find all the temporary process listings. Once a job finished all process listings will get added to the main model listing.
If you want to see the simulation advancing while it is running, you can execute the command 'u.tail' on the main model listing. It will do a 'tail -f' on the listing of the main MPI process:
u.tail ${exp}_YYYYMM_M...
Whenever there are problems with the model look for the error in the last of these two listings, which ever it may be, '_S' or '_M'. I usually execute something like:
ls -lrt ${exp}*_[MS][._]*
b) Post processing listings
Every now and then but at least at the end of timestep 0 and at the end of each job the model execute a a little job, preparing and submitting a post processing job. If you are not using 'superjobs' this post processing job will then run under the name:
${exp}_YYYYMM_DX...
- ${exp}_YYYYMM_PP0* and ${exp}_YYYYMM_PP*
Listing of the job creating and submitting the Post Processing job. If need be you can find in these listings the command to resubmit a post processing job. Look for 'soumet' close to the end.
The '_PP_' job is the last job, executed at the end of a job. If post processing jobs were submitted during a job their submitting job will be called '_PP0_'.
- ${exp}_YYYYMM_DX*
This is the listing of the main post processing job. You will see there the results of the combination of the files, the transfer (Xfer) in the archive and the calculation of the Diagnostics.
- ${exp}_YYYYMM_SR*
This is the listing of the Saveing of the Restart files, which will get saved at the end of each month.
- ${exp}_YYYYMM_SL*
This is the listing of the Saveing of the all Listings above.