.. _doc.envir_updateconfig: MARS environnement : Update a configuration ============================================== You have already one configuration which has been installed with one version of the MARS code. You have modified some routines and you want now to update the code, i.e. use a new version of MARS code and get your modified routines in the updated configuration. * 1. **change the number of reference code version** in **.cshrc.datarmor** (or env_MARS_VX.XX) :: setenv HOMEMARS /export/home11/mars/CODE_MARS/CODE_MARS_V9/V9.05/Mars_Agrif2 * 2. **Verify you have in .cshrc.datarmor** : :: setenv HTTPSVNROOT https://forge.ifremer.fr/svn/mars3d setenv extranet_login *yours* (Set your extranet_login name instead of *yours*) * 3. **Run .cshrc.datarmor** typing : :: source .cshrc.datarmor * 4. **Create a new configuration** (:ref:`doc.envir_newconfig`) : :: mkconfdir MENOR V9.05 (CONFIG=MENOR, new case or new version : V9.05) cd ... (follow the screen directive) gmake install (install the code for your configuration) vi makefile : PREV_CONFIG = */export/home1/vgarnier/MARS_CONFIG/MENOR/MENOR-old* gmake copyconfig vi Makefile.datarmor[_rankX] update if new cpp key or routines have been introduced in the new version (compare to Makefile.datarmor_ref) .. note:: WARNING : No gmake at this step * 5. **Update user's routines** Update without SubVersioN -------------------------- * 5a - notice which user’s routines has been modified in reference MARS code | (the list of modified routines is published at each new version – or compare the routines between the old and the new $HOMEMARS)   * 5b - visualize the modifications introduced by the user :: vimdiff WORK/routine.F90 $HOMEMARS/../Mars_Agrif2_old/...../routine.F90 * 5c - visualize the modifications introduced into the new reference version in comparison to the old reference version :: vimdiff $HOMEMARS/../Mars_Agrif2_XXX/...../routine.F90 $HOMEMARS/../Mars_Agrif2_old/...../routine.F90   * 5d - * 1st case : the number of modifications introduced by the user is small * ---> **getfile WORK/routine.F90** (:ref:`doc_getfile`) (get the routine of the new reference code because the code has not been compiled yet) * ---> introduce user’s modifications   * 2nd case : the number of modifications introduced by the user is larger that the number of modifications introduced into the new reference code * ---> introduce modifications of the new reference code into the user’s routine   * 6. choice CPP Keys (in Makefile_datarmor) (:ref:`doc.manual.clesCPP`) then **gmake** * 7. **cd $RDIR/CONF/CASE** * 8. update files **paramain.txt… under $RDIR/CONF/CONF-CASE** * 9. Run the new configuration and the old one in sequential with no optimization - option de compilation (FLAG = -r8 –O0) Update with SubversioN ----------------------- * install and update user's routines with the following command which updates all the routines of the current tree from an old revision XXX to the current one YYY using SubVersioN (you need a client of SubVersioN installed on your machine. Available under datarmor for all the users) : :: gmake update "OLDREV=XXX" "NEWREV=YYY" | (check the number into **$HOMEMARS/../DOC/list_version** -FIRST COLUMN- ) | | [vi $HOMEMARS/../DOC/list_version to get XXX YYY relative to the old and new versions] * 6. resolve conflicts for routines described by **“C”** * a – open 3 windows * b – windows 1 : visualize modifications introduced by the user in old version :: setenv HOMEMARS /export/home11/mars/CODE_MARS/V7.71 (only in this window) cmpfile routine.F90 * c – windows 2 : visualize modifications introduced into the new reference version by comparison to the old reference version :: vimdiff $HOMEMARS/...../routine.F90 /export/home11/mars/CODE_MARS/V7.71/Mars_Agrif2/…/routine.F90 * d – windows 3 : correct user’s changes taking care of the modifications added in the reference code. * Delete warning comments relative to the merge (<<<<.working ; >>>>.merge.right.rXXX ; >>>>>>.merge.left.rXXX) * 7. choice CPP Keys (in Makefile_datarmor) (:ref:`doc.manual.clesCPP`) then **gmake** * 8. **cd $RDIR/CONF/CASE** * 9. update files **paramain.txt… under $RDIR/CONF/CONF-CASE** * 10. Run the new configuration and the old one in sequential with no optimization - option de compilation (FLAG = -r8 –O0)