CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Distributed Parallel with Windows Subsystem for Linux

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By S_teph_2000

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 5, 2019, 00:03
Default Distributed Parallel with Windows Subsystem for Linux
  #1
Member
 
Ndong-Mefane Stephane Boris
Join Date: Nov 2013
Location: Kawasaki (JAPAN)
Posts: 53
Rep Power: 12
S_teph_2000 is on a distinguished road
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
S_teph_2000 is offline   Reply With Quote

Old   October 10, 2020, 01:39
Default 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
simucentral is on a distinguished road
Hi,

Could you do this distributed parallel in WSL installation mode?

Any guidance will be much appreciated.

Thanks and Regards,
Akram
simucentral is offline   Reply With Quote

Old   October 11, 2020, 22:32
Default Distributed parallel in WSL
  #3
Member
 
Ndong-Mefane Stephane Boris
Join Date: Nov 2013
Location: Kawasaki (JAPAN)
Posts: 53
Rep Power: 12
S_teph_2000 is on a distinguished road
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/
I then make sure that I have the same folder structure on the other nodes, so that I can use the exact same syntax when accessing the project.

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"
);
// ************************************************************************* //
notice the path I use in roots. Also, for 30 processes, I need only 29 path inputs.
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
You should check the following link for more information:
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
simucentral likes this.
S_teph_2000 is offline   Reply With Quote

Old   October 12, 2020, 10:41
Default Distributed parallel in WSL
  #4
New Member
 
Akram P A
Join Date: Apr 2020
Location: Kochi - India
Posts: 15
Rep Power: 6
simucentral is on a distinguished road
Thank you so much. I will check and let you know.

Best Regards,
Akram P. A.
simucentral is offline   Reply With Quote

Old   January 6, 2021, 02:00
Default
  #5
Member
 
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 11
Sachin m is on a distinguished road
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.
Sachin m is offline   Reply With Quote

Old   January 7, 2021, 07:44
Default
  #6
Member
 
Ndong-Mefane Stephane Boris
Join Date: Nov 2013
Location: Kawasaki (JAPAN)
Posts: 53
Rep Power: 12
S_teph_2000 is on a distinguished road
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
S_teph_2000 is offline   Reply With Quote

Old   January 11, 2021, 00:40
Default
  #7
Member
 
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 11
Sachin m is on a distinguished road
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.
Sachin m is offline   Reply With Quote

Old   January 11, 2021, 10:14
Default You're almost there!!!
  #8
Member
 
Ndong-Mefane Stephane Boris
Join Date: Nov 2013
Location: Kawasaki (JAPAN)
Posts: 53
Rep Power: 12
S_teph_2000 is on a distinguished road
Quote:
Originally Posted by Sachin m View Post
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.

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...
S_teph_2000 is offline   Reply With Quote

Old   January 12, 2021, 04:24
Default
  #9
Member
 
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 11
Sachin m is on a distinguished road
Quote:
Originally Posted by S_teph_2000 View Post
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...
Hi kazu,

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.
Sachin m is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Explicitly filtered LES saeedi Main CFD Forum 16 October 14, 2015 11:58
Where to find parallel v4.0 for Windows? aberkk SU2 Installation 1 September 15, 2015 16:31
Running CFX parallel distributed Under linux system with loadleveler queuing system ahmadbakri CFX 1 December 21, 2014 04:19
Need help parallel in windows 7 fluidmechanics SU2 Installation 2 June 14, 2013 05:15
PVM RSH parallel setup problem Windows XP abe CFX 11 January 30, 2006 05:10


All times are GMT -4. The time now is 03:31.