File: run_f77_examples.sh

package info (click to toggle)
pnetcdf 1.14.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,812 kB
  • sloc: ansic: 85,298; f90: 10,707; fortran: 9,283; cpp: 8,864; makefile: 3,084; perl: 2,833; sh: 2,538; yacc: 1,227; lex: 216
file content (53 lines) | stat: -rwxr-xr-x 1,497 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/sh
#
# Copyright (C) 2022, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

# Exit immediately if a command exits with a non-zero status.
set -e

NPROCS=4
if test "x$1" != x ; then
   NPROCS=$1
fi
OUTDIR=TESTOUTDIR
MPIRUN="TESTMPIRUN"
MPIRUN=`echo ${MPIRUN} | SED_CMD -e "s/NP/${NPROCS}/g"`
run_BURST_BUFFER=ENABLE_BURST_BUFFER
run_NETCDF4=ENABLE_NETCDF4

for i in check_PROGRAMS ; do
    if test $i = get_vara ; then
       # get_vara reads the file 'put_vara.nc' created by put_vara
       ${MPIRUN} ./$i -q ${OUTDIR}/put_vara.nc
    else
       ${MPIRUN} ./$i -q ${OUTDIR}/$i.nc
    fi
    if test $? = 0 ; then
       echo "PASS: F77 parallel run on ${NPROCS} processes --------------- $i"
    fi

    if test "x${run_BURST_BUFFER}" = x1 ; then
       # echo "test burst buffering feature"
       export PNETCDF_HINTS="nc_burst_buf=enable;nc_burst_buf_dirname=${OUTDIR};nc_burst_buf_overwrite=enable"
       if test $i = get_vara ; then
          ${MPIRUN} ./$i -q ${OUTDIR}/put_vara.bb.nc
       else
          ${MPIRUN} ./$i -q ${OUTDIR}/$i.bb.nc
       fi
       if test $? = 0 ; then
          echo "PASS: F77 parallel run on ${NPROCS} processes --------------- $i"
       fi
       unset PNETCDF_HINTS
    fi

    if test "x${run_NETCDF4}" = x1 ; then
       # echo "test netCDF-4 feature"
       ${MPIRUN} ./$i ${OUTDIR}/$i.nc4 4
    fi
    # delete output file
    rm -f ${OUTDIR}/$i.nc
    rm -f ${OUTDIR}/$i.bb.nc
done