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

scotch parallel run is not working in OpenFOAM 2012

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 1 Post By chandra shekhar pant
  • 2 Post By klausb
  • 2 Post By klausb
  • 1 Post By v199ah

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 7, 2021, 07:24
Default scotch parallel run is not working in OpenFOAM 2012
  #1
Senior Member
 
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 16
chandra shekhar pant is on a distinguished road
Hello Experts,

I installed OpenFOAM 2012 in my workstation, it is working fine while running with a single processor, but when I am trying to run it with 10 processors using scotch decomposition method it is giving me error which says:


Code:
--> FOAM FATAL ERROR: 
You are trying to use scotch but do not have the scotchDecomp library loaded.
This message is from the dummy scotchDecomp stub library instead.

Please install scotch and make sure that libscotch.so is in your LD_LIBRARY_PATH.
The scotchDecomp library can then be built in src/parallel/decompose/decompositionMethods/scotchDecomp


    From function virtual Foam::labelList Foam::scotchDecomp::decompose(const Foam::polyMesh&, const pointField&, const scalarField&) const
    in file dummyScotchDecomp.C at line 113.

FOAM exiting
Previously the same case was working fine with OpenFOAM v 1906. Not sure if this is because of the version change, could anyone please help? Any help/comment will be highly appreciated. Thanks in advance.
v199ah likes this.
chandra shekhar pant is offline   Reply With Quote

Old   June 8, 2021, 14:29
Default
  #2
Senior Member
 
Klaus
Join Date: Mar 2009
Posts: 280
Rep Power: 22
klausb will become famous soon enough
Hello,

either scotch is not installed or it's not in the LD_LIBRARY_PATH of your system.

Scotch is part of the "ThirdParty" software. If you look at the OpenFOAM source code you'll see that there are two download packages, "OpenFOAM" and "ThirdParty".

Check whether you can find libscotch.so on your system, if so, the following link/discussion explains how to add it to your LD_LIBRARY_PATH: https://stackoverflow.com/questions/...-path-in-linux

If it's not installed, build/compile it first:
The scotchDecomp library can then be built in src/parallel/decompose/decompositionMethods/scotchDecomp

Klaus
klausb is offline   Reply With Quote

Old   June 9, 2021, 05:39
Default
  #3
Senior Member
 
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 16
chandra shekhar pant is on a distinguished road
Thanks a lot klausb for you kind help and suggestion. I will try and report in this post. Thanks again for your time.
chandra shekhar pant is offline   Reply With Quote

Old   June 13, 2021, 09:04
Default
  #4
Senior Member
 
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 16
chandra shekhar pant is on a distinguished road
Hello again Klausb,

I was trying to understand and follow you steps regarding the scotch decomposition method, I have some doubts, could you kindly help me with these:


1. How to find libscotch.so on my system?
2. How to build/compile the scotch from src/parallel/decompose/scotchDecomp? I could see there are 2 folders: Make and inInclude + 2 files--scotchDecomp.c and scotchDecomp.c



Sorry for troubling you regarding these naive questions. Any further comment/suggestion will be very helpful. Thanks in advance.
chandra shekhar pant is offline   Reply With Quote

Old   June 13, 2021, 10:22
Default
  #5
Senior Member
 
Klaus
Join Date: Mar 2009
Posts: 280
Rep Power: 22
klausb will become famous soon enough
1: Just use your file browser/explorer and search your OpenFOAM directory for the file as with any other file your're searching - nothing special.

2: Open a terminal, go to the directory where the source files an the Make directory are located and type: wmake libso

For 2: You must have development tools installed on your system i.e. dependencies and a compiler.
klausb is offline   Reply With Quote

Old   June 14, 2021, 07:29
Default
  #6
Senior Member
 
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 16
chandra shekhar pant is on a distinguished road
Many thanks Klausb for your prompt and helpful advice. I updated the Ubuntu version to the latest and then tried to install OF v 1906, finally managed to get the things working. Your post helped me a lot, thanks again for your kind suggestions/help.
chandra shekhar pant is offline   Reply With Quote

Old   June 6, 2022, 04:40
Default
  #7
Member
 
Nguyen Trong Hiep
Join Date: Aug 2018
Posts: 48
Rep Power: 8
hiep.nguyentrong is on a distinguished road
I have same problem in wsl with ubuntu 20.04 and OF 2112,

I have installed scoth and the LD_LIBRARY_PATH have libscotch.so
Code:
echo $LD_LIBRARY_PATH  
/home/hiep/OpenFOAM/hiep-v2112/platforms/linux64GccDPInt32Opt/lib:
/home/hiep/OpenFOAM-v2112/site/2112/platforms/linux64GccDPInt32Opt/lib:
/home/hiep/OpenFOAM-v2112/platforms/linux64GccDPInt32Opt/lib/sys-openmpi:
/home/hiep/OpenFOAM-v2112/platforms/linux64GccDPInt32Opt/lib:
/home/hiep/ThirdParty-v2112/platforms/linux64GccDPInt32/lib/sys-openmpi:
/home/hiep/ThirdParty-v2112/platforms/linux64GccDPInt32/lib:
/home/hiep/ThirdParty-v2112/platforms/linux64Gcc/fftw-3.3.10/lib:
/home/hiep/ThirdParty-v2112/platforms/linux64Gcc/CGAL-4.14.3/lib64:
/home/hiep/ThirdParty-v2112/platforms/linux64Gcc/boost_1_74_0/lib64:
/usr/lib/x86_64-linux-gnu/openmpi/lib:
/home/hiep/OpenFOAM-v2112/platforms/linux64GccDPInt32Opt/lib/dummy:
/usr/local/lib/
and here is my libscotch.so path:
Code:
 find -name libscotch.so                                                                                                                                                                                              
./home/hiep/ThirdParty-v2112/platforms/linux64GccDPInt32/lib/libscotch.so                                                                                                                                                                    
./home/hiep/ThirdParty-v2112/platforms/linux64GccDPInt32/lib/sys-openmpi/libscotch.so
Pls help me
hiep.nguyentrong is offline   Reply With Quote

Old   December 7, 2022, 03:13
Default
  #8
New Member
 
Join Date: Oct 2015
Location: Trondheim
Posts: 6
Rep Power: 10
v199ah is on a distinguished road
Hi, I recently ran into a problem myself when i tried to compile scotch 6.1.0 for openfoam 2206 on ubuntu jammy jelly. I'll post it here in case it can help someone or my future self.

To get to the point where i ran into the problem i followed the steps given by klausb above.

First of all, I didn't really read the guide on the gitlab page of scotch really well so i missed the step where you had to make a symlinc from $WM_PROJECT_DIR/src/parallel/decompose/scotchDecomp/src/Makefile.inc to
$WM_PROJECT_DIR/src/parallel/decompose/scotchDecomp/src/Make.inc/Makefile.inc.x86-64_pc_linux2 (The last part is dependent on your os).
Doing this fixed the problem with missing windows.h during compilation, but exposed the next problem.

The version of scotch that i downloaded from gitlab was configured to be compiled on windows, and so it used a version of pthread.h that was configured for windows. So i ran this to make sure i still had the original:

sudo apt install libc6 libc6-dev

Then:
cd $WM_PROJECT_DIR/src/parallel/decompose/scotchDecomp/src/misc

Next make a symlink from pthread in this folder to the one you just installed/reinstalled:

ln -sf /usr/include/pthread.h ./pthread.h

now I was finally able to run Allwmake from $WM_PROJECT_DIR/src/parallel/decompose .
v199ah 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
[OpenFOAM] Questions about Paraview to show Parallel run of OpenFOAM padian ParaView 20 September 24, 2018 12:52
User fortran to input/output file in a parallel run doublestrong CFX 5 March 31, 2017 08:15
Explicitly filtered LES saeedi Main CFD Forum 16 October 14, 2015 11:58
Unable to run OpenFOAM 1.6-ext in parallel with more than one machine mm.abdollahzadeh OpenFOAM Installation 14 January 27, 2014 09:40
Parallel run of OpenFOAM in linux and windows side by side m2montazari OpenFOAM Running, Solving & CFD 5 June 24, 2011 03:26


All times are GMT -4. The time now is 15:32.