53
edits
m |
|||
==== Step 1. From Terminal run following command to create a parallel profile
$ ipython3 profile create --parallel --profile=myprofile
If this is completed successfully, then there should be some config files like ipcontroller_config.py, ipcluster_config.py, etc in the folder <NetID>/.ipython/profile_myprofile. Check this folder, if you are missing these config files, there might be some issue with the installation of IPython on the system.
==== Step 2. We modify ipcluster_config.py so that engines are launched in remote machines and controller is launched on local machine
$ cd <NetID>/.ipython/profile_myprofile
Save and exit file. This step is important because otherwise the controller won't be able to listen on the engines and no parallel computation will happen.
==== Step 3. With this you should have parallel computing set up. Examples with IPython and MPI
====== Only IPython
Launch IPython with the profile you created and edited:
[[File:IPython_Parallel_Computing_Result_1.png|link=https://e.math.cornell.edu/wiki/index.php/File:IPython%20Parallel%20Computing%20Result%201.png|alt=|655x655px]][[File:IPython_Parallel_Computing_Result_2.png|link=https://e.math.cornell.edu/wiki/index.php/File:IPython%20Parallel%20Computing%20Result%202.png|alt=|frameless|658x658px]]
====== Example with MPI
Code (taken from <nowiki>https://ipyparallel.readthedocs.io/en/latest/</nowiki>):
|
edits