source:
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/fcm_job.sh
@
3608
Last change on this file since 3608 was 3608, checked in by acc, 12 years ago | |
---|---|
|
|
File size: 1.9 KB |
Line | |
---|---|
1 | ##################################################### |
2 | # Author : Simona Flavoni for NEMO |
3 | # Contact : sflod@locean-ipsl.upmc.fr |
4 | # |
5 | # Some scripts called by sette.sh |
6 | # fcm_job.sh : simple job to run NEMO with fcm |
7 | ###################################################### |
8 | #set -vx |
9 | set -o posix |
10 | #set -u |
11 | #set -e |
12 | #+ |
13 | # |
14 | # ================ |
15 | # fcm_job.sh |
16 | # ================ |
17 | # |
18 | # -------------------------- |
19 | # Simple job for NEMO tests |
20 | # -------------------------- |
21 | # |
22 | # SYNOPSIS |
23 | # ======== |
24 | # |
25 | # :: lauches the script $JOB_FILE interactive or batch, one task or MPI |
26 | # |
27 | # $ ./fcm_job.sh NUMBER_OF_PROCS JOB_FILE INTERACT MPI_FLAG |
28 | # |
29 | # |
30 | # DESCRIPTION |
31 | # =========== |
32 | # |
33 | # Simple job for SET TESTS for NEMO (SETTE) |
34 | # |
35 | # |
36 | # |
37 | # EXAMPLES |
38 | # ======== |
39 | # |
40 | # :: |
41 | # |
42 | # $ ./fcm_job.sh NUMBER_OF_PROCS JOB_FILE INTERACT MPI_FLAG |
43 | # |
44 | # run a |
45 | # |
46 | # |
47 | # TODO |
48 | # ==== |
49 | # |
50 | # option debug |
51 | # |
52 | # |
53 | # EVOLUTIONS |
54 | # ========== |
55 | # |
56 | # $Id$ |
57 | # |
58 | # |
59 | # |
60 | # * creation |
61 | # |
62 | #- |
63 | # |
64 | |
65 | usage=" Usage : ./fcm_job.sh NUMBER_OF_PROCS JOB_FILE INTERACT MPI_FLAG" |
66 | usage=" example : ./fcm_job.sh 8 SHORT no/yes no/yes" |
67 | |
68 | |
69 | minargcount=4 |
70 | if [ ${#} -lt ${minargcount} ] |
71 | then |
72 | echo "not enough arguments for fcm_job.sh script" |
73 | echo "control number of argument of fcm_job.sh in sette.sh" |
74 | echo "${usage}" |
75 | exit 1 |
76 | fi |
77 | unset minargcount |
78 | if [ ! -f ${SETTE_DIR}/output.sette ] ; then |
79 | touch ${SETTE_DIR}/output.sette |
80 | fi |
81 | |
82 | |
83 | export NB_PROCS=$1 |
84 | export JOB_FILE=$2 |
85 | export INTERACT=$3 |
86 | export MPI_FLAG=$4 |
87 | ################################################################ |
88 | # RUN OPA |
89 | cd ${EXE_DIR} |
90 | if [ "$INTERACT" == "yes" ]; then |
91 | eval $JOB_FILE |
92 | else if [ "$INTERACT" == "no" ]; then |
93 | # submit job to batch system |
94 | if [ "$NB_PROC" == "1" ]; then |
95 | eval ${BATCH_COMMAND_SEQ} $JOB_FILE ; echo ${BATCH_COMMAND_SEQ} $JOB_FILE |
96 | else |
97 | eval ${BATCH_COMMAND_PAR} $JOB_FILE ; echo ${BATCH_COMMAND_PAR} $JOB_FILE |
98 | fi |
99 | fi |
100 | fi |
Note: See TracBrowser
for help on using the repository browser.