CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[OpenFOAM.org] Install OpenFOAM 2.4.x using system Scotch

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 2 Post By wyldckat
  • 1 Post By venturi
  • 1 Post By beatlejuice
  • 1 Post By olesen

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 17, 2016, 11:26
Default Install OpenFOAM 2.4.x using system Scotch
  #1
New Member
 
Chris Coutinho
Join Date: Jan 2015
Location: Netherlands
Posts: 28
Rep Power: 11
cbcoutinho is on a distinguished road
I'm running OpenSUSE 42.1 Leap, and am trying to install various versions of OpenFOAM (2.4.x - 4.x) onto my system. I first installed 2.4.x without any issue, but then tried to run an example parallel case using the the scotch decomposition method - that ended up failing because OF24x wasn't installed using scotch. I checked that I had scotch installed on my system, as well as the development headers - that wasn't the problem.

I cleaned by build directory and tried reinstalling OF24x again and noticed I was getting errors because OF couldn't find the scotch headers (scotch.h and ptscotch.h) I've tried editing the etc/config/scotch.sh file (similar to how the instructions on the wiki say for CGAL), but that didn't work and the build failed making a number of libraries.

In the end I found out that OpenFOAM looks for scotch in the ThirdParty directory by default instead of the system, and since current ThirdParty 2.4.x git repo doesn't contain it, I had to copy it over from the ThirdParty 2.4.0 tgz folder. This means that for every OpenFOAM install, I need to have a copy of the scotch source in each respective ThirdParty directory, which doesn't seem ideal.

Questions:
  1. Why is the scotch source directory not included in the ThirdParty 2.4.x repo?
  2. How do you allow OpenFOAM to access your system's version of scotch?
cbcoutinho is offline   Reply With Quote

Old   October 30, 2016, 12:48
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answers:
Quote:
Originally Posted by cbcoutinho View Post
1. Why is the scotch source directory not included in the ThirdParty 2.4.x repo?
Scotch's source code was only added on the 30th of May 2016 after it was reached the conclusion that it was best to add ParaView to OpenFOAM's ThirdParty git repositories, as reported here: http://bugs.openfoam.org/view.php?id=2098 - Scotch was also added as well, so that this way we could do a source code snapshot directly from the ThirdParty repository and have the essential source code ready to build OpenFOAM (without "foamy*Mesh").

Quote:
Originally Posted by cbcoutinho View Post
2. How do you allow OpenFOAM to access your system's version of scotch?
I haven't had the time to do a complete test, but the following should do the trick:
  1. The science repo must be in the repository list, so as root the following command is needed (e.g. for 42.1):
    Code:
    zypper addrepo -f -n science http://download.opensuse.org/repositories/science/openSUSE_Leap_42.1/ science
  2. Then install Scotch and PTScotch:
    Code:
    zypper install scotch ptscotch-openmpi libptscotch0-openmpi libptscotch-openmpi-devel libscotch-devel
  3. Next use the following lines in the scotch configuration file "etc/config/scotch.sh":
    Code:
    export SCOTCH_VERSION=scotch_6.0.4
    export SCOTCH_ARCH_PATH=/usr/lib64/mpi/gcc/openmpi
    export SCOTCH_ROOT=/usr/lib64/mpi/gcc/openmpi
  4. Next we need to fix a few bugs, by running:
    Code:
    cd $WM_PROJECT_DIR
    find src applications -name options | xargs grep SCOTCH_ROOT -sl | xargs sed -i -e 's=SCOTCH_ROOT)/lib=SCOTCH_ROOT)/lib64='
  5. Now try building OpenFOAM.
venturi and beatlejuice like this.
__________________
wyldckat is offline   Reply With Quote

Old   February 20, 2017, 13:37
Default
  #3
New Member
 
D. N. Venturi
Join Date: Jan 2013
Location: Brazil
Posts: 25
Rep Power: 13
venturi is on a distinguished road
Thanks Bruno. Worked for me!

OpenSUSE 42.2 and OpenFOAM 4.1
wyldckat likes this.
venturi is offline   Reply With Quote

Old   December 6, 2018, 05:27
Default
  #4
Member
 
Join Date: Nov 2013
Posts: 35
Rep Power: 13
beatlejuice is on a distinguished road
Worked for me, too....

OpenSuse Leap 15, OpenFoam v1806

Steps (like wyldckat said):

Added repository Science (Leap 15.0):
http ://download.opensuse.org/repositories/science/openSUSE_Leap_15.0

http://download.opensuse.org/reposit...SUSE_Leap_15.0

Followed step 2 & 3 of wyldckat (OpenFOAM-v1806/etc/config/scotch.sh)

Step 4 was not necessary for me ...

Finally:
cd $FOAM_SRC/parallel/decompose
./Allwmake
wyldckat likes this.
beatlejuice is offline   Reply With Quote

Old   December 6, 2018, 05:59
Default
  #5
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
It is still a work in progress, but you can also use openfoam1806 from the same science repo - it uses system libs for everything and does the configuration for you too. Recently updated their version of scotch to 6.0.6 and also put in a paraview-devel (version 5.6.0) as well.
The OpenFOAM RPM is currently built without the paraview dependency, but the native reader is probably all you need.
For 1812 we will also be able to build with a system paraview, but the config is not as comfortable. Probably have openfoam1812 RPM without paraview as well - don't think that this is the right place for the paraview bit.

Note that the RPM namings have the major version as part of the name, since we'd like people to be able to install different versions side by side. The openfoam-selector is like the mpi-selector and provides a simple means of setting the environment.

Any feedback on gitlab please, I don't read the forums very regularly.

/mark
wyldckat likes this.
olesen is offline   Reply With Quote

Old   December 7, 2018, 19:51
Default Thanks!
  #6
New Member
 
Join Date: Jul 2014
Posts: 3
Rep Power: 12
jetface is on a distinguished road
Thanks! Worked for me as well.

In Step 3, I didn't change the scotch version environment variable and Step 4 wasn't necessary for me. I'm using OpenSUSE 15.0 and OpenFOAM 6.
jetface is offline   Reply With Quote

Old   December 25, 2018, 16:55
Default Solution
  #7
Member
 
Akshay Patil
Join Date: Nov 2015
Location: Pune, India
Posts: 35
Rep Power: 10
Akshay_11235 is on a distinguished road
Just incase you are still stuck with the issue.



Error I got when compiling OpenFOAM-6
Code:
scotchDecomp.C:36:20: fatal error: scotch.h: No such file or directory
 #include "scotch.h"
                    ^
compilation terminated.
make: *** [/home/alpatil/OpenFOAM/OpenFOAM-6/platforms/linux64GccDPInt32Opt/src/parallel/decompose/scotchDecomp/scotchDecomp.o] Error 1

The compilation was trying to look for

"using SCOTCH_ARCH_PATH=/home/alpatil/OpenFOAM/ThirdParty-6/platforms/linux64GccDPInt32/scotch_6.0.3"


As there was no ThirdPart-6 directory the compilation terminated.



I extracted the Thirdparty-6-version-6 and renamed it to ThirdParty-6 and everything seems to be working now.



Not sure if this is the issue with everyone else. Hope it helps!


Cheers!
Akshay_11235 is offline   Reply With Quote

Old   October 16, 2019, 20:12
Default OpenFOAM 5.x
  #8
New Member
 
Thomas
Join Date: Oct 2019
Posts: 1
Rep Power: 0
tjleps is on a distinguished road
I'm trying to install OpenFOAM 5.x on Centos8 and would like to use a system version of scotch, however following the fix outlined above, I still get an error:


Code:

Build Scotch decomposition library scotch_6.0.5
    /usr/include/openmpi-x86_64/
+ cd scotch_6.0.5/src
/home/dustiest/OpenFOAM/ThirdParty-5.x/Allwmake: line 204: cd: scotch_6.0.5/src: No such file or directory
+ exit 1
Does anyone have any ideas as to how to get ./Allwmake to look for system scotch libraries?
tjleps is offline   Reply With Quote

Reply

Tags
openfoam 2.4.x, opensuse, scotch


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
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology wyldckat OpenFOAM 17 November 10, 2017 16:54
OpenFOAM 4.0 Released CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 2 October 6, 2017 06:40
OpenFOAM Training, London, Chicago, Munich, Houston 2016-2017 cfd.direct OpenFOAM Announcements from Other Sources 0 September 14, 2016 04:19
[OpenFOAM.org] How to install OpenFoam from its folder immortality OpenFOAM Installation 12 August 9, 2015 12:20
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 19:56


All times are GMT -4. The time now is 18:27.