MARS environnement : Recovery of an old configuration to build a new one

General definition of variables : REF_CONFIG and PREV_CONFIG in makefile

  • PREV_CONFIG (*used with gmake copyconfig*)
    • During the evolution of a configuration, the creation of a new configuration CONF-CASE and the use of “gmake copyconfig” :
      • allows to get exactly the same code as in configuration PREV_CONFIG (‘gmake copyconfig’ command copies user’s routines and Makefile.linux (or .datarmor) from directory PREV_CONFIG to $UDIR/CONF/CONF-CASE)
      • allows to keep a saving of configuration PREV_CONFIG
    • This command is used when updating a configuration with a new version of the reference code (the user get directly the routines he may have to update)
  • REF_CONFIG
    • Useful when several users use the same configuration
      • Only one user is in charge of updating the REF_CONFIG configuration
      • At each evolution of the reference MARS code, other users have to update their owns routines only
      • Routines of directory REF_CONFIG are directly copied from REF_CONFIG directory to the compiling directory : the user does not see them in $UDIR/CONF/CONF-CASE but he uses them
  • ATTENTION
    • The variables PREV_CONFIG and REF_CONFIG allow to manage the code but not the input files : they have an influence in directory $UDIR/CONF/CONF-CASE only
    • The user must copy namelists paraspec.txt, paramain.txt, paracom.txt, parasubs.txt, parasedim.txt and parabiolo.txt (+ output.dat file and mpi.txt) relative to the configuration PREV_CONFIG or REF_CONFIG
    • PREV_CONFIG : Makefile.linux files is copied from PREV_CONFIG directory –> update the path in INCDIR and CPP variables (Choice of CPP keys before compilation)
    • REF_CONFIG : Makefile.linux is not changed –> the user has to change it in order to use the same cpp keys and the same compiling options as the ones used in REF_CONFIG directory

Recovery of a previous configuration with PREV_CONFIG

    1. ssh -X -l *username* datarmor (connection to datarmor )
    1. mkconfdir MENOR V9.05 [3](3 if ranks ) (mkconfdir with ranks) (create directories for your configuration -here CONF= MENOR, CASE= V9.05, 3 ranks-)
    1. cd … (follow the screen directive) (to go in the directory $UDIR/CONFIG/CASE)
    1. gmake install (install the code for your configuration) (command gmake install)
    1. ** vi makefile** : * PREV_CONFIG =/export/home11/mars/CONFIG/MENOR/MARS/MARS_CONFIG/MENOR/MENOR-V9.05 (choose the name of the configuration you want to copy … without any blank at the end of the line)
    1. gmake copyconfig (Rk : all user’s routines of MENOR-V9.05 are copied to the configuration).
    1. vi Makefile.datarmor_rankX * update the file (if new cpp key or routines have been introduced in a new version of the reference code ) * compare with Makefile.datarmor_ref
    1. vi makefile and change rank=0,1 or 2 in order to compile the code for this rank
    1. gmake clean ; gmake (compilation) * to make sure you have the same code, compare smallf90 directory with PREV_CONFIG/smallf90 directory
    1. if modification of routines in the code by the user : * getfile WORK/routine.F90 (command getfile) * modification of routine.F90 * gmake

Recovery of a previous configuration with REF_CONFIG

WITHOUT Rank

    1. ssh -X -l *username* datarmor (connection to datarmor )
    1. mkconfdir MENOR V9.05 (mkconfdir with ranks) (create directories for your configuration -here CONF= MENOR, CASE= V9.05-)
    1. cd … (follow the screen directive) (to go in the directory $UDIR/CONFIG/CASE)
    1. vi makefile : * REF_CONFIG =/export/home11/mars/CONFIG/MENOR/MARS/MARS_CONFIG/MENOR/MENOR-V9.05 (choose the name of the configuration you wants to copy … without blank at the end of the line) * all user’s routines of MENOR-V9.05 are compiled but they are not copied in your directory $UDIR/CONF/CONF-CASE * NEVER ERASE REF_CONFIG DIRECTORY !!!!!
    1. vi Makefile.datarmor * Choose the same compiling options and cpp keys… as those in REF_CONFIG/Makefile.datarmor * If test case : cp REF_CONFIG/INC/parameters.F90_casXXX INC/.
    1. gmake install (install the code for your configuration) (command gmake install)
    1. gmake (compilation) * to make sure you have the same code, compare smallf90 directory with REF_CONFIG/smallf90 directory
    1. if modification of routines in the code by the user : * getfile WORK/routine.F90 (command getfile) * modification of routine.F90 * gmake

WITH Rank

    1. ssh -X -l *username* datarmor (connection to datarmor )
    1. mkconfdir MENOR V9.05 2 (mkconfdir with ranks) (create directories for your configuration -here CONF= MENOR, CASE= V9.05 2 ranks-)
    1. cd … (follow the screen directive) (to go in the directory $UDIR/CONFIG/CASE)
    1. vi makefile : * REF_CONFIG =/export/home11/mars/CONFIG/MENOR/MARS/MARS_CONFIG/calv/calv-V9.05 (choose the name of the configuration you wants to copy … without blank at the end of the line) * all user’s routines of MENOR-V9.05 are compiled but they are not copied in your directory $UDIR/CONF/CONF-CASE * NEVER ERASE REF_CONFIG DIRECTORY !!!!!
    1. get routines parameters.F90 of each rank * cp /export/home1/vgarnier/MARS_CONFIG/calv/calv-V9.05/INC/parameters.F90_rank INC/
    1. vi Makefile.datarmor_rankX * Choose the same compiling options and cpp keys… as those in REF_CONFIG/Makefile.datarmor
    1. gmake install (install the code for your configuration) (command gmake install)
    1. vi makefile and change rank=0,1 or 2 in order to compile the code for this rank
    1. gmake clean: gmake (compilation of each rank) * to make sure you have the same code, compare smallf90 directory with REF_CONFIG/smallf90 directory
    1. if modification of routines in the code by the user : * getfile WORK/routine.F90 (command getfile) * modification of routine.F90 * gmake