Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Computer Resources
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IMGW
Computer Resources
Commits
3e5726b3
"config/exp_template.py" did not exist on "3e681508042d2cd42050e87667538c9034357e1d"
Commit
3e5726b3
authored
4 years ago
by
Michael Blaschek
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
8873045d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Python/QA-002-Modules-loaded-Kernel.ipynb
+141
-0
141 additions, 0 deletions
Python/QA-002-Modules-loaded-Kernel.ipynb
with
141 additions
and
0 deletions
Python/QA-002-Modules-loaded-Kernel.ipynb
0 → 100644
+
141
−
0
View file @
3e5726b3
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Loading Modules into the Kernel (Notebook) environment"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Check what modules are currently loaded in this Notebook session"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Currently Loaded Modulefiles:\n",
" 1) miniconda3/4.8.2-gcc-8.3.1-3m7b6t2 \n"
]
}
],
"source": [
"!module list --no-pager"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Put this file `load_modules_into_jupyter.conf` into your Home directory and your Notebook environment will have these modules loaded.\n",
"It is not possible to load these modules via magic (python magic ;).\n",
"\n",
"\n",
"**It needs the empty line at the end...**"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Writing /jetfs/home/mblaschek/load_modules_into_jupyter.conf\n"
]
}
],
"source": [
"%%writefile ~/load_modules_into_jupyter.conf\n",
"eccodes/2.18.0-gcc-8.3.1-s7clum3\n"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"eccodes/2.18.0-gcc-8.3.1-s7clum3\n"
]
}
],
"source": [
"!cat ~/load_modules_into_jupyter.conf"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Restart the kernel and you should see that the module is loaded"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Currently Loaded Modulefiles:\n",
" 1) miniconda3/4.8.2-gcc-8.3.1-3m7b6t2 \n",
" 2) zlib/1.2.11-gcc-8.3.1-bbbpnzp \n",
" 3) openmpi/4.0.5-gcc-8.3.1-773ztsv \n",
" 4) hdf5/1.12.0-gcc-8.3.1-awl4atl \n",
" 5) parallel-netcdf/1.12.1-gcc-8.3.1-xxrhtxn \n",
" 6) netcdf-c/4.7.4-gcc-8.3.1-fh4nn6k \n",
" 7) eccodes/2.18.0-gcc-8.3.1-s7clum3 \n"
]
}
],
"source": [
"!module list --no-pager"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Now all the dependencies are loaded as well"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Miniconda3 (4.8.2)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.1"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
%% Cell type:markdown id: tags:
# Loading Modules into the Kernel (Notebook) environment
%% Cell type:markdown id: tags:
### Check what modules are currently loaded in this Notebook session
%% Cell type:code id: tags:
```
python
!
module
list
--
no
-
pager
```
%% Output
Currently Loaded Modulefiles:
1) miniconda3/4.8.2-gcc-8.3.1-3m7b6t2
%% Cell type:markdown id: tags:
Put this file
`load_modules_into_jupyter.conf`
into your Home directory and your Notebook environment will have these modules loaded.
It is not possible to load these modules via magic (python magic ;).
**It needs the empty line at the end...**
%% Cell type:code id: tags:
```
python
%%
writefile
~/
load_modules_into_jupyter
.
conf
eccodes
/
2.18
.
0
-
gcc
-
8.3
.
1
-
s7clum3
```
%% Output
Writing /jetfs/home/mblaschek/load_modules_into_jupyter.conf
%% Cell type:code id: tags:
```
python
!
cat
~/
load_modules_into_jupyter
.
conf
```
%% Output
eccodes/2.18.0-gcc-8.3.1-s7clum3
%% Cell type:markdown id: tags:
### Restart the kernel and you should see that the module is loaded
%% Cell type:code id: tags:
```
python
!
module
list
--
no
-
pager
```
%% Output
Currently Loaded Modulefiles:
1) miniconda3/4.8.2-gcc-8.3.1-3m7b6t2
2) zlib/1.2.11-gcc-8.3.1-bbbpnzp
3) openmpi/4.0.5-gcc-8.3.1-773ztsv
4) hdf5/1.12.0-gcc-8.3.1-awl4atl
5) parallel-netcdf/1.12.1-gcc-8.3.1-xxrhtxn
6) netcdf-c/4.7.4-gcc-8.3.1-fh4nn6k
7) eccodes/2.18.0-gcc-8.3.1-s7clum3
%% Cell type:markdown id: tags:
### Now all the dependencies are loaded as well
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment