|
[Sponsors] |
[OpenFOAM.com] Compiling Scotch library error |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 21, 2021, 18:39 |
Compiling Scotch library error
|
#1 |
Member
Federico Zabaleta
Join Date: May 2016
Posts: 47
Rep Power: 10 |
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) 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 Code:
>ls ../decompositionMethods/lnInclude/metisLikeDecomp.H ../decompositionMethods/lnInclude/metisLikeDecomp.H 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 |
|
January 23, 2021, 06:30 |
|
#2 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
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. |
|
January 26, 2021, 19:58 |
|
#3 |
Member
Federico Zabaleta
Join Date: May 2016
Posts: 47
Rep Power: 10 |
That solve my problem. I didn't know scotch was an external library. Thank you a lot!
|
|
March 2, 2022, 11:18 |
|
#4 |
New Member
Join Date: Sep 2021
Posts: 10
Rep Power: 5 |
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! |
|
March 2, 2022, 11:56 |
|
#5 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
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 |
|
March 2, 2022, 13:25 |
|
#6 |
Member
Federico Zabaleta
Join Date: May 2016
Posts: 47
Rep Power: 10 |
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.
|
|
March 3, 2022, 00:25 |
|
#7 |
New Member
Join Date: Sep 2021
Posts: 10
Rep Power: 5 |
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.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Building OpenFOAM1.7.0 from source | ata | OpenFOAM Installation | 46 | March 6, 2022 14:21 |
Compile calcMassFlowC | aurore | OpenFOAM Programming & Development | 13 | March 23, 2018 08:43 |
Installation OF1.5-dev | ttdtud | OpenFOAM Installation | 46 | May 5, 2009 03:32 |
How to get the max value of the whole field | waynezw0618 | OpenFOAM Running, Solving & CFD | 4 | June 17, 2008 06:07 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |