summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2005-08-04 20:22:11 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2005-08-04 20:22:11 (GMT)
commit548608ed7f7da50b37b14496a8cfaa08c40a1b1c (patch)
tree9d91841b211a92971a779ef9cdeca7fb8b062825 /fortran
parent914f990f22fffb5afbf55cda856ab9a6e9db3b60 (diff)
downloadhdf5-548608ed7f7da50b37b14496a8cfaa08c40a1b1c.zip
hdf5-548608ed7f7da50b37b14496a8cfaa08c40a1b1c.tar.gz
hdf5-548608ed7f7da50b37b14496a8cfaa08c40a1b1c.tar.bz2
[svn-r11201] Purpose:
bug fix. Description: test program used fortran STOP to end the program even when there was an error. STOP does not exit with non-zero. Therefore, make or other programs could not detect an error has occurred. Solution: Wherever it is appropirate, replace STOP with h5_exit_f statments. Platforms tested: Tested in heping.
Diffstat (limited to 'fortran')
-rw-r--r--fortran/test/fflush1.f902
-rw-r--r--fortran/test/fflush2.f909
2 files changed, 5 insertions, 6 deletions
diff --git a/fortran/test/fflush1.f90 b/fortran/test/fflush1.f90
index bace5f9..f078413 100644
--- a/fortran/test/fflush1.f90
+++ b/fortran/test/fflush1.f90
@@ -107,7 +107,7 @@
CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
if (error .ne. 0) then
write(*,*) "Cannot modify filename"
- stop
+ CALL h5_exit_f (1)
endif
CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error)
CALL check("h5fcreate_f",error,total_error)
diff --git a/fortran/test/fflush2.f90 b/fortran/test/fflush2.f90
index d073810..45304c5 100644
--- a/fortran/test/fflush2.f90
+++ b/fortran/test/fflush2.f90
@@ -95,8 +95,9 @@
CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
if (error .ne. 0) then
write(*,*) "Cannot modify filename"
- stop
+ CALL h5_exit_f (1)
endif
+ print *, "filename=", filename, "fix_filename=", fix_filename
CALL h5fopen_f(fix_filename, H5F_ACC_RDONLY_F, file_id, error)
CALL check("h5fopen_f",error,total_error)
@@ -139,11 +140,9 @@
CALL check("h5gopen_f",error,total_error)
!
- !In case error happens, jump to stop.
+ !In case error happens, exit.
!
- IF (error == -1) THEN
- 001 STOP
- END IF
+ IF (error == -1) CALL h5_exit_f (1)
!
!Close the datatype