From 548608ed7f7da50b37b14496a8cfaa08c40a1b1c Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Thu, 4 Aug 2005 15:22:11 -0500 Subject: [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. --- fortran/test/fflush1.f90 | 2 +- fortran/test/fflush2.f90 | 9 ++++----- 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 -- cgit v0.12