diff options
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/test/vol_connector.F90 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fortran/test/vol_connector.F90 b/fortran/test/vol_connector.F90 index 2cc6cee..bfea2e1 100644 --- a/fortran/test/vol_connector.F90 +++ b/fortran/test/vol_connector.F90 @@ -237,6 +237,7 @@ PROGRAM vol_connector LOGICAL :: cleanup, status CHARACTER(LEN=12) :: VOL_CONNECTOR_ENV INTEGER :: LEN = 0 + INTEGER :: CONN_NAME_LEN CALL h5open_f(error) cleanup = .TRUE. @@ -251,8 +252,9 @@ PROGRAM vol_connector ! Check to see if the VOL connector was set with an env variable CALL GET_ENVIRONMENT_VARIABLE("HDF5_VOL_CONNECTOR", VOL_CONNECTOR_ENV, LEN) + CONN_NAME_LEN = INDEX(VOL_CONNECTOR_ENV, ' ') IF(LEN.NE.0)THEN - NATIVE_VOL_CONNECTOR_NAME = TRIM(VOL_CONNECTOR_ENV) + NATIVE_VOL_CONNECTOR_NAME = TRIM(VOL_CONNECTOR_ENV(1:CONN_NAME_LEN)) ELSE NATIVE_VOL_CONNECTOR_NAME = "native" ENDIF |