|
[Sponsors] |
Distributed Parallel with Windows Subsystem for Linux |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 5, 2019, 01:03 |
Distributed Parallel with Windows Subsystem for Linux
|
#1 |
Member
Ndong-Mefane Stephane Boris
Join Date: Nov 2013
Location: Kawasaki (JAPAN)
Posts: 53
Rep Power: 13 |
Hello,
I am trying to run the cavity example using two nodes (it works on both nodes in single node mode...), but I am having the problem similar described below: - When I run: mpirun --hostfile machines -np 4 icoFoam -parallel the application just hangs without any error message. - When I try from node1: ssh node2 "icoFoam -help" I get the following error message "bash: icoFoam: command not found" Openfoam v1906 is installed on both nodes, the command "icoFoam -help" works when run on each node, and simple commands such as "ssh node2 'ls' " ran from node1 give the expected result. I am using windows10 WSL Is it possible to use OpenFoam distributed parallel on WSL nodes? if yes, How??? help please!!! Kazunobu |
|
October 10, 2020, 02:39 |
Distributed Parallel with Windows Subsystem for Linux
|
#2 |
New Member
Akram P A
Join Date: Apr 2020
Location: Kochi - India
Posts: 15
Rep Power: 6 |
Hi,
Could you do this distributed parallel in WSL installation mode? Any guidance will be much appreciated. Thanks and Regards, Akram |
|
October 11, 2020, 23:32 |
Distributed parallel in WSL
|
#3 |
Member
Ndong-Mefane Stephane Boris
Join Date: Nov 2013
Location: Kawasaki (JAPAN)
Posts: 53
Rep Power: 13 |
Hello Akram,
The first thing you need to do is to be able to connect to your client from the server through ssh, without using password (the command "ssh 'client_or_client_IP' " connects without requiring a password). you can check the following link for the configuration steps: https://www.illuminiastudios.com/dev...tem-for-linux/ Next, make sure that the same version of openfoam is installed in the same folder on all machines. Now, concerning the openfoam project directory, my advice is to use the same directory structure on all computers. for example on the main node, I use the folder "node1" on the Windows drive E:/ to save the project folder. Accessing it from WSL will look like: Code:
cd /mnt/e/node1/ Next is the decomposePartDict file. below is an example of a poject using 30 processes distributed among 2 nodes: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1906 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object decomposeParDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // numberOfSubdomains 30; method scotch; // method ptscotch; coeffs { n (3 2 1); } distributed yes; roots 29 ( "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" "/mnt/e/node1" ); // ************************************************************************* // after that you need the "machines" file in your directory (see openfoam manual) Copy your project folder to the taget nodes directories and run your calculation. Warning, sometime the openfoam environment is not activated when you connect through ssh. you will need to do the following: After correctly configuring your ssh connection add the following in the file "~/.ssh/environment": Code:
. $HOME/.bashrc https://superuser.com/questions/4878...an-ssh-command Just contact me again if you're stuck, or don't understand something in my Explanation. Kazu |
|
October 12, 2020, 11:41 |
Distributed parallel in WSL
|
#4 |
New Member
Akram P A
Join Date: Apr 2020
Location: Kochi - India
Posts: 15
Rep Power: 6 |
Thank you so much. I will check and let you know.
Best Regards, Akram P. A. |
|
January 6, 2021, 03:00 |
|
#5 |
Member
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 12 |
I’m working on the openFoam in WSL platform and I’m a beginner in CFD analysis. For running the simulation in parallel using cores of different computes, for a trial I have considered two multi-core computers available on the network, and I want to parallelize a case using cores on both machines. I tried it with "distributed yes" in decomposeParDic.
As per your guidelines in previous thread, I have connected 2 systems through ssh, without using password and same version of openfoam is installed in the same folder on all machines. As you mentioned, the same openfoam project directory structure maintained in both systems. (“ /mnt/c/CFD/Parallel/1” ) In beginning for making it simple, I planned to use one core on each machine. Let 1 be the machine I'm launching the job from and 2 be the other one. I have created a file "machines" with the following content (ipadresses hidden by x's): Code: xx.x.x.xx1 cpu=1 xx.x.x.xx2 cpu=1 I tried decomposeParDict as mentioned below, numberOfSubdomains 2; method scotch; distributed yes; roots 1 ( // path to the openfoam project directory on machine 2 which is same as created in machine 1 “ /mnt/c/CFD/Parallel/1” ) Then I do in machine 1, in case directory, blockMesh decomposePar mpiexec –hostfile machines –np 2 interFoam –parallel After that I got this error: ************************************************** *********** mpiexec was unable to find the specified executable file, and therefore did not launch the job. This error was first reported for process rank 0; it may have occurred for other process as well. Note : A common cause for this error is misspelling a mpiexec command line parameter option (remember that mpiexec interprets thefirst unrecognized command line token as the executed). Note : xx.xxx.x..xx Executable: /opt/openfoam8/platforms/linux64GccDPInt320pt/bin/interFoam ************************************************** *********** What I’m doing wrong here?Any help will be greatly appreciated. |
|
January 7, 2021, 08:44 |
|
#6 |
Member
Ndong-Mefane Stephane Boris
Join Date: Nov 2013
Location: Kawasaki (JAPAN)
Posts: 53
Rep Power: 13 |
Hello Sachin,
In your case I would check the following: - do you have MPI installed and correctly configured on all computer ? - did you try mpirun instead of mpiexec? - Did you configure the environment as explained in my previous post?: "...Warning, sometime the openfoam environment is not activated when you connect through ssh. you will need to do the following:....." Kazu |
|
January 11, 2021, 01:40 |
|
#7 |
Member
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 12 |
Hi kazu,
Thanks for your response, I have been gone through the steps you mentioned and verified all and seems to done properly but again hit on same error, but I found from this forum, a solution for the same error which I mentioned below, Add [. /opt/openfoam8/etc/bashrc]in the first line of these filessudogedit ~/.Profile and gedit ~/.Bashrcand it worked. But after that while running the simulation it shown another error as given below, please host the image from below link. 1. https://ibb.co/vvdVZ0j 2. https://ibb.co/tDz0mSb https://ibb.co/vvdVZ0j Is it CPU [2] (slave computer) cannot access the required files that are on the main computer, but the file "points" is there in case/constant/polymesh and in processor0/constant/polymesh and processor1/constant/polymesh. Is it that sshdoesnt give access to the main computer from the second? If you can give any guidance on this error, it will be very helpful. |
|
January 11, 2021, 11:14 |
You're almost there!!!
|
#8 | |
Member
Ndong-Mefane Stephane Boris
Join Date: Nov 2013
Location: Kawasaki (JAPAN)
Posts: 53
Rep Power: 13 |
Quote:
Hello, The error message is basically saying that your mesh data is missing or incomplete. You need to manually copy the full mesh to the slave project folder. what you should have done is: after preparing all the settings in the master's project folder, and running decomposePar, copy the whole project folder to the slave machine (making sure that the folder structure is identical to what you have in decomposeParDict). If you've done that already, can you send a screenshot of both project folders(slave and master)? the error does not seem to be ssh related... |
||
January 12, 2021, 05:24 |
|
#9 | |
Member
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 12 |
Quote:
Thank you for notifying me the possible mistake which can occur. But I have tried to avoid this. Before starting parallel run I have copied the whole master project folder to slave machine and made sure that folder structure is identical in master and slave machine. As you mentioned for further information I have attached the screenshot of folder structure in master and slave machine. Please host the screenshots from below link. Main folder Structure (Master & Slave) https://ibb.co/ScgYMrb https://ibb.co/1Zv5xkv Polymesh folder structure (Master & Slave) https://ibb.co/jHKzjBr https://ibb.co/TmRjWqt Decomposed folder structure (Processor 0) (Master & Slave) https://ibb.co/2hFfN7q https://ibb.co/qN7Lf50 (Processor 1) (Master & Slave) https://ibb.co/C2x72fs https://ibb.co/vYhRDwd If you can give any guidance on this error, it will be very helpful. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Explicitly filtered LES | saeedi | Main CFD Forum | 16 | October 14, 2015 12:58 |
Where to find parallel v4.0 for Windows? | aberkk | SU2 Installation | 1 | September 15, 2015 17:31 |
Running CFX parallel distributed Under linux system with loadleveler queuing system | ahmadbakri | CFX | 1 | December 21, 2014 05:19 |
Need help parallel in windows 7 | fluidmechanics | SU2 Installation | 2 | June 14, 2013 06:15 |
PVM RSH parallel setup problem Windows XP | abe | CFX | 11 | January 30, 2006 06:10 |