From 9d52ddcd02788071fb6374582864b197aa7cea31 Mon Sep 17 00:00:00 2001 From: Hyo-Kyung Lee Date: Fri, 13 Oct 2023 09:56:53 -0500 Subject: [PATCH] Fix link error on clang17/gfortran13/macOS-13 (#3666) --- fortran/examples/ph5example.f90 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fortran/examples/ph5example.f90 b/fortran/examples/ph5example.f90 index 05fedbd46fd..138969ea17a 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 @@ PROGRAM DATASET 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