From 6467964a96908fd08dfe52e6bc2e961314b00453 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Tue, 14 Feb 2023 12:29:25 -0700 Subject: [PATCH] Find netcdf/pnetcdf with env vars on Chicoma and PM This is necessary because the `nc-config` executable cannot be used to locate the correct path for the libraries. --- conda/bootstrap.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/conda/bootstrap.py b/conda/bootstrap.py index 925177929e..ec1350c48a 100755 --- a/conda/bootstrap.py +++ b/conda/bootstrap.py @@ -351,11 +351,18 @@ def get_env_vars(machine, compiler, mpilib): f'export MV2_ENABLE_AFFINITY=0\n' \ f'export MV2_SHOW_CPU_BINDING=1\n' - env_vars = \ - f'{env_vars}' \ - f'export NETCDF=$(dirname $(dirname $(which nc-config)))\n' \ - f'export NETCDFF=$(dirname $(dirname $(which nf-config)))\n' \ - f'export PNETCDF=$(dirname $(dirname $(which pnetcdf-config)))\n' + if machine.startswith('chicoma') or machine.startswith('pm'): + env_vars = \ + f'{env_vars}' \ + f'export NETCDF=${{CRAY_NETCDF_HDF5PARALLEL_PREFIX}}\n' \ + f'export NETCDFF=${{CRAY_NETCDF_HDF5PARALLEL_PREFIX}}\n' \ + f'export PNETCDF=${{CRAY_PARALLEL_NETCDF_PREFIX}}\n' + else: + env_vars = \ + f'{env_vars}' \ + f'export NETCDF=$(dirname $(dirname $(which nc-config)))\n' \ + f'export NETCDFF=$(dirname $(dirname $(which nf-config)))\n' \ + f'export PNETCDF=$(dirname $(dirname $(which pnetcdf-config)))\n' return env_vars