modules:
  default:
    lmod:
      # cuda:
      #   environment:
      #     unset:
      #     - CUDA_ROOT
      nvhpc+mpi@24.7:
        environment:
          set:
            HPCX_DIR: "{prefix}/Linux_x86_64/24.7/comm_libs/12.5/hpcx/latest"
            OPAL_PREFIX: "{prefix}/Linux_x86_64/24.7/comm_libs/12.5/hpcx/latest/ompi"
          prepend_path:
            LD_LIBRARY_PATH: "{prefix}/Linux_x86_64/24.7/comm_libs/12.5/hpcx/latest/ompi/lib:{prefix}/Linux_x86_64/24.7/comm_libs/12.5/hpcx/latest/ucx/mt/lib:{prefix}/Linux_x86_64/24.7/comm_libs/12.5/hpcx/latest/ucx/mt/lib/ucx:{prefix}/Linux_x86_64/24.7/comm_libs/12.5/hpcx/latest/ucc/lib:{prefix}/Linux_x86_64/24.7/comm_libs/12.5/hpcx/latest/ucc/lib/ucc:{prefix}/Linux_x86_64/24.7/comm_libs/12.5/hpcx/latest/hcoll/lib:{prefix}/Linux_x86_64/24.7/comm_libs/12.5/hpcx/latest/sharp/lib:{prefix}/Linux_x86_64/24.7/comm_libs/12.5/hpcx/latest/nccl_rdma_sharp_plugin/lib"
            PATH: "{prefix}/Linux_x86_64/24.7/comm_libs/12.5/hpcx/latest/ucx/mt/bin:{prefix}/Linux_x86_64/24.7/comm_libs/12.5/hpcx/latest/ucc/bin:{prefix}/Linux_x86_64/24.7/comm_libs/12.5/hpcx/latest/hcoll/bin:{prefix}/Linux_x86_64/24.7/comm_libs/12.5/hpcx/latest/sharp/bin"
      nccl:
        environment:
          set:
            NCCL_HOME: "{prefix}"
      nvshmem:
        environment:
          set:
            NCCL_HOME: "{prefix}"
      # needed as long as drivers are with 12.2 support
      cuda@12.4:
        environment:
          prepend_path:
            LD_LIBRARY_PATH: /ssoft/spack/external/cuda-compat/12.4/lib64
      cuda@12.5:
        environment:
          prepend_path:
            LD_LIBRARY_PATH: /ssoft/spack/external/cuda-compat/12.6/lib64