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

[OpenFOAM.com] Compiling Scotch library error

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 3 Post By olesen
  • 1 Post By newOpenfoamUser

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 21, 2021, 17:39
Default Compiling Scotch library error
  #1
Member
 
Federico Zabaleta
Join Date: May 2016
Posts: 47
Rep Power: 9
fedez91 is on a distinguished road
Hi everyone, I am trying to compile OFv2012 in a supercomputer (PSC Bridges) using gcc and OpenMPI. Everything compiles well except a few libraries, including scotch and metis (the ones I need to decompose my domain and run it in parallel).
Code:
==> skip kahip (no header)
==> skip metis (no header)
==> skip scotch (no header)
==> skip scotch (no header)
==> skip randomProcesses library (no FFTW)
==> skip SloanRenumber (no boost)
==> skip zoltanRenumber (no library)
==> skip ccmio (no header)
==> skip optional libccm adapter
==> skip randomProcesses library (no FFTW)
==> skip dnsFoam solver (no FFTW)
==> skip noise utility (no FFTW)
==> skip optional ccm conversion components (no libccm)
==> skip boxTurb utility (no FFTW)
==> skip kahip (no header)
==> skip metis (no header)
==> skip scotch (no header)
==> skip scotch (no header)
==> skip randomProcesses library (no FFTW)
==> skip SloanRenumber (no boost)
==> skip zoltanRenumber (no library)
==> skip ccmio (no header)
==> skip optional libccm adapter
==> skip randomProcesses library (no FFTW)
==> skip dnsFoam solver (no FFTW)
==> skip boxTurb utility (no FFTW)
==> skip optional ccm conversion components (no libccm)
==> skip noise utility (no FFTW)
If I go to $WM_PROJECT_DIR/src/parallel/decompose/scotchDecomp/ and do wmake I get:
Code:
> wmake
Making dependency list for source file scotchDecomp.C
wmkdepend: could not open 'scotch.h' for source file 'scotchDecomp.C': No such file or directory
g++ -std=c++11 -m64 -pthread -DOPENFOAM=2006 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -Wno-unknown-pragmas  -O3  -DNoRepository -ftemplate-depth-100 -I -I../decompositionMethods/lnInclude -iquote. -IlnInclude -I/home/zabaleta/OpenFOAM/OpenFOAM-v2006/src/OpenFOAM/lnInclude -I/home/zabaleta/OpenFOAM/OpenFOAM-v2006/src/OSspecific/POSIX/lnInclude   -fPIC -c scotchDecomp.C -o /home/zabaleta/OpenFOAM/OpenFOAM-v2006/build/linux64GccDPInt32Opt/src/parallel/decompose/scotchDecomp/scotchDecomp.o
In file included from scotchDecomp.C:29:0:
scotchDecomp.H:222:29: fatal error: metisLikeDecomp.H: No such file or directory
compilation terminated.
make: *** [/home/zabaleta/OpenFOAM/OpenFOAM-v2006/build/linux64GccDPInt32Opt/src/parallel/decompose/scotchDecomp/scotchDecomp.o] Error 1
The missing file is located at:
Code:
 >ls ../decompositionMethods/lnInclude/metisLikeDecomp.H
../decompositionMethods/lnInclude/metisLikeDecomp.H
and the Make/options file includes this directory
Code:
>more Make/options
EXE_INC = \
    -I$(SCOTCH_INC_DIR) \
    -I../decompositionMethods/lnInclude

LIB_LIBS = \
    -ldecompositionMethods \
    -L$(SCOTCH_LIB_DIR) \
    -lscotch

/* errexit, except for windows compile (already in library) */
ifeq (,$(findstring windows,$(WM_OSTYPE)))
    LIB_LIBS += -lscotcherrexit
endif

/* May require librt, but scotch does not declare the dependency */
ifeq ($(EXT_SO),.so)
    LIB_LIBS += -lrt
endif
I don't understand why this is not compiling! Any idea?
fedez91 is offline   Reply With Quote

Old   January 23, 2021, 05:30
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
You either need to use scotch from the system or download the ThirdParty source pack as well.
If you use a system like spack, it should all just work.
RobinZ, fedez91 and oumnion like this.
olesen is offline   Reply With Quote

Old   January 26, 2021, 18:58
Default
  #3
Member
 
Federico Zabaleta
Join Date: May 2016
Posts: 47
Rep Power: 9
fedez91 is on a distinguished road
That solve my problem. I didn't know scotch was an external library. Thank you a lot!
fedez91 is offline   Reply With Quote

Old   March 2, 2022, 10:18
Default
  #4
New Member
 
Join Date: Sep 2021
Posts: 10
Rep Power: 4
newOpenfoamUser is on a distinguished road
Hi,

I have the same problem when compiling openfoam. However, I do not understand what is the required steps from this thread. I have tried to install scotch by "sudo apt install scotch" and "sudo apt-get install libscotch-dev". I tried to recompile openfoam after that and it still doesn't compile the scotch library. Can you list down the exact steps to make it work? Thanks!
newOpenfoamUser is offline   Reply With Quote

Old   March 2, 2022, 10:56
Default
  #5
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
If you are using a system scotch, you also need to specify this (in etc/config.sh/scotch).

If you want a convenient wrapper for that particular edit, then change to the OpenFOAM installation directory and use the following:
Code:
bin/tools/foamConfigurePaths \
    -scotch scotch-system

This is how all of the system settings are handling when building RPM or Ubuntu packs.
Eg,
https://build.opensuse.org/package/v.../openfoam.spec
olesen is offline   Reply With Quote

Old   March 2, 2022, 12:25
Default
  #6
Member
 
Federico Zabaleta
Join Date: May 2016
Posts: 47
Rep Power: 9
fedez91 is on a distinguished road
Hi, have you downloaded the ThirdParty packages? I think by default the compiler looks for the package inside that folder. Check if the scotch library is compiled correctly inside that directory.
fedez91 is offline   Reply With Quote

Old   March 2, 2022, 23:25
Default
  #7
New Member
 
Join Date: Sep 2021
Posts: 10
Rep Power: 4
newOpenfoamUser is on a distinguished road
Thanks for the replies! I deleted the previous installation and recompile it with the ThirdParty folder. It works now. It turns out that I put the ThirdParty folder in the wrong location during my first installation.
fedez91 likes this.
newOpenfoamUser 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
Building OpenFOAM1.7.0 from source ata OpenFOAM Installation 46 March 6, 2022 13:21
Compile calcMassFlowC aurore OpenFOAM Programming & Development 13 March 23, 2018 07:43
Installation OF1.5-dev ttdtud OpenFOAM Installation 46 May 5, 2009 02:32
How to get the max value of the whole field waynezw0618 OpenFOAM Running, Solving & CFD 4 June 17, 2008 05:07
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


All times are GMT -4. The time now is 13:05.