Running Cactus in parallel on two PCs
Let's suppose we have hosts A and B. The steps to follow are:
-
Create a new user in both hosts. It's a very good idea to have the same
username in both hosts.
-
Make a copy of the executable program and the par file in the hosts. You can
place this files at the home directory or in any other location, but make sure
they are in the same place at both hosts. Keep in mind that if you change
or recompile the executable you have to copy the new one to the other host. The
same holds for the par file.
-
Create a file containing the full name of the hosts and optionally the
username that is going to run cactus remotely. This file is going to be used
by lamboot. Example:
A.phys.utb.edu user=coyote
B.phys.utb.edu user=coyote
Here 'coyote' is the username needed to run cactus in the hosts. Save this file
as 'MyLamMachines' (of course, you can change the name).
-
Now type
lamboot -vb MyLamMachines
If everything goes well, you will be asked for the password of user coyote, and topology
will be done. It possible that you can not complete this step successfully the first time,
so try again until it prompts for the password.
-
Go to the directory in which you have the executable file, and type
mpirun -np 2 ./cactus_WaveDemo WaveDemo.par
Where 'cactus_WaveDemo' is the executable file and 'WaveDemo.par' is the par file.
This will start running cactus on hosts A and B.
It's a good idea to execute the 'top' command to verify whether processes are
indeed running.
It would be wise for user coyote to have the same .bash_profile in the hosts.
The above instruction may be generalized for any number of hosts, just writing their names in the
file 'MyLamMachines' and making copies of the exe and par files on every host.