Skip to content

Commit

Permalink
Find netcdf/pnetcdf with env vars on Chicoma and PM
Browse files Browse the repository at this point in the history
This is necessary because the `nc-config` executable cannot be
used to locate the correct path for the libraries.
  • Loading branch information
xylar committed Feb 14, 2023
1 parent 690296e commit ddf4cd3
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions conda/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ddf4cd3

Please sign in to comment.