source: XIOS/tools/FCM/test/create_hpc_batch_script @ 1293

Last change on this file since 1293 was 81, checked in by ymipsl, 12 years ago

ajout FCM 1.5

File size: 1.2 KB
Line 
1#!/bin/ksh
2
3cat <<EOF >$BATCH_SCRIPT
4#!/bin/ksh
5#
6# @ job_type = serial
7# @ class = serial
8# @ resources = ConsumableCpus(4) ConsumableMemory(1gb)
9# @ initialdir = $RUN_DIR_HPC
10# @ output = hpc_batch.stdout
11# @ error  = hpc_batch.stderr
12# @ queue
13
14. prg_12_1_0_2
15export PATH=$RUN_DIR_HPC/fcm/bin:\$PATH
16export DIFF="/opt/freeware/bin/diff"
17
18. $BATCH_DIRS_NAME
19let failed=0
20for TEST in \$TESTS
21do
22  cd $RUN_DIR_HPC/\$TEST
23  echo "\$(date): Running \$TEST ..."
24  find src -exec touch {} \\;
25  fcm build -v 2 -j 4 >../\$TEST.build.stdout.1 2>../\$TEST.build.stderr.1
26  RC=\$?
27  if [[ \$RC != 0 ]]; then
28    echo "FAILED: \$TEST failed"
29    let failed=failed+1
30  else
31EOF
32
33if [[ $TYPE == control ]]; then
34  echo "    touch .tests.complete" >>$BATCH_SCRIPT
35else
36  cat <<EOF >>$BATCH_SCRIPT
37    export COMPARE_TIMES=true
38    export DEBUG=$DEBUG
39    cd $BASE_DIR_HPC
40    ./compare_results \$TEST
41    if [[ \$? != 0 ]]; then
42      let failed=failed+1
43    fi
44EOF
45fi
46
47cat <<EOF >>$BATCH_SCRIPT
48  fi
49done
50
51echo "\$(date): HPC performance tests finished"
52if [[ \$failed == 0 ]]; then
53  echo "SUMMARY: All HPC performance tests succeeded"
54else
55  echo "SUMMARY: \$failed HPC performance tests failed"
56fi
57EOF
Note: See TracBrowser for help on using the repository browser.