File: pio_write.run.in

package info (click to toggle)
cdo 2.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 49,836 kB
  • sloc: cpp: 185,271; ansic: 95,766; sh: 7,192; f90: 6,147; makefile: 1,977; ruby: 1,078; csh: 1,028; python: 995; fortran: 319; pascal: 219; perl: 9
file content (88 lines) | stat: -rw-r--r-- 1,886 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#! @SHELL@

set -e
case "$0" in
  */*)
    prefix=`expr "$0" : '.*/\([^/]*\)$'`
    ;;
  *)
    prefix=$0
    ;;
esac
case x"${CDI_PIO_TEST_DIR+${CDI_PIO_TEST_DIR}}" in
  x)
    :
    ;;
  *)
    prefix="${CDI_PIO_TEST_DIR}/${prefix}"
    ;;
esac
suffix=${suffix-grb}

if ${mpi_task_num+:} false; then
  @ENABLE_MPI_FALSE@exit 77
  test 'x@MPI_LAUNCH@' != xtrue || exit 77
  pio_write=${pio_write-'./pio_write.parallel'}
  variations=${variations-"'' -qno-batch-rma -qcache-redists -qcreate-curvilinear-grid -qpreset-decomposition=true"}
  launch="@MPI_LAUNCH@ -n ${mpi_task_num} ${tool_wrap_mpi}"
else
  pio_write=${pio_write-'./pio_write'}
  variations=${variations-"'' -qcreate-curvilinear-grid"}
  launch=${tool_wrap}
fi

case ${suffix} in
  grb)
    test 'x@ENABLE_GRIB@' = xyes || exit 77
    ;;
  grb2)
    @HAVE_LIBGRIB_API_FALSE@exit 77
    test 'x@ENABLE_GRIB@' = xyes || exit 77
    ;;
  nc)
    @ENABLE_NETCDF_FALSE@exit 77
    ;;
  nc2)
    @ENABLE_NETCDF_FALSE@exit 77
    ;;
  nc4)
    @ENABLE_NETCDF_FALSE@exit 77
    ;;
  *)
    echo "Unsupported suffix '${suffix}'" >&2
    exit 1
    ;;
esac

test_variation ()
{
  if prefix_dirname=`expr "$prefix" : '\(.*\)/'` ; then
    mkdir -p "${prefix_dirname}"
  fi
  echo "creating data with $1" >&2
  variation=$1
  @top_builddir@/libtool --mode=execute \
    ${launch} \
    ${pio_write} "-qprefix=${prefix}" -f ${suffix} \
    ${pio_write_args} -s 7 ${variation} || exit 1
  tfile=0
  ntfiles=2
  while [ "$tfile" -lt "$ntfiles" ]; do
    p="${prefix}_${tfile}"
    echo "checking ${p}.${suffix}" >&2
    @top_builddir@/libtool --mode=execute \
      ${tool_wrap} ./cksum_read "${p}.${suffix}" "${p}.cksum"
    rm "${p}.${suffix}" "${p}.cksum"
    tfile=`expr "$tfile" + 1`
  done
}

eval "set dummy $variations"; shift
for variation in "$@"; do
  test_variation "$variation"
done
#
# Local Variables:
# mode: sh
# End:
#