Przeglądaj źródła

Fix for MPI compilation git status! LSG forced in most.c git status!

Pierre-Yves Barriat 2 lat temu
rodzic
commit
5b126acd46
4 zmienionych plików z 32 dodań i 8 usunięć
  1. 2 0
      README.md
  2. 1 6
      configure.sh
  3. 25 0
      modules.load
  4. 4 2
      most.c

+ 2 - 0
README.md

@@ -53,6 +53,8 @@ See the corresponding example below:
 Now, launch the model:
 
 ```bash
+cd /cofast/$USER/PlaSim
+source modules.load
 cd plasim/run
 screen
 ./most_plasim_run

+ 1 - 6
configure.sh

@@ -2,12 +2,7 @@
 
 [[ -z "$USER" ]] && echo "!! USER variable not set !!"
 
-if [ `hostname` = "coriolis" ]; then
-  [[ -z "$GLOBALSCRATCH" ]] && GLOBALSCRATCH="/cofast/$USER"
-  echo "Coriolis"
-  module purge
-  module load netCDF-Fortran/4.5.3-gompi-2021b netCDF-C++4/4.3.1-gompi-2021b ncview/2.1.8-gompi-2021b CDO/1.9.10-gompi-2021b
-fi
+source modules.load
 
 rm -f *.x most_* F90_*
 

+ 25 - 0
modules.load

@@ -0,0 +1,25 @@
+#!/bin/bash
+
+[[ -z "$USER" ]] && echo "!! USER variable not set !!"
+
+echo " "
+echo "Plasim environment"
+
+if [ `hostname` = "coriolis" ]; then
+  [[ -z "$GLOBALSCRATCH" ]] && GLOBALSCRATCH="/cofast/$USER"
+  echo "Coriolis"
+  module purge
+  module load netCDF-Fortran/4.5.3-gompi-2021b netCDF-C++4/4.3.1-gompi-2021b ncview/2.1.8-gompi-2021b CDO/1.9.10-gompi-2021b
+  module list
+fi
+
+if [[ $(hostname -s) == mb-* || $(hostname -s) == mback* ]]; then
+  hostname
+  [[ -z "$GLOBALSCRATCH" ]] && GLOBALSCRATCH="/globalscratch/ucl/elic/$USER"
+  module purge
+  module load releases/2018b
+  module load netCDF-C++4/4.3.0-intel-2018b netCDF-Fortran/4.4.4-intel-2018b 
+  module load UDUNITS/2.2.26-intel-2018b
+  module load NCO/4.7.9-intel-2018b
+  module load CDO/1.9.5-intel-2018b
+fi

+ 4 - 2
most.c

@@ -325,7 +325,7 @@ struct ItemStruct NL_list[NL_MAX_ITEMS];
 int BigEndian;
 int Oce;
 int Ice;
-int Lsg;
+int Lsg = 1;
 int SimStart;
 int SimYears;
 int nreadsr;
@@ -2029,6 +2029,7 @@ int Build(int model)
    if (Lsg)
    {
       fputs("cp -p ../../lsg/src/lsgmod.f90 .\n",fp);
+      fputs("cat lsgmod.f90\n",fp);
       putenv("OCEANCOUP=cpl");
    }
    else
@@ -2054,7 +2055,8 @@ int Build(int model)
       fputs(" ../../most_precision_options",fp);
    }
    fprintf(fp," make_%s > makefile\n",shomo);
-   fputs("make -e\n",fp);
+   fputs("source ../../modules.load\n",fp);
+   fputs("make\n",fp);
 
    fprintf(fp,"[ $? == 0 ] && cp %s.x ../bin/%s\n",shomo,exec_name);