Skip to content
Snippets Groups Projects
Commit e3eb6647 authored by Pavel Gajdušek's avatar Pavel Gajdušek
Browse files

lint

parent bdd40be5
No related branches found
No related tags found
6 merge requests!368Update prace.md to document the change from qprace to qprod as the default...,!367Update prace.md to document the change from qprace to qprod as the default...,!366Update prace.md to document the change from qprace to qprod as the default...,!323extended-acls-storage-section,!196Master,!161Gajdusek cleaning
...@@ -108,11 +108,10 @@ $ mpiexec -bycore -bind-to-core python hello_world.py ...@@ -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). 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). 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 ```python
#!/usr/bin/python #!/usr/bin/python
...@@ -160,6 +159,7 @@ if rank == 0: ...@@ -160,6 +159,7 @@ if rank == 0:
``` ```
Execute the code above as: Execute the code above as:
```console ```console
$ qsub -I -q qexp -l select=4:ncpus=16,walltime=00:30:00 $ 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 ...@@ -167,4 +167,5 @@ $ ml Python/3.5.2-intel-2017.00
$ mpirun -n 2 python myprogram.py $ mpirun -n 2 python myprogram.py
``` ```
You can increase n and watch time lowering. You can increase n and watch time lowering.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment