summaryrefslogtreecommitdiffstats
path: root/fortran/examples
diff options
context:
space:
mode:
authorH. Joe Lee <hyoklee@hdfgroup.org>2023-10-13 16:40:13 (GMT)
committerGitHub <noreply@github.com>2023-10-13 16:40:13 (GMT)
commitffc5fddeb105d2292d444993a3719be1f753f95b (patch)
tree9a4459b042d841f8804c0a8a30b8278fecab605c /fortran/examples
parent6aaa960d900b59a442e28c264ca0562449ebd05b (diff)
downloadhdf5-ffc5fddeb105d2292d444993a3719be1f753f95b.zip
hdf5-ffc5fddeb105d2292d444993a3719be1f753f95b.tar.gz
hdf5-ffc5fddeb105d2292d444993a3719be1f753f95b.tar.bz2
Fix link error on clang17/gfortran13/macOS-13 (#3666) (#3671)
Diffstat (limited to 'fortran/examples')
-rw-r--r--fortran/examples/ph5example.f908
1 files changed, 3 insertions, 5 deletions
diff --git a/fortran/examples/ph5example.f90 b/fortran/examples/ph5example.f90
index 05fedbd..138969e 100644
--- a/fortran/examples/ph5example.f90
+++ b/fortran/examples/ph5example.f90
@@ -16,10 +16,10 @@
PROGRAM DATASET
USE HDF5 ! This module contains all necessary modules
+ USE MPI
IMPLICIT NONE
- INCLUDE 'mpif.h'
CHARACTER(LEN=10), PARAMETER :: default_fname = "sds.h5" ! Default name
CHARACTER(LEN=8), PARAMETER :: dsetname = "IntArray" ! Dataset name
@@ -72,10 +72,8 @@
CALL h5pset_fapl_mpio_f(plist_id, comm, info, error)
!
- ! Figure out the filename to use. If your system does not support
- ! getenv, comment that statement with this,
- ! filename = ""
- CALL getenv("HDF5_PARAPREFIX", filename)
+ ! Figure out the filename to use.
+ CALL get_environment_variable("HDF5_PARAPREFIX", filename)
fnamelen = LEN_TRIM(filename)
if ( fnamelen == 0 ) then
filename = default_fname