From 68c8685141ca0f1b663141c091b3fe23e72020bb Mon Sep 17 00:00:00 2001 From: "Miles A. Curry" Date: Tue, 2 Jun 2020 16:23:52 -0600 Subject: [PATCH] Update MPAS intel libs check to use standard env variables --- tests/mpas_intel_libs_check/mpas_intel_libs_check.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/mpas_intel_libs_check/mpas_intel_libs_check.py b/tests/mpas_intel_libs_check/mpas_intel_libs_check.py index b58235f..ad860ce 100644 --- a/tests/mpas_intel_libs_check/mpas_intel_libs_check.py +++ b/tests/mpas_intel_libs_check/mpas_intel_libs_check.py @@ -66,7 +66,7 @@ def run(self, env, result, srcDir, testDir, hpc=None, *args, **kwargs): # PNetCDF - C and Fortran ## C - if os.system('mpicc -o c_pnetcdf pnetcdf.c -I$PNETCDF/include -L$PNETCDF/lib -lpnetcdf'): + if os.system('mpicc -o c_pnetcdf $PNETCDF_INCLUDES pnetcdf.c $PNETCDF_LIBS'): print("Failed to compile pnetcdf.c with mpicc") result.result = "FAILED" result.msg = "Failed to compile a C PNetCDF (pnetcdf.c) with mpicc!" @@ -75,7 +75,7 @@ def run(self, env, result, srcDir, testDir, hpc=None, *args, **kwargs): print("MPAS_INTEL_LIBS_CHECK: Can compile a C PNetCDF Program!") ## Fortran - if os.system('mpif90 -c pnetcdf.f90 -I$PNETCDF/include -L$PNETCDF/lib -lpnetcdf'): + if os.system('mpif90 $PNETCDF_INCLUDES -c pnetcdf.f90 $PNETCDF_LIBS'): print("Failed to compile mpi.f90 with mpif90") result.result = "FAILED" result.msg = "Failed to copmile a Fortran PNetCDF (pnetcdf.f90) with mpif90!" @@ -86,7 +86,7 @@ def run(self, env, result, srcDir, testDir, hpc=None, *args, **kwargs): # NetCDF - C and Fortran ## C - if os.system('mpicc -o c_netcdf netcdf.c -I$NETCDF/include -I$PNETCDF/include -L$NETCDF/lib -L$PNETCDF/lib -lnetcdf -lpnetcdf -lhdf5_hl -lhdf5 -ldl -lz'): + if os.system('mpicc $NETCDF_INCLUDES -o c_netcdf netcdf.c $NETCDF_LIBS'): print("Failed to compile netcdf.c with mpicc") result.result = "FAILED" result.msg = "Failed to compile a C NetCDF program (netcdf.c) with mpicc!" @@ -95,7 +95,7 @@ def run(self, env, result, srcDir, testDir, hpc=None, *args, **kwargs): print("MPAS_INTEL_LIBS_CHECK: Can compile a C NetCDF Program!") ## Fortran - if os.system('mpif90 -c netcdf.f90 -I$NETCDF/include -I$PNETCDF/include -L$NETCDF/lib -L$PNETCDF/lib -lnetcdf -lpnetcdf -lhdf5_hl -lhdf5 -ldl -lz -lm'): + if os.system('mpif90 $NETCDF_INCLUDES -c netcdf.f90 $NETCDF_LIBS'): print("Failed to compile netcdf.f90 with mpif90") result.result = "FAILED" result.msg = "Failed to compile a Fortran NetCDF program (netcdf.f90) with mpif90!"