diff --git a/notebooks/3b--Software_Engineering.ipynb b/notebooks/3b--Software_Engineering.ipynb index 8fe9dcac8d13c380023b007411a590c179011493..203fbb401c437aad4238d4c3cad7ac37683a02d7 100644 --- a/notebooks/3b--Software_Engineering.ipynb +++ b/notebooks/3b--Software_Engineering.ipynb @@ -158,7 +158,7 @@ "* source code\n", "* installation routines (`setup.py`)\n", "* user documentation - how to use the package\n", - "* develper documentation - how to develop code for the package\n", + "* developer documentation - how to develop code for the package\n", "* software tests\n", "* commonly expected text files to help people get information quickly (e.g. on public repositories)\n", " * `README`\n", @@ -320,11 +320,11 @@ "source": [ "## Testing\n", "* Tests are a central part of the software development life cycle\n", - " * Avoid regression\n", - " * Facilitate collaboration\n", + " * avoid regression\n", + " * facilitate collaboration\n", "* **Continuous integration**:\n", " * merge contributions often\n", - " * run tests automatically at each code commit, e.g. via GitLab-CI\n", + " * run tests automatically for each code commit, e.g. via GitLab-CI\n", "* Unit tests\n", " * test functions, classes, modules individually\n", "* Integration tests\n", diff --git a/notebooks/4a--Parallel_Programming.ipynb b/notebooks/4a--Parallel_Programming.ipynb index f6f941af4bfe09b42b4757d02bf1335d6bc0fc0e..8690043d2c1f59bc0e5e0f8672228a627d1da6ca 100644 --- a/notebooks/4a--Parallel_Programming.ipynb +++ b/notebooks/4a--Parallel_Programming.ipynb @@ -121,12 +121,13 @@ "\n", "#### How does Python fit in here?\n", "\n", - "* Level 1: distributed memory, communication via messages\n", + "* Level 1: distributed memory, communication via messages over a network\n", " * `mpi4py`\n", "* Levels 2 and 3: shared memory\n", + " * `mpi4py`\n", " * `multiprocessing`\n", " * threading, e.g. OpenMP, Cython, Numba, NumPy using an optimized math library like MKL\n", - "* Level 4: hope that the libraries (NumPy $\\to$ MKL) or compilers (C/F, Cython, Numba) do it right!" + "* Level 4: rely on libraries (NumPy $\\to$ MKL) or compilers (C/F, Cython, Numba) to do it right!" ] }, { @@ -257,7 +258,8 @@ "source": [ "## Parallelism in Python\n", "\n", - "* Threads (not useful for HPC)\n", + "* Python-internal threads (not useful for HPC!)\n", + "* multithreaded modules or libraries (e.g. Numba, NumPy with MKL, etc.)\n", "* Processes (shared memory)\n", " * `multiprocessing`, comparably easy to use\n", " * restricted to one node\n", @@ -570,7 +572,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -595,7 +597,7 @@ "p.start()\n", "print(q.get(), q.get(), q.get())\n", "p.join()\n", - "#print(q.get(), q.get(), q.get())" + "print(q.get(), q.get(), q.get())" ] }, { @@ -1883,8 +1885,8 @@ "#SBATCH -e ./job.err.%j\n", "#SBATCH -D ./\n", "#SBATCH -J MPI4PY\n", - "#SBATCH --nodes=2 # launch 192 MPI tasks\n", - "#SBATCH --ntasks-per-node=96 # on two full nodes (i.e. on 2 x 96 physical cores)\n", + "#SBATCH --nodes=2 # launch 144 MPI tasks\n", + "#SBATCH --ntasks-per-node=72 # on two full nodes (i.e. on 2 x 72 physical cores)\n", "#SBATCH --cpus-per-task=1\n", "#SBATCH --time=00:10:00\n", "\n", @@ -2223,7 +2225,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.3" + "version": "3.8.8" } }, "nbformat": 4,