mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-18 15:15:56 +08:00
[svn-r6138] Purpose:
Improvement Description: The fortran test code did not exit with error like C programs do. Without the appropriate exit code, make or shell could not tell the fortran test program has encountered errors. So, make continues on even when some fortran tests have failed. Solution: Consultant advised to use "CALL exit(code)" to simulate what C programs do. Though this is not standard Fortran, he has not seen it failed to work in most fortran compilers thought some of them, like intel compiler, may need to link in an extra library. Platforms tested: Tested on burrwhite (linux 2.4), eirene (linux 2.2), sol (Solaris 8, serial and mpich parallel), modi4. Did not use the standard commit test since this is a purely fortran fix.
This commit is contained in:
parent
8333adf8ff
commit
f5f61bf783
@ -144,6 +144,10 @@
|
||||
CALL H5fflush_f(file_id, H5F_SCOPE_GLOBAL_F, error)
|
||||
CALL check("h5fflush_f",error,total_error)
|
||||
|
||||
! if errors detected, exit with non-zero code. This is not truly fortran
|
||||
! standard but likely supported by most fortran compilers.
|
||||
IF (total_error .ne. 0) CALL exit (total_error)
|
||||
|
||||
|
||||
001 STOP
|
||||
|
||||
|
@ -177,4 +177,8 @@
|
||||
CALL h5close_f(error)
|
||||
CALL check("h5close_types_f",error,total_error)
|
||||
|
||||
! if errors detected, exit with non-zero code. This is not truly fortran
|
||||
! standard but likely supported by most fortran compilers.
|
||||
IF (total_error .ne. 0) CALL exit (total_error)
|
||||
|
||||
END PROGRAM FFLUSH2EXAMPLE
|
||||
|
@ -276,6 +276,10 @@
|
||||
|
||||
CALL h5close_f(error)
|
||||
|
||||
! if errors detected, exit with non-zero code. This is not truly fortran
|
||||
! standard but likely supported by most fortran compilers.
|
||||
IF (total_error .ne. 0) CALL exit (total_error)
|
||||
|
||||
END PROGRAM fortranlibtest
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user