test_hdf5_fortran_run.in 770 Bytes
Newer Older
1
2
3
4
5
6
7
#! @SHELL@

export SCT_OUT="hdf5"
export SCT_FILENAME="sct-testfile.h5"
rm -f $SCT_FILENAME
export SCT_CALLSTATS=1

8
9
10
11
12
13
14
15
16
17
@OPENMP_TRUE@export OMP_NUM_THREADS=4

@MPI_TRUE@@MPI_LAUNCH@ -n 2 @abs_top_srcdir@/tests/test_hdf5_fortran
@MPI_FALSE@@abs_top_srcdir@/tests/test_hdf5_fortran

retval=$?

if (test $retval != 0) ; then
  exit 1
fi
18
19
20
21
22
23
24
25
26
27

h5dump -a '/report_attributes/test_att_int' $SCT_FILENAME  | grep 123 || exit 1
h5dump -a '/report_attributes/test_att_long' $SCT_FILENAME  | grep 456 || exit 1
h5dump -a '/report_attributes/test_att_float' $SCT_FILENAME  | grep 0.5 || exit 1
h5dump -a '/report_attributes/test_att_double' $SCT_FILENAME  | grep 0.25 || exit 1
h5dump -a '/report_attributes/test_att_string' $SCT_FILENAME  | grep abc || exit 1

rm -f $SCT_FILENAME

exit 0