source: LMDZ5/branches/IPSLCM6.0.12/tools/run_para.sh @ 3855

Last change on this file since 3855 was 2650, checked in by fhourdin, 8 years ago

Supression commentaire inutile

  • Property svn:executable set to *
File size: 1.4 KB
Line 
1#!/bin/bash
2
3export OMP_STACKSIZE=800M  # Max stack size for open MP
4export OMP_NUM_THREADS=$2  # Number of openMP processes (threads)
5ulimit -s unlimited        # Allowing illimted memory for ...
6mkdir -p WORK$$ ; mv *_0*nc WORK$$ # saving old files
7
8dir_tools=`echo $0 | sed -e s:\`basename $0\`::`
9modipsl=`cd $dir_tools ; ( pwd | sed -e 's:modipsl.*.$:modipsl:' )`
10if [ ! -d $modipsl/modeles/LMDZ5 ]  ; then
11   echo Dans $0
12   echo Probleme pour indentifier l arborescence modipsl
13   exit
14fi
15
16# On recupere le chemin pour mpirun dans arch.fcm
17mpirun=`head -1 $modipsl/modeles/LMDZ5/arch.fcm | awk ' { print $2 } ' | sed -e 's/mpif90/mpirun/'`
18$mpirun  -np $1 $3
19
20#############################################################################
21# Reconstructing netcdf files from fragments comming from parallel execution
22# file_0000.nc file_0001.nc ... > file.nc
23# Using the rebuild commend available on ..../modipsl/bin/rebuild
24#############################################################################
25
26for f in `ls *_0000.nc` ; do
27   file=`echo $f | sed -e 's/_0000.nc//'` ; echo Rebuild for $file
28   if [ -f $file.nc ] ; then
29       echo The $file.nc file already exists
30       echo remove it and run
31       echo $modipsl/bin/rebuild -o $file.nc ${file}_0*.nc
32       echo manually
33   else
34      $modipsl/bin/rebuild -o $file.nc ${file}_0*.nc
35      if [ -f $file.nc ] ; then \rm -f ${file}_0*.nc ; fi
36   fi
37done
Note: See TracBrowser for help on using the repository browser.