Skip to content

Commit 3144fdf

Browse files
committed
Merge main
2 parents 177b2f3 + 8f39e08 commit 3144fdf

File tree

120 files changed

+4584
-2116
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+4584
-2116
lines changed

config/templates/hpc.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ nav:
2323
- Troubleshooting: troubleshooting.md
2424
- HPC Policies: sites/hpc_policies.md
2525
- Advanced topics:
26+
- Torque frontend via jobcli: torque_frontend_via_jobcli.md
2627
- Fine-tuning Job Specifications: fine_tuning_job_specifications.md
2728
- Multi-job submission: multi_job_submission.md
2829
- Compiling and testing your software on the HPC: compiling_your_software.md
@@ -49,9 +50,11 @@ nav:
4950
- AlphaFold: alphafold.md
5051
- Apptainer/Singularity: apptainer.md
5152
- EasyBuild: easybuild.md
53+
- Jupyter notebook: jupyter.md
5254
- MATLAB: MATLAB.md
5355
- mympirun: mympirun.md
5456
- OpenFOAM: openFOAM.md
57+
- Python virtual environments: setting_up_python_virtual_environments.md
5558
- FAQ:
5659
- Frequently Asked Questions: FAQ.md
5760
- Appendices:

intro-HPC/examples/MATLAB/jobscript.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#PBS -l walltime=1:0:0
44
#
55
# Example (single-core) MATLAB job script
6-
# see http://hpcugent.github.io/vsc_user_docs/
76
#
87

98
# make sure the MATLAB version matches with the one used to compile the MATLAB program!

mkdocs/docs/HPC/FAQ.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Overview of HPC-UGent Tier-2 [infrastructure]({{ hpc_infrastructure_url }})
1616

1717
### How many cores/nodes should I request?
1818

19-
An important factor in this question is how well your task is being parallellized:
19+
An important factor in this question is how well your task is being parallelized:
2020
does it actually run faster with more resources? You can test this yourself:
2121
start with 4 cores, then 8, then 16... The execution time should each time be reduced to
2222
around half of what it was before. You can also try this with full nodes: 1 node, 2 nodes.
@@ -171,7 +171,7 @@ Not all file locations perform the same. In particular, the `$VSC_HOME` and `$VS
171171
directories are, relatively, very slow to access. Your jobs should rather use the
172172
`$VSC_SCRATCH` directory, or other fast locations (depending on your needs), described
173173
in [Where to store your data on the HPC](../running_jobs_with_input_output_data/#where-to-store-your-data-on-the-hpc).
174-
As an example how do this: The job can copy the input to the scratch directory, then execute
174+
As an example how to do this: The job can copy the input to the scratch directory, then execute
175175
the computations, and lastly copy the output back to the data directory.
176176
Using the home and data directories is especially a problem when UGent isn't your home institution:
177177
your files may be stored, for example, in Leuven while you're running a job in Ghent.
@@ -217,12 +217,13 @@ See the explanation about how jobs get prioritized in [When will my job start](.
217217

218218
{% else %}
219219

220-
In practice it's
220+
In practice, it's
221221
impossible to predict when your job(s) will start, since most currently
222-
running jobs will finish before their requested walltime expires, and
223-
new jobs by may be submitted by other users that are assigned a higher
224-
priority than your job(s). You can use the `showstart` command. For more
225-
information, see .
222+
running jobs will finish before their requested walltime expires.
223+
New jobs may be submitted by other users that are assigned a higher
224+
priority than your job(s).
225+
You can use the `squeue --start` command to get an estimated start time for your jobs in the queue.
226+
Keep in mind that this is just an estimate.
226227

227228
{% endif %}
228229

@@ -282,10 +283,11 @@ of files so other users can access the data. For example, the following
282283
command will enable a user named "otheruser" to read the file named
283284
`dataset.txt`. See
284285

285-
<pre><code>$ <b>setfacl -m u:otheruser:r dataset.txt</b>
286-
$ <b>ls -l dataset.txt</b>
286+
```
287+
$ setfacl -m u:otheruser:r dataset.txt
288+
$ ls -l dataset.txt
287289
-rwxr-x---+ 2 {{userid}} mygroup 40 Apr 12 15:00 dataset.txt
288-
</code></pre>
290+
```
289291

290292
For more information about `chmod` or `setfacl`, see
291293
[Linux tutorial](linux-tutorial/manipulating_files_and_directories.md#changing-permissions-chmod).
@@ -317,6 +319,12 @@ Please send an e-mail to {{hpcinfo}} that includes:
317319

318320
{% endif %}
319321

322+
If the software is a Python package, you can manually install it in a virtual environment.
323+
More information can be found [here](./setting_up_python_virtual_environments.md).
324+
Note that it is still preferred to submit a software installation request,
325+
as the software installed by the HPC team will be optimized for the HPC environment.
326+
This can lead to dramatic performance improvements.
327+
320328
### Is my connection compromised? Remote host identification has changed
321329

322330
On Monday 25 April 2022, the login nodes received an update to RHEL8.

mkdocs/docs/HPC/HOD.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ Before using HOD, you first need to load the `hod` module. We don't
1616
specify a version here (this is an exception, for most other modules you
1717
should, see [Using explicit version numbers](../running_batch_jobs/#using-explicit-version-numbers)) because newer versions might include important bug fixes.
1818

19-
<pre><code>$ <b>module load hod</b>
20-
</code></pre>
19+
```
20+
module load hod
21+
```
2122

2223
### Compatibility with login nodes
2324

@@ -31,16 +32,17 @@ cluster module before loading the `hod` module and subsequently running
3132

3233
For example, this will work as expected:
3334

34-
<pre><code>$ <b>module swap cluster/{{othercluster}}</b>
35-
$ <b>module load hod</b>
36-
$ <b>hod</b>
35+
```
36+
$ module swap cluster/{{othercluster}}
37+
$ module load hod
38+
$ hod
3739
hanythingondemand - Run services within an HPC cluster
3840
usage: hod <subcommand> [subcommand options]
3941
Available subcommands (one of these must be specified!):
4042
batch Submit a job to spawn a cluster on a PBS job controller, run a job script, and tear down the cluster when it's done
4143
clean Remove stale cluster info.
4244
...
43-
</code></pre>
45+
```
4446

4547
Note that also modules named `hanythingondemand/*` are available. These
4648
should however not be used directly, since they may not be compatible
@@ -52,13 +54,14 @@ for).
5254
The `hod` module will also put a basic configuration in place for HOD,
5355
by defining a couple of `$HOD_*` environment variables:
5456

55-
<pre><code>$ <b>module load hod</b>
56-
$ <b>env | grep HOD | sort</b>
57+
```
58+
$ module load hod
59+
$ env | grep HOD | sort
5760
HOD_BATCH_HOD_MODULE=hanythingondemand/3.2.2-intel-2016b-Python-2.7.12
5861
HOD_BATCH_WORKDIR=$VSC_SCRATCH/hod
5962
HOD_CREATE_HOD_MODULE=hanythingondemand/3.2.2-intel-2016b-Python-2.7.12
6063
HOD_CREATE_WORKDIR=$VSC_SCRATCH/hod
61-
</code></pre>
64+
```
6265

6366
By defining these environment variables, we avoid that you have to
6467
specify `--hod-module` and `--workdir` when using `hod batch` or
@@ -85,26 +88,27 @@ will be marked as `<job-not-found>`.
8588

8689
You should occasionally clean this up using `hod clean`:
8790

88-
<pre><code>$ <b>module list</b>
91+
```
92+
$ module list
8993
Currently Loaded Modulefiles:
9094
1) cluster/{{defaultcluster}}(default) 2) pbs_python/4.6.0 3) vsc-base/2.4.2 4) hod/3.0.0-cli
9195
92-
$ <b>hod list</b>
96+
$ hod list
9397
Cluster label Job ID State Hosts
9498
example1 {{jobid}} &lt;job-not-found&gt; &lt;none&gt;
9599
96-
$ <b>hod clean</b>
100+
$ hod clean
97101
Removed cluster localworkdir directory /user/scratch/gent/vsc400/vsc40000/hod/hod/{{jobid}} for cluster labeled example1
98102
Removed cluster info directory /user/home/gent/vsc400/vsc40000/.config/hod.d/wordcount for cluster labeled example1
99103
100-
$ <b>module swap cluster/{{othercluster}}</b>
104+
$ module swap cluster/{{othercluster}}
101105
Cluster label Job ID State Hosts
102106
example2 98765.master19.{{othercluster}}.gent.vsc &lt;job-not-found&gt; &lt;none&gt;
103107
104-
$ <b>hod clean</b>
108+
$ hod clean
105109
Removed cluster localworkdir directory /user/scratch/gent/vsc400/vsc40000/hod/hod/98765.master19.{{othercluster}}.gent.vsc for cluster labeled example2
106110
Removed cluster info directory /user/home/gent/vsc400/vsc40000/.config/hod.d/wordcount for cluster labeled example2
107-
</code></pre>
111+
```
108112
Note that **only HOD clusters that were submitted to the currently loaded `cluster` module will be cleaned up**.
109113

110114
## Getting help

mkdocs/docs/HPC/MATLAB.md

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,12 @@ To access the MATLAB compiler, the `MATLAB` module should be loaded
3737
first. Make sure you are using the same `MATLAB` version to compile and
3838
to run the compiled MATLAB program.
3939

40-
<pre><code>$ <b>module avail MATLAB/</b>
40+
```
41+
$ module avail MATLAB/
4142
----------------------/apps/gent/RHEL8/zen2-ib/modules/all----------------------
4243
MATLAB/2021b MATLAB/2022b-r5 (D)
43-
$ <b>module load MATLAB/2021b</b>
44-
</code></pre>
44+
$ module load MATLAB/2021b
45+
```
4546

4647
After loading the `MATLAB` module, the `mcc` command can be used. To get
4748
help on `mcc`, you can run `mcc -?`.
@@ -53,12 +54,14 @@ flag means verbose output). To show how `mcc` can be used, we use the
5354
First, we copy the `magicsquare.m` example that comes with MATLAB to
5455
`example.m`:
5556

56-
<pre><code>$ <b>cp $EBROOTMATLAB/extern/examples/compiler/magicsquare.m example.m</b>
57-
</code></pre>
57+
```
58+
cp $EBROOTMATLAB/extern/examples/compiler/magicsquare.m example.m
59+
```
5860

5961
To compile a MATLAB program, use `mcc -mv`:
6062

61-
<pre><code><b>mcc -mv example.m</b>
63+
```
64+
mcc -mv example.m
6265
Opening log file: {{homedir}}/java.log.34090
6366
Compiler version: 8.3 (R2021b)
6467
Dependency analysis by REQUIREMENTS.
@@ -67,7 +70,7 @@ Parsing file "{{homedir}}/example.m"
6770
Deleting 0 temporary MEX authorization files.
6871
Generating file "{{homedir}}/readme.txt".
6972
Generating file "run\_example.sh".
70-
</code></pre>
73+
```
7174

7275
### Libraries
7376

@@ -90,8 +93,9 @@ MATLAB program on the login nodes, consider tweaking the default maximum
9093
heap size (128M) of Java using the `_JAVA_OPTIONS` environment variable
9194
with:
9295

93-
<pre><code>$ <b>export _JAVA_OPTIONS="-Xmx64M"</b>
94-
</code></pre>
96+
```
97+
export _JAVA_OPTIONS="-Xmx64M"
98+
```
9599

96100
The MATLAB compiler spawns multiple Java processes. Because of the
97101
default memory limits that are in effect on the login nodes, this might
@@ -102,14 +106,16 @@ to fit in memory.
102106
Another possible issue is that the heap size is too small. This could
103107
result in errors like:
104108

105-
<pre><code>Error: Out of memory
106-
</code></pre>
109+
```
110+
Error: Out of memory
111+
```
107112

108113
A possible solution to this is by setting the maximum heap size to be
109114
bigger:
110115

111-
<pre><code>$ <b>export _JAVA_OPTIONS="-Xmx512M"</b>
112-
</code></pre>
116+
```
117+
export _JAVA_OPTIONS="-Xmx512M"
118+
```
113119

114120
## Multithreading
115121

@@ -130,8 +136,7 @@ you requested when submitting your job script (the `ppn` value, see [Generic res
130136
You can determine the right number of workers to use via the following
131137
code snippet in your MATLAB program:
132138

133-
<div style="text-align: center;">-- parpool.m --</div>
134-
```matlab
139+
```matlab title="parpool.m"
135140
{% include "./examples/MATLAB/parpool.m" %}
136141
```
137142

@@ -143,22 +148,25 @@ documentation](https://nl.mathworks.com/help/distcomp/parpool.html).
143148
Each time MATLAB is executed, it generates a Java log file in the users
144149
home directory. The output log directory can be changed using:
145150

146-
<pre><code>$ <b>MATLAB_LOG_DIR=<i>&lt;OUTPUT_DIR&gt;</i></b>
147-
</code></pre>
151+
```
152+
MATLAB_LOG_DIR=<OUTPUT_DIR>
153+
```
148154

149155
where `<OUTPUT_DIR>` is the name of the desired output directory. To
150156
create and use a temporary directory for these logs:
151157

152-
<pre><code># create unique temporary directory in $TMPDIR (or /tmp/$USER if
158+
```
159+
# create unique temporary directory in $TMPDIR (or /tmp/$USER if
153160
$TMPDIR is not defined)
154161
# instruct MATLAB to use this directory for log files by setting $MATLAB_LOG_DIR
155-
$ <b> export MATLAB_LOG_DIR=$ (mktemp -d -p $TMPDIR:-/tmp/$USER)</b>
156-
</code></pre>
162+
$ export MATLAB_LOG_DIR=$ (mktemp -d -p $TMPDIR:-/tmp/$USER)
163+
```
157164

158165
You should remove the directory at the end of your job script:
159166

160-
<pre><code>$ <b> rm -rf $MATLAB_LOG_DIR</b>
161-
</code></pre>
167+
```
168+
rm -rf $MATLAB_LOG_DIR
169+
```
162170

163171
## Cache location
164172

@@ -169,9 +177,10 @@ location and size of this cache can be changed through the
169177
The snippet below would set the maximum cache size to 1024MB and the
170178
location to `/tmp/testdirectory`.
171179

172-
<pre><code>$ <b>export MATLAB_CACHE_ROOT=/tmp/testdirectory </b>
173-
$ <b>export MATLAB_CACHE_SIZE=1024M </b>
174-
</code></pre>
180+
```
181+
export MATLAB_CACHE_ROOT=/tmp/testdirectory
182+
export MATLAB_CACHE_SIZE=1024M
183+
```
175184

176185
So when MATLAB is running, it can fill up to 1024MB of cache in
177186
`/tmp/testdirectory`.
@@ -182,7 +191,6 @@ All of the tweaks needed to get MATLAB working have been implemented in
182191
an example job script. This job script is also available on the HPC.
183192
<!-- %TODO: where? -->
184193

185-
<div style="text-align: center;">-- jobscript.sh --</div>
186-
```bash
194+
```bash title="jobscript.sh"
187195
{% include "./examples/MATLAB/jobscript.sh" %}
188196
```

0 commit comments

Comments
 (0)