New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
create_hpc_batch_script in vendors/FCM-2017.10.0/test – NEMO

source: vendors/FCM-2017.10.0/test/create_hpc_batch_script @ 11998

Last change on this file since 11998 was 10672, checked in by nicolasmartin, 5 years ago

Reimport latest FCM release

File size: 1.8 KB
Line 
1#!/bin/ksh
2
3cat <<EOF >$BATCH_SCRIPT
4#!/bin/ksh
5#
6# @ job_type = serial
7# @ class = serial
8# @ resources = ConsumableCpus(6) 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_9
15export PATH=$RUN_DIR_HPC/fcm/bin:\$PATH
16export DIFF="/opt/freeware/bin/diff"
17export DEBUG=$DEBUG
18
19. \$MY_BIN/$BATCH_DIRS_NAME
20let failed=0
21for TEST in \$TESTS_FCM1
22do
23  cd $RUN_DIR_HPC/\$TEST
24  echo "\$(date): Running \$TEST ..."
25  find src -exec touch {} \\;
26  fcm build -v 2 -j 6 >../\$TEST.build.stdout.1 2>../\$TEST.build.stderr.1
27  RC=\$?
28  if [[ \$RC != 0 ]]; then
29    echo "FAILED: \$TEST failed"
30    let failed=failed+1
31  else
32EOF
33
34if [[ $TYPE == control ]]; then
35  echo "    touch .tests.complete" >>$BATCH_SCRIPT
36else
37  cat <<EOF >>$BATCH_SCRIPT
38    export COMPARE_TIMES=true
39    cd $BASE_DIR_HPC
40    $MY_BIN/compare_results_fcm1 \$TEST
41    if [[ \$? != 0 ]]; then
42      let failed=failed+1
43    fi
44EOF
45fi
46
47cat <<EOF >>$BATCH_SCRIPT
48  fi
49done
50for TEST in \$TESTS_FCM2
51do
52  cd $RUN_DIR_HPC/\$TEST
53  echo "\$(date): Running \$TEST ..."
54  find extract -exec touch {} \\;
55  fcm make -j 6 >../\$TEST.make.stdout.1 2>../\$TEST.make.stderr.1
56  RC=\$?
57  if [[ \$RC != 0 ]]; then
58    echo "FAILED: \$TEST failed"
59    let failed=failed+1
60  else
61EOF
62
63if [[ $TYPE == control ]]; then
64  cat <<EOF >>$BATCH_SCRIPT
65    touch .tests.complete
66    cd ..
67    $MY_BIN/compare_times_fcm1-2 \$TEST
68EOF
69else
70  cat <<EOF >>$BATCH_SCRIPT
71    export COMPARE_TIMES=true
72    cd $BASE_DIR_HPC
73    $MY_BIN/compare_results_fcm2 \$TEST
74    if [[ \$? != 0 ]]; then
75      let failed=failed+1
76    fi
77EOF
78fi
79
80cat <<EOF >>$BATCH_SCRIPT
81  fi
82done
83
84echo "\$(date): HPC performance tests finished"
85if [[ \$failed == 0 ]]; then
86  echo "SUMMARY: All HPC performance tests succeeded"
87else
88  echo "SUMMARY: \$failed HPC performance tests failed"
89fi
90EOF
Note: See TracBrowser for help on using the repository browser.