Lets set-up two local PC machines connected via LAN cable for parallel simulation with OpenFOAM:
0) User names on both machines must be the same, the versions of OpenFOAM code its relative path on the machines must be the same as well.
1) Connect PCs via LAN, set-up IP address manually, for example: 192.168.34.1 and 192.168.34.1, subnet mask: 255.255.0.0
2) Check if the PCs can “see” each other by ping command
3) Share folders from one to another PC, check if they can see those folders in “network”
4) Install ssh (server and client), configure /etc/ssh/ssh_ config and /etc/ssh/sshd_ config files
5) Edit file /etc/host: дadd two strings – “192.168.34.1 server” and “192.168.34.1 client”
6) Check if the connection could be established via ssh using “ssh server_name” command
8) Decompose the case on every local machine by the sum number of core on two machines
9) Start the solver via command:
mpirun –hostfile machines -np cores_number $HOME/OpenFOAM/OpenFOAM-version/bin/foamExec solverName -parallel