Skip to content

Commit

Permalink
Merge pull request #707 from lbarraga/detect-html-workflow
Browse files Browse the repository at this point in the history
html detection workflow
  • Loading branch information
boegel authored Sep 19, 2024
2 parents 35ab523 + 9c67553 commit 93fcb6a
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 30 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/detect_html.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: HTML tag detection

on: [push, pull_request]

jobs:
html-check:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Check if no HTML tags are present in markdown files located at mkdocs/docs/HPC/
run: |
# -n: show line number
# -H: show filename
# -o: show only the matching part of the line
if grep -nHo '</[^>]*>' mkdocs/docs/HPC/*.md; then
exit 1
else
echo "No HTML tags detected in Markdown files."
fi
29 changes: 13 additions & 16 deletions mkdocs/docs/HPC/jupyter.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,33 @@ A [Jupyter notebook](https://jupyter.org/) is an interactive, web-based environm

Through the [HPC-UGent web portal](web_portal.md) you can easily start a Jupyter notebook on a workernode, via the *Jupyter Notebook* button under the *Interactive Apps* menu item.

<center>

![image](img/ood_start_jupyter.png)
</center>


After starting the Jupyter notebook using the *Launch* button, you will see it being added in state *Queued* in the overview of interactive sessions (see *My Interactive Sessions* menu item):

<center>

![image](img/ood_jupyter_queued.png)
</center>


When your job hosting the Jupyter notebook starts running, the status will first change the *Starting*:

<center>

![image](img/ood_jupyter_starting.png)
</center>


and eventually the status will change to *Running*, and you will be able to connect to the Jupyter environment using the blue *Connect to Jupyter* button:

<center>

![image](img/ood_jupyter_running.png)
</center>


This will launch the Jupyter environment in a new browser tab, where you can open an existing notebook by navigating to the directory where it is located and clicking it. You can also create a new notebook by clicking on `File`>`New`>`Notebook`:

<center>

![image](img/ood_jupyter_new_notebook.png)
</center>


### Using extra Python packages

Expand All @@ -45,9 +45,7 @@ The first thing we need to do is finding the modules that contain our package of

To find the appropriate modules, it is recommended to use the shell within the web portal under `Clusters`>`>_login Shell Access`.

<center>
![image](img/ood_open_shell.png)
</center>

We can see all available versions of the SciPy module by using `module avail SciPy-bundle`:

Expand All @@ -65,9 +63,9 @@ $ module avail SciPy-bundle

Not all modules will work for every notebook, we need to use the one that uses the same toolchain as the notebook we want to launch. To find that toolchain, we can look at the `JupyterNotebook version` field when creating a notebook. In our example `7.2.0` is the version of the notebook and `GCCcore/13.2.0` is the toolchain used.

<center>

![image](img/ood_jupyter_version.png)
</center>


Module names include the toolchain that was used to install the module (for example `gfbf-2023b` in `SciPy-bundle/2023.11-gfbf-2023b` means that that module uses the toolchain `gfbf/2023`). To see which modules are compatible with each other, you can check the table on the [page about Module conflicts](troubleshooting.md#module-conflicts). Another way to find out which `GCCcore` subtoolchain goes with the particular toolchain of the module (such as `gfbf/2023b`) is to use `module show`. In particular using `module show <toolchain of the module> | grep GCC` (before the module has been loaded) will return this `GCCcore` version.

Expand Down Expand Up @@ -101,6 +99,5 @@ Lmod has detected the following error: ...
Now that we found the right module for the notebook, add `module load <module_name>` in the `Custom code` field when creating a notebook and you can make use of the packages within that notebook.
<center>
![image](img/ood_jupyter_custom_code.png)
</center>
29 changes: 15 additions & 14 deletions mkdocs/docs/HPC/torque_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@

Below is a list of the most common and useful directives.

| Option | System type | Description |
|:---------:|:-------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| -k | All | Send "stdout" and/or "stderr" to your home directory when the job runs <br> **#PBS -k o** or **#PBS -k e** or **#PBS -koe**</br> |
| -l | All | Precedes a resource request, e.g., processors, wallclock |
| -M | All | Send an e-mail messages to an alternative e-mail address <br> **#PBS -M [email protected]**</br> |
| -m | All | Send an e-mail address when a job **b**egins execution and/or **e**nds or **a**borts <br> **#PBS -m b** or **#PBS -m be** or **#PBS -m ba** |
| mem | Shared Memory | Memory & Specifies the amount of memory you need for a job. <br>**#PBS -I mem=90gb** |
| mpiproces | Clusters | Number of processes per node on a cluster. This should equal number of processors on a node in most cases. <br> **#PBS -l mpiprocs=4** |
| -N | All | Give your job a unique name <br>**#PBS -N galaxies1234**</br> |
| -ncpus | Shared Memory | The number of processors to use for a shared memory job. <br>**#PBS ncpus=4**</br> |
| -r | All | ontrol whether or not jobs should automatically re-run from the start if the system crashes or is rebooted. Users with check points might not wish this to happen. <br>**#PBS -r n**</br><br>**#PBS -r y**</br> |
| select | Clusters | Number of compute nodes to use. Usually combined with the mpiprocs directive <br>**#PBS -l select=2**</br> |
| -V | All | Make sure that the environment in which the job **runs** is the same as the environment in which it was **submitted <br> #PBS -V</br>** |
| Walltime | All | The maximum time a job can run before being stopped. If not used a default of a few minutes is used. Use this flag to prevent jobs that go bad running for hundreds of hours. Format is HH:MM:SS <br>**#PBS -l walltime=12:00:00**</br> |
| Option | System type | Description | Jobscript comment |
|:---------:|:-------------:|:---------------------------------------------------------------------------------------------------------|:--------------------------------------------------|
| -k | All | Send "stdout" and/or "stderr" to your home directory when the job runs | **#PBS -k o** or **#PBS -k e** or **#PBS -koe** |
| -l | All | Precedes a resource request, e.g., processors, wallclock | |
| -M | All | Send an e-mail message to an alternative e-mail address | **#PBS -M [email protected]** |
| -m | All | Send an e-mail when a job begins execution, ends, or aborts | **#PBS -m b** or **#PBS -m be** or **#PBS -m ba** |
| mem | Shared Memory | Memory & Specifies the amount of memory you need for a job. | **#PBS -I mem=90gb** |
| mpiproces | Clusters | Number of processes per node on a cluster. This usually equals the number of processors on a node. | **#PBS -l mpiprocs=4** |
| -N | All | Give your job a unique name | **#PBS -N galaxies1234** |
| -ncpus | Shared Memory | The number of processors to use for a shared memory job. | **#PBS ncpus=4** |
| -r | All | Control whether or not jobs should automatically re-run from the start if the system crashes or reboots. | **#PBS -r n** or **#PBS -r y** |
| select | Clusters | Number of compute nodes to use. Usually combined with the mpiprocs directive | **#PBS -l select=2** |
| -V | All | Ensure that the environment in which the job runs is the same as the one in which it was submitted | **#PBS -V** |
| Walltime | All | Maximum time a job can run before being stopped. Format is HH:MM:SS | **#PBS -l walltime=12:00:00** |


## Environment Variables in Batch Job Scripts

Expand Down

0 comments on commit 93fcb6a

Please sign in to comment.