From e3eb66478ed8a0daa2a5bcd011fb2c1275a230e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Gajdu=C5=A1ek?= <gajdusek.pavel@gmail.com> Date: Mon, 11 Sep 2017 11:01:09 +0200 Subject: [PATCH] lint --- docs.it4i/anselm/software/mpi/mpi4py-mpi-for-python.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs.it4i/anselm/software/mpi/mpi4py-mpi-for-python.md b/docs.it4i/anselm/software/mpi/mpi4py-mpi-for-python.md index ed91eb9e7..36769b8d2 100644 --- a/docs.it4i/anselm/software/mpi/mpi4py-mpi-for-python.md +++ b/docs.it4i/anselm/software/mpi/mpi4py-mpi-for-python.md @@ -108,11 +108,10 @@ $ mpiexec -bycore -bind-to-core python hello_world.py In this example, we run MPI4Py enabled code on 4 nodes, 16 cores per node (total of 64 processes), each python process is bound to a different core. More examples and documentation can be found on [MPI for Python webpage](https://pypi.python.org/pypi/mpi4py). -###Adding numbers +### Adding numbers Task: count sum of numbers from 1 to 1 000 000. (There is an easy formula to count the sum of arithmetic sequence, but we are showing the MPI solution with adding numbers one by one). - ```python #!/usr/bin/python @@ -160,6 +159,7 @@ if rank == 0: ``` Execute the code above as: + ```console $ qsub -I -q qexp -l select=4:ncpus=16,walltime=00:30:00 @@ -167,4 +167,5 @@ $ ml Python/3.5.2-intel-2017.00 $ mpirun -n 2 python myprogram.py ``` + You can increase n and watch time lowering. -- GitLab