Skip to content

Commit

Permalink
allow for a no-cuda option (#108)
Browse files Browse the repository at this point in the history
Allow for a no-cuda option to disable loading cuda modules. This also fixes a bug where
the cuda version may have been set by a previous node_type choice and subsequently
we load a cuda module on a CPU job.
  • Loading branch information
johrstrom committed Mar 23, 2023
1 parent 98412f0 commit 78d9c35
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [0.25.0] - 2023-03-23

- Added an option to disable loading cuda modules in [108](https://github.com/OSC/bc_osc_jupyter/pull/108).

## [0.24.0] - 2023-01-09

- Added c18 options back in [106](https://github.com/OSC/bc_osc_jupyter/pull/106).
Expand Down Expand Up @@ -353,7 +357,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added
- Initial release!

[Unreleased]: https://github.com/OSC/bc_osc_jupyter/compare/v0.24.0...HEAD
[Unreleased]: https://github.com/OSC/bc_osc_jupyter/compare/v0.25.0...HEAD
[0.25.0]: https://github.com/OSC/bc_osc_jupyter/compare/v0.25.0...v0.24.0
[0.24.0]: https://github.com/OSC/bc_osc_jupyter/compare/v0.24.0...v0.23.3
[0.23.4]: https://github.com/OSC/bc_osc_jupyter/compare/v0.23.3...v0.23.4
[0.23.3]: https://github.com/OSC/bc_osc_jupyter/compare/v0.23.2...v0.23.3
Expand Down
12 changes: 11 additions & 1 deletion form.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ attributes:
label: "CUDA Version"
help: |
CUDA is Nvidia's GPU-specific parallel computing framework. A GPU node
is required to make use of this functionality.
is required to make use of this functionality. **Load from custom kernel**
means you have loaded the appropriate module in your own user defined kernel.
options:
- [ 'Load from custom kernel', 'none' ]
- [
"cuda/8.0.44", "cuda/8.0.44",
data-option-for-cluster-pitzer: false,
Expand Down Expand Up @@ -143,6 +145,7 @@ attributes:
- [
"any", "any",
data-hide-cuda-version: true,
data-set-cuda-version: '',
data-min-num-cores-for-cluster-owens: 1,
data-max-num-cores-for-cluster-owens: 28,
data-min-num-cores-for-cluster-pitzer: 1,
Expand All @@ -156,6 +159,7 @@ attributes:
- [
"40 core", "any-40core",
data-hide-cuda-version: true,
data-set-cuda-version: '',
data-min-num-cores-for-cluster-pitzer: 1,
data-max-num-cores-for-cluster-pitzer: 40,
data-option-for-cluster-owens: false,
Expand All @@ -167,6 +171,7 @@ attributes:
- [
"48 core", "any-48core",
data-hide-cuda-version: true,
data-set-cuda-version: '',
data-min-num-cores-for-cluster-pitzer: 1,
data-max-num-cores-for-cluster-pitzer: 48,
data-option-for-cluster-owens: false,
Expand Down Expand Up @@ -210,6 +215,7 @@ attributes:
- [
"largemem", "largemem",
data-hide-cuda-version: true,
data-set-cuda-version: '',
data-min-num-cores-for-cluster-pitzer: 24,
data-max-num-cores-for-cluster-pitzer: 48,
data-option-for-cluster-owens: false,
Expand All @@ -221,6 +227,7 @@ attributes:
- [
"hugemem", "hugemem",
data-hide-cuda-version: true,
data-set-cuda-version: '',
data-min-num-cores-for-cluster-owens: 4,
data-max-num-cores-for-cluster-owens: 48,
data-min-num-cores-for-cluster-pitzer: 20,
Expand All @@ -233,6 +240,7 @@ attributes:
- [
"debug", "debug",
data-hide-cuda-version: true,
data-set-cuda-version: '',
data-min-num-cores-for-cluster-owens: 1,
data-max-num-cores-for-cluster-owens: 28,
data-min-num-cores-for-cluster-pitzer: 1,
Expand All @@ -245,6 +253,7 @@ attributes:
- [
"pitzer", "pitzer",
data-hide-cuda-version: true,
data-set-cuda-version: '',
data-min-num-cores-for-cluster-kubernetes: 1,
data-max-num-cores-for-cluster-kubernetes: 10,
data-min-num-cores-for-cluster-kubernetes-test: 1,
Expand All @@ -258,6 +267,7 @@ attributes:
- [
"owens", "owens",
data-hide-cuda-version: true,
data-set-cuda-version: '',
data-min-num-cores-for-cluster-kubernetes: 1,
data-max-num-cores-for-cluster-kubernetes: 10,
data-min-num-cores-for-cluster-kubernetes-test: 1,
Expand Down
5 changes: 4 additions & 1 deletion template/script.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ echo "TTT - $(date)"
module purge

# Required modules
module load xalt/latest <%= context.cuda_version %>
module load xalt/latest
<%- unless context.cuda_version.empty? || context.cuda_version == 'none' -%>
module load <%= context.cuda_version %>
<%- end -%>

# Set working directory to notebook root directory
cd "${NOTEBOOK_ROOT}"
Expand Down

0 comments on commit 78d9c35

Please sign in to comment.