3
#============================================================================
5
# This file is part of the Code_Saturne Kernel, element of the
6
# Code_Saturne CFD tool.
8
# Copyright (C) 1998-2009 EDF S.A., France
10
# contact: saturne-support@edf.fr
12
# The Code_Saturne Kernel is free software; you can redistribute it
13
# and/or modify it under the terms of the GNU General Public License
14
# as published by the Free Software Foundation; either version 2 of
15
# the License, or (at your option) any later version.
17
# The Code_Saturne Kernel is distributed in the hope that it will be
18
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
19
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
# GNU General Public License for more details.
22
# You should have received a copy of the GNU General Public License
23
# along with the Code_Saturne Kernel; if not, write to the
24
# Free Software Foundation, Inc.,
25
# 51 Franklin St, Fifth Floor,
26
# Boston, MA 02110-1301 USA
28
#============================================================================
30
########################################################################
32
# BATCH FILE FOR THE CCRT (Platine under LSF)
33
# ===========================================
37
#BSUB -o nameandcaseo.%J
38
#BSUB -e nameandcasee.%J
41
# -n : number of processors
42
# -W : walltime as hh:mm
43
# -o : output file name
44
# -e : error file name
47
# ------------------------------------------------------------------
49
# BATCH FILE FOR THE Chatou CLUSTER (PBS)
50
# =======================================
53
#PBS -l walltime=1:00:00
59
# nodes : number of nodes
60
# ppn : number of process per node
61
# walltime : wall clock time (hh:mm:ss)
64
#WARNING: when coupling with SYRTHES, 1 processor will be reserved for each
65
# instance of SYRTHES. The Kernel will be executed on the remaining
66
# processors, so make sure to reserve a sufficiently high number
69
# ------------------------------------------------------------------
71
# BATCH FILE (University of Manchester Cluster)
72
# =============================================
74
# set the name of the job
77
# request between 2 and 4 slots
80
# Execute the job from the current working directory
81
# Job output will appear in this directory
83
# can use -o dirname to redirect stdout
84
# can use -e dirname to redirect stderr
86
# Export these environment variables
91
# ------------------------------------------------------------------
93
# BATCH FILE (AIX, Loadlever)
94
# ===========================
98
#@ job_name = nameandcase
100
#@ job_type = parallel
102
#@ node_usage = not_shared
104
#@ network.MPI = csss,shared,US
107
#@ wall_clock_limit = 00:20:00
110
#@ output = $(job_name).$(schedd_host).$(jobid).out
111
#@ error = $(job_name).$(schedd_host).$(jobid).err
112
#@ notification = never
115
# suggested environment settings:
116
# export MP_EAGER_LIMIT=65536
117
# export MP_SHARED_MEMORY=yes
118
# export MEMORY_AFFINITY=MCM
119
# export MP_TASK_AFFINITY=MCM
121
########################################################################
123
# BEGINNING OF USER MODIFIABLE ZONE FOR STANDARD CALCULATIONS
125
# runcase.help gives more details about the different variables.
127
# -------------------------------
131
# On some systems, some external libraries may require TERM to be defined.
137
# Parameters for the 1st instance
138
# -------------------------------
145
THERMOCHEMISTRY_DATA_1=
148
# Choose the total number of processors used (if empty, automatic detection
149
# through the batch system if possible, set to 1 otherwise).
150
# When coupling with SYRTHES with COUPLING_MODE=MPI, the 1st processor is
151
# used by SYRTHES, so the effective number of processors assigned to the
152
# Kernel is reduced by 1.
153
# The processors list is only usable when not running on a batch system
154
# (as such a system usually already defines a similar list)
155
NUMBER_OF_PROCESSORS_1=1
160
USER_INPUT_FILES_1=""
161
USER_OUTPUT_FILES_1=""
163
# Parameters for the 2nd instance
164
# -------------------------------
171
THERMOCHEMISTRY_DATA_2=
174
# Choose the total number of processors used (if empty, automatic detection
175
# through the batch system if possible, set to 1 otherwise).
176
# When coupling with SYRTHES with COUPLING_MODE=MPI, the 1st processor is
177
# used by SYRTHES, so the effective number of processors assigned to the
178
# Kernel is reduced by 1.
179
# The processors list is only usable when not running on a batch system
180
# (as such a system usually already defines a similar list)
181
NUMBER_OF_PROCESSORS_2=1
186
USER_INPUT_FILES_2=""
187
USER_OUTPUT_FILES_2=""
191
# Working directory (leave empty for automatic default directory)
193
#CS_TMP_PREFIX=/local00/users/`whoami`
207
SCRIPTS=$CASEDIR/SCRIPTS
208
#RESTART_IN=$DATA/RESTART
209
#PREPROCESSOR_OUTPUT_IN=$DATA/preprocessor_output
210
#PARTITION_OUTPUT_IN=$DATA/PARTITION_OUTPUT
211
MESHDIR=$CASEDIR/../MESH
213
# Indicate which steps should be executed; if both the Preprocessor and the
214
# Kernel are executed, the "preprocessor_output" and eventual "domain_number_*"
215
# files are not saved. If only the preprocessor and / or partitioner are
216
# executed, the corresponding files will be saved in a RESU/PREPROCESSOR_OUTPUT
217
# and RESU/PARTITION directory. If the Preprocessor is not executed,
218
# "preprocessor_output" will be read from $PREPROCESSOR_OUTPUT_IN. If the
219
# Partitioner is not executed, "domain_number_*" will be read from
220
# $PARTITION_OUTPUT_IN if available (otherwise, unoptimized default
221
# partitioning will be used).
223
# EXEC_PREPROCESS : should the Preprocessor be run ? (yes/no)
224
# EXEC_PARTITION : should the Partitioner be run ? (yes/no)
225
# EXEC_KERNEL : should the Kernel be run ? (yes/no)
233
########################################################################
235
# END OF USER MODIFIABLE ZONE FOR STANDARD CALCULATIONS
237
########################################################################
239
# Kernel installation parameters
243
exec_prefix=@exec_prefix@
245
datarootdir=@datarootdir@
247
pkgdatadir=${datadir}/@PACKAGE@
249
# Preprocessor installation parameters
251
ecs_prefix=@ecs_prefix@
253
ecs_exec_prefix=${ecs_prefix}
254
ecs_bindir=${ecs_exec_prefix}/bin
256
########################################################################
258
# Parameters for execution
263
DATE=`date '+%m%d%H%M'`
267
# Copy runcase before changing to the working directory
268
# (as after that, the relative path will not be up to date).
270
cp $0 $RESU/runcase.$SUFFIX
272
# Execution directory (reachable by all the processors)
274
if [ ! -z "$CS_TMP_PREFIX" ] ; then
275
RUN=${CS_TMP_PREFIX}/tmp_Saturne/$STUDY.$CASE.$DATE
278
# Default if not specified by the user
280
# On the CCRT, there is no TMPDIR. We work by default in SCRATCHDIR
281
if [ "$SCRATCHDIR" != "" ] ; then
282
RUN=$SCRATCHDIR/tmp_Saturne/$STUDY.$CASE.$DATE
284
elif [ "$TMPDIR" != "" -a "$TMPDIR" != "/tmp" ] ; then
285
RUN=$TMPDIR/tmp_Saturne/$STUDY.$CASE.$DATE
287
RUN=$HOME/tmp_Saturne/$STUDY.$CASE.$DATE
291
# Create directory if necessary
292
if [ "$RUN" != "$TMPDIR" ] ; then
293
if [ ! -d $RUN ] ; then
294
mkdir -p $RUN || exit 1
296
echo "RUN=$RUN already exists."
297
echo "The simulation will not be run."
304
# Create a working directory for each instance
306
while [ $I -lt $NB_INSTANCES ]; do
308
mkdir RUN.$I || exit 1
311
########################################################################
313
# Set up MPI environment
315
# Use makefile query to obtain the path to MPI binaries if those are
316
# not on the default path. This is a peculiar use of make, but allows
317
# us to avoid defining the MPI configuration in multiple files.
319
CS_MPI_PATH=@MPI_BIN@
323
while [ $I -lt $NB_INSTANCES ]; do
325
N_PROCS=`eval echo '$NUMBER_OF_PROCESSORS_'$I`
326
(( NUMBER_OF_PROCESSORS=NUMBER_OF_PROCESSORS+$N_PROCS ))
329
# NUMBER_OF_PROCESSORS is determined here if not already set;
330
# MPIHOSTS, MPIRUN, MPIBOOT, MPIHALT, and NUMBER_OF_NODES are
331
# defined by the sourced script, and PATH may be updated.
333
. ${pkgdatadir}/runcase_mpi_env
338
echo "Coupling of several Code_Saturne executables activated."
340
########################################################################
344
echo ' Code_Saturne is running '
345
echo ' *********************** '
347
echo ' Working directory (to be periodically cleaned) : '
350
########################################################################
352
# Compilation and link
354
# Note: we also check the for the presence of certain user subroutines here.
357
echo ' Kernel version: ' $prefix
358
echo ' Preprocessor version: ' $ecs_prefix
360
if [ "${EXEC_KERNEL}" = "yes" ] ; then
363
while [ $I -lt $NB_INSTANCES ]; do
369
PARAM=`eval echo '$PARAM_'$I`
375
# Copy of the parameter file
376
if [ ! -z "$PARAM" ] ; then
378
if [ -f $var ] ; then
379
COMMAND_PARAM="--param $PARAM"
384
echo ' The parameters file ' $var
385
echo ' can not be accessed.'
390
src_files=`ls ${source_cas}/*.[fF]90 ${source_cas}/*.[ch] 2>/dev/null`
392
if [ ! -z "${src_files}" ] ; then
394
if [ $I -eq 1 ]; then
396
echo " ***************************************************************"
397
echo " Compilation of user subroutines and linking of Code_Saturne"
398
echo " ***************************************************************"
401
if [ -f compil.log ] ; then
405
src_dir="src_saturne"
407
# Copy of the user source files
408
# (no links: the directory is copied later)
410
for f in ${src_files} ; do
416
# Detect presence and test for compatibility of modules.
417
if [ ! -z "$PARAM" ] ; then
418
${bindir}/cs check_consistency --source=$src_dir --param=$PARAM
420
${bindir}/cs check_consistency
427
if [ ! -z "${CS_LIB_ADD}" ] ; then
428
OPTLIBS="--opt-libs=${CS_LIB_ADD}"
430
${bindir}/cs compile \
431
--source=$src_dir ${OPTLIBS} 2>>$cur_dir/compil.log 1>&2
434
cp $cur_dir/compil.log $RESU/compil.log.$I.$SUFFIX
435
echo "COMPILE OR LINK ERROR"
439
cp $cur_dir/compil.log $RESU/compil.log.$I.$SUFFIX
444
# Detect presence and test for compatibility of modules.
445
if [ ! -z "$PARAM" ] ; then
446
${bindir}/cs check_consistency --param=$PARAM
448
${bindir}/cs check_consistency
454
ln -s ${bindir}/$EXE .
460
fi # EXEC_KERNEL = yes
463
########################################################################
468
echo " ********************************************"
469
echo " Preparing calculation "
470
echo " ********************************************"
474
PREPROCESS_ERROR=false
475
PARTITION_ERROR=false
476
EXECUTION_ERROR=false
479
while [ $I -lt $NB_INSTANCES ]; do
487
MESH=`eval echo '$MESH_'$I`
488
COMMAND_JOIN=`eval echo '$COMMAND_JOIN_'$I`
489
COMMAND_CWF=`eval echo '$COMMAND_CWF_'$I`
490
COMMAND_PERIO=`eval echo '$COMMAND_PERIO_'$I`
492
nproc_kernel=`eval echo '$NUMBER_OF_PROCESSORS_'$I`
495
DATA=$CASEDIR/DATA.$I
496
RESTART_IN=$DATA/RESTART_IN
497
PREPROCESSOR_OUTPUT_IN=$DATA/preprocessor_output
498
PARTITION_OUTPUT_IN=$DATA/PARTITION_OUTPUT
500
if [ "${EXEC_PREPROCESS}" = "yes" ]
502
for var in $MESH ; do
503
ln -s $MESHDIR/$var $var || exit 1
504
# Special case for meshes in EnSight format: link to .geo file necessary
505
# (retrieve name through .case file)
506
var2=`basename $var .case`
507
if [ $var2 != $var ] ; then
508
ficgeo_ensight=`awk '/^model:/ {print $2}' $var`
509
ln -s $MESHDIR/$ficgeo_ensight $ficgeo_ensight || FIN
513
if [ -f ${PREPROCESSOR_OUTPUT_IN} ] ; then
514
ln -s ${PREPROCESSOR_OUTPUT_IN} preprocessor_output || exit 1
516
echo "Error: no preprocessor output file is available;"
517
echo " (${PREPROCESSOR_OUTPUT_IN} does not exist."
518
echo " or is not a standard file."
523
if [ $nproc_kernel -eq 1 -a "${EXEC_KERNEL}" = "yes" ] ; then
525
elif [ "${EXEC_PARTITION}" = "no" -a "${PARTITION_OUTPUT_IN}" != "" ]
527
if [ -f ${PARTITION_OUTPUT_IN}/domain_number_${nproc_kernel} ] ; then
528
ln -s ${PARTITION_OUTPUT_IN}/domain_number_${nproc_kernel} .
530
echo "Warning: no partitioning file is available;"
531
echo " (no ${PARTITION_OUTPUT_IN}/domain_number_${nproc_kernel})."
533
echo " Unoptimized partitioning will be used."
534
echo " Parallel performance may be degraded."
538
if [ "${EXEC_KERNEL}" = "yes" ] ; then
540
THERMOCHEMISTRY_DATA=`eval echo '$THERMOCHEMISTRY_DATA_'$I`
541
METEO_DATA=`eval echo '$METEO_DATA_'$I`
542
USER_INPUT_FILES=`eval echo '$USER_INPUT_FILES_'$I`
544
for var in ${RESTART_IN}/* ; do
545
if [ -f $var ] ; then
547
if [ $varb = suiava ] ; then
549
elif [ $varb = suiavx ] ; then
551
elif [ $varb = vorava ] ; then
553
elif [ $varb = t1dava ] ; then
555
elif [ $varb = ctwava ] ; then
557
elif [ $varb = rayava ] ; then
559
elif [ $varb = lagava ] ; then
561
elif [ $varb = lasava ] ; then
570
if [ "$THERMOCHEMISTRY_DATA" != "" ] ; then
571
var=$DATA/$THERMOCHEMISTRY_DATA
572
if [ -f $var ] ; then
574
# Copy so as to have correct name upon backup
575
if [ "$THERMOCHEMISTRY_DATA" != "dp_tch" ] ; then
576
cp dp_tch $THERMOCHEMISTRY_DATA
581
echo ' The thermochemistry file ' $var
582
echo ' can not be accessed. '
587
if [ "$METEO_DATA" != "" ] ; then
588
var=$DATA/$METEO_DATA
589
if [ -f $var ] ; then
591
# Copy so as to have correct name upon backup
592
if [ "$METEO_DATA" != "meteo" ] ; then
598
echo ' The meteo profile file ' $var
599
echo ' can not be accessed. '
604
for f in uscpcl.f90 usd3pc.f90 usebuc.f90 uslwcc.f90 usfucl.f90
606
if [ -f "${SRC}/${f}" -a ! -f JANAF ] ; then
607
cp ${datadir}/data/thch/JANAF JANAF
611
if [ ! -z "$USER_INPUT_FILES" ] ; then
612
for f in $USER_INPUT_FILES ; do
617
fi # EXEC_KERNEL = yes
619
if [ $I -eq 1 ]; then
620
########################################################################
621
# Maximum time for PBS (done here so as to leave time for PBS to
622
# realize that things have started).
624
if [ "$PBS_JOBID" != "" ] ; then
625
CS_MAXTIME=`qstat -r $PBS_JOBID | grep $PBS_JOBID | sed -e's/ \{1,\}/ /g' | cut -d ' ' -f 9`
629
########################################################################
633
CURDATE=`unset LANG ; date`
635
echo '========================================================'>>$summary
636
echo ' Start time : ' $CURDATE >>$summary
637
echo ' ----------------------------------------------------' >>$summary
638
echo ' Kernel : ' $prefix >>$summary
639
echo ' Preprocessor : ' $ecs_prefix >>$summary
640
echo ' ------------------------------------------------ ' >>$summary
641
echo ' HOMARD : ' $homard_prefix >>$summary
642
echo ' ------------------------------------------------ ' >>$summary
643
echo ' CS_MPI_PATH : ' $CS_MPI_PATH >>$summary
644
echo ' PATH : ' $PATH >>$summary
645
echo ' ------------------------------------------------ ' >>$summary
646
echo ' User : ' $USER >>$summary
647
echo '========================================================'>>$summary
648
echo ' Machine : ' >>$summary
650
if [ -z "$NUMBER_OF_PROCESSORS" ] ; then
651
echo ' N Procs : ' 1 >>$summary
653
echo ' N Procs : ' $NUMBER_OF_PROCESSORS >>$summary
655
if [ -z "$PROCESSOR_LIST" ] ; then
656
echo ' Processors : ' default >>$summary
658
echo ' Processors : ' $PROCESSOR_LIST >>$summary
660
echo '========================================================'>>$summary
661
echo ' ----------------------------------------------------' >>$summary
662
echo ' Case : ' $CASE >>$summary
663
echo ' DATA : ' $DATA >>$summary
664
echo ' SRC : ' $SRC >>$summary
665
echo ' RESU : ' $RESU >>$summary
666
echo ' ----------------------------------------------------' >>$summary
667
echo ' Exec. dir. : ' $RUN >>$summary
668
echo ' ----------------------------------------------------' >>$summary
669
if [ "$EXEC_PREPROCESSOR" = "yes" ] ; then
670
echo ' Preprocessor : ' ${ecs_bindir}/cs_preprocess >>$summary
672
if [ "$EXEC_PARTITION" = "yes" ] ; then
673
echo ' Partitioner : ' ${ecs_bindir}/cs_partition >>$summary
675
if [ "$EXEC_KERNEL" = "yes" ] ; then
676
echo ' Executable : ' $EXE >>$summary
678
echo ' ----------------------------------------------------' >>$summary
682
echo " ********************************************"
683
echo " Starting calculation"
684
echo " ********************************************"
690
if [ "${EXEC_PREPROCESS}" = "yes" ] ; then
692
${ecs_bindir}/cs_preprocess --mesh $MESH "--case" $CASE \
693
$COMMAND_REORIENT $COMMAND_JOIN $COMMAND_PERIO \
695
if [ $? != 0 ] ; then
696
echo "Error running the preprocessor."
697
echo "Check preprocessor log (listpre) for details."
699
PREPROCESS_ERROR=true
703
if [ "${EXEC_KERNEL}" = "no" ] ; then
705
PREPROCESSOR_OUTPUT_OUT=$RESU/preprocessor_output.$SUFFIX
706
cp preprocessor_output ${PREPROCESSOR_OUTPUT_OUT}
713
if [ ! -f ${ecs_bindir}/cs_partition ] ; then
714
echo "Warning: ${ecs_bindir}/cs_partition not found."
716
echo "The partitioner may not have been installed"
717
echo " (this is the case if neither METIS nor."
718
echo " SCOTCH are avaialable)."
720
echo "Unoptimized partitioning will be used, so"
721
echo "parallel performance may be degraded."
726
if [ "${EXEC_PARTITION}" = "yes" ] ; then
728
if [ "${EXEC_KERNEL}" = "yes" ] ; then
729
${ecs_bindir}/cs_partition $nproc_kernel > listpart 2>&1
731
if [ -z "$PARTITION_LIST" ] ; then
732
echo "Error running the partitioner."
733
echo "PARTITION_LIST is not set."
734
echo "This variable should contain the number of processors"
735
echo "for which we partition (or a list of such numbers)."
739
${ecs_bindir}/cs_partition $PARTITION_LIST > listpart 2>&1
742
if [ $? != 0 -a $PARTITION_ERROR = false ] ; then
743
echo "Error running the partitioner."
744
echo "Check partitioner log (listpart) for details."
750
if [ "${EXEC_KERNEL}" = "no" ] ; then
752
PARTITION_OUTPUT_OUT=$RESU/PARTITION_OUTPUT.$SUFFIX
753
mkdir $PARTITION_OUTPUT_OUT
754
cp -r domain_number_* ${PARTITION_OUTPUT_OUT}/
760
# Run calculation proper.
762
if [ "$ERROR" != "true" -a "$EXEC_KERNEL" = "yes" ] ; then
766
while [ $I -lt $NB_INSTANCES ]; do
770
COMMAND_CWF=`eval echo '$COMMANDE_CWF_'$I`
771
NUMBER_OF_PROCESSORS=`eval echo '$NUMBER_OF_PROCESSORS_'$I`
772
(( NB_TOT=NB_TOT+$NUMBER_OF_PROCESSORS ))
776
RUNCS="$VALGRIND $cur_dir/$EXE --mpi $I \
777
$COMMAND_CWF $ARG_CS_VERIF $ARG_CS_OUTPUT $COMMAND_PARAM"
778
CMD="cd $cur_dir && $RUNCS"
782
# Make sure to transmit possible additional arguments assigned by mpirun to
783
# the executable with some MPI-1 implementations (vanilla MPICH 1.2 sets the
784
# parameters needed by MPI_Init through argc/argv): we use $@ to forward
785
# arguments passed to localexec to the true executable files.
787
localexec=$RUN/localexec
788
if [ $I -eq 1 ]; then
789
echo '#!/bin/sh' > $localexec
790
echo "MPI_RANK=\`${pkgdatadir}/runcase_mpi_rank \$@\`" >> $localexec
791
echo "if [ \$MPI_RANK -lt $NB_TOT ] ; then" >> $localexec
792
echo " $CMD" >> $localexec
793
elif [ $I -lt $NB_INSTANCES ]; then
794
echo "elif [ \$MPI_RANK -lt $NB_TOT ] ; then" >> $localexec
795
echo " $CMD" >> $localexec
797
echo "else" >> $localexec
798
echo " $CMD" >> $localexec
799
echo "fi" >> $localexec
806
$MPIRUN $localexec || EXECUTION_ERROR=true
811
########################################################################
813
# Treatment of the ouput files:
814
# Starts with the restart files
815
# (in case of full disk, increases chances of being able to continue).
818
while [ $I -lt $NB_INSTANCES ]; do
826
USER_OUTPUT_FILES=`eval echo '$USER_OUTPUT_FILES_'$I`
828
if [ $EXEC_KERNEL = yes ] ; then
830
RESTART_OUT=$RESU/RESTART.$SUFFIX
832
mkdir ${RESTART_OUT} || iok=0
833
if [ $iok = 1 ] ; then
834
for f in suiava suiavx t1dava ctwava vorava rayava lagava* lasava* ; do
840
for f in suiava suiavx t1dava ctwava vorava rayava lagava* lasava* ; do
842
cp $f $RESU/$f.$SUFFIX
848
for f in ${USER_OUTPUT_FILES} ; do
853
if [ ${resuser} = 1 ] ; then
854
RES_USER=$RESU/RES_USER.$SUFFIX
856
mkdir ${RES_USER} || iok=0
857
if [ $iok = 1 ] ; then
858
for f in ${USER_OUTPUT_FILES} ; do
864
for f in ${USER_OUTPUT_FILES} ; do
866
cp $f $RESU/$f.$SUFFIX
872
for f in $PARAM $THERMOCHEMISTRY_DATA $METEO_DATA ; do
874
cp $f $RESU/$f.$SUFFIX
878
for f in probes_*.dat ; do
880
if [ ! -d $RESU/HIST.$SUFFIX ] ; then
881
mkdir $RESU/HIST.$SUFFIX
883
cp $f $RESU/HIST.$SUFFIX
888
if [ ! -d $RESU/HIST.$SUFFIX ] ; then
889
mkdir $RESU/HIST.$SUFFIX
891
cp $f $RESU/HIST.$SUFFIX
897
for f in list* error* *.med *.cgns ; do
899
cp $f $RESU/$f.$SUFFIX
903
# Treatment of EnSight and MED files
904
# The $dir (=*.ensight and/or *.med) directories are copied
907
# We place directories $dir (=*.ensight and/or *.med)
910
cas=`echo $CASE |tr "[:upper:]" "[:lower:]"`
912
for dir in *.ensight *.med ; do
913
if [ -d $dir ] ; then
914
DIR=`echo $dir |tr "[:lower:]" "[:upper:]"`
915
mkdir $RESU/$DIR.$SUFFIX
916
if [ $? -ne 0 ] ; then
917
echo Creating $RESU/$DIR.$SUFFIX failed
921
cp -R ${f} $RESU/$DIR.$SUFFIX/.
928
if [ $EXEC_KERNEL = yes ] ; then
930
rayt_list=`ls bord* 2>/dev/null`
931
if [ ! -z "${rayt_list}" ] ; then
932
for f in $rayt_list ; do
933
if [ ! -d $RESU/CHR.$SUFFIX ] ; then
934
mkdir $RESU/CHR.$SUFFIX
936
cp $f $RESU/CHR.$SUFFIX/.
940
lagr_list=`ls debug* deplacement* trajectoire* frontiere* 2>/dev/null`
941
if [ ! -z "${lagr_list}" ] ; then
942
mkdir $RESU/LAGR.$SUFFIX
943
for f in $lagr_list ; do
944
cp $f $RESU/LAGR.$SUFFIX
948
# Matisse output files
949
if [ -f ${RUN}/resuMatisse ] ; then
950
matisse=`grep -i matisse $DATA/$PARAM`
951
if [ ! -z "$matisse" ] ; then
952
# The date is added to the first line of resuMatisse
953
AFDATE="Date of the case : "$DATE
954
sed "1i\ ${AFDATE}" ${RUN}/resuMatisse >> ${RUN}/resuMatisse.mod
955
mv ${RUN}/resuMatisse.mod ${RUN}/resuMatisse
957
cp ${RUN}/resuMatisse ${RESU}/resuMatisse.$SUFFIX
960
for dir in src_saturne ; do
961
if [ -d $dir ] ; then
962
mkdir $RESU/SRC.$SUFFIX
963
if [ $? -ne 0 ] ; then
964
echo Failure creating $RESU/SRC.$SUFFIX
966
for f in $dir/*.[fF]90 $dir/*.[ch] ; do
967
if [ -f ${f} ] ; then
968
cp -R ${f} $RESU/SRC.$SUFFIX/.
969
fbase=`basename ${f}`
970
chmod a-w $RESU/SRC.$SUFFIX/${fbase}
977
fi # input data and outputs
980
########################################################################
984
if [ "$PREPROCESS_ERROR" = "true" ] ; then
985
EXEC_PREPROCESS="failed"
987
echo " Preprocessing : " $EXEC_PREPROCESS >>$summary
988
if [ "$PARTITION_ERROR" = "true" ] ; then
989
EXEC_PARTITION="failed"
991
echo " Partitioning : " $EXEC_PARTITION >>$summary
992
if [ "$EXECUTION_ERROR" = "true" ] ; then
995
echo " Calculation : " $EXEC_KERNEL >>$summary
997
CURDATE=`unset LANG ; date`
999
echo ' ----------------------------------------------------' >>$summary
1000
echo ' Finish time : ' $CURDATE >>$summary
1001
echo '========================================================'>>$summary
1003
cp $summary $RESU/$summary.$SUFFIX
1005
########################################################################
1011
echo " ********************************************"
1012
if [ "$EXECUTION_ERROR" = "true" ] ; then
1013
echo " Error in calculation stage."
1014
elif [ "$PARTITION_ERROR" = "true" ] ; then
1015
echo " Error in partitioning stage."
1016
elif [ "$PREPROCESS_ERROR" = "true" ] ; then
1017
echo " Error in preprocessing stage."
1019
echo " Normal simulation finish"
1021
echo " ********************************************"
1023
if [ "$ERROR" = "true" ] ; then
1029
########################################################################