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

OpenFOAM 2306: cannot use metis

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By NotOverUnderated

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 18, 2023, 06:39
Default [✅ Solved] OpenFOAM 2306: cannot use metis
  #1
Senior Member
 
NotOverUnderated's Avatar
 
ONESP-RO
Join Date: Feb 2021
Location: Somwhere on Planet Earth
Posts: 127
Rep Power: 5
NotOverUnderated is on a distinguished road
Hello,
I have tried installing the metis library on Ubuntu 22.04. I have installed it using the package manager: sudo apt install libmetis-dev.

I have also compiled the interface for it by following these steps:

Code:
cp -r $FOAM_SRC/parallel/decompose/metisDecomp/ /tmp/metisDecomp

cd /tmp/metisDecomp
wmake
The building of metisDecomp was successful. However, when I try to use metis for decomposition, e.g.:

Code:
//....
numberOfSubdomains 4;

method          metis;
When I run the decomposePar utility, I get the following message:


Calculating distribution of cells
Decomposition method metis [4] (region region0)
decomposePar: symbol lookup error: /home/ONESP/OpenFOAM/ONESP-v2306/platforms/linux64GccDPInt32Opt/lib/libmetisDecomp.so: undefined symbol: METIS_SetDefaultOptions



I have tried also to uninstall the version of metis installed by the package manager, then downloaded version 5.1.0 from http://glaros.dtc.umn.edu/gkhome/metis/metis/download and built it successfully. But I still get the same error message.

Last edited by NotOverUnderated; December 18, 2023 at 09:15.
NotOverUnderated is offline   Reply With Quote

Old   December 18, 2023, 07:00
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
where did you copy back the resulting library? If it is not somewhere in your LD_LIBRARY_PATH it will not load.
olesen is offline   Reply With Quote

Old   December 18, 2023, 07:28
Default
  #3
Senior Member
 
NotOverUnderated's Avatar
 
ONESP-RO
Join Date: Feb 2021
Location: Somwhere on Planet Earth
Posts: 127
Rep Power: 5
NotOverUnderated is on a distinguished road
Quote:
Originally Posted by olesen View Post
where did you copy back the resulting library? If it is not somewhere in your LD_LIBRARY_PATH it will not load.
Thank you for your reply.

The path is set in Make/files:

Code:
metisDecomp.C

LIB = $(FOAM_USER_LIBBIN)/libmetisDecomp
NotOverUnderated is offline   Reply With Quote

Old   December 18, 2023, 09:11
Default
  #4
Senior Member
 
NotOverUnderated's Avatar
 
ONESP-RO
Join Date: Feb 2021
Location: Somwhere on Planet Earth
Posts: 127
Rep Power: 5
NotOverUnderated is on a distinguished road
I have solved the issue by explicitly specifying the paths (for include and libs) of the metis library in Make/options instead of the using the default one from OpenFOAM:

Code:
EXE_INC = \
    -I/usr/local/include/ \
    -I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude

LIB_LIBS = \
    -L$(FOAM_LIBBIN) -ldecompositionMethods \
    -L/usr/local/lib/ \
    -lmetis$(METIS_LIBNAME_SUFFIX)
olesen likes this.
NotOverUnderated is offline   Reply With Quote

Reply

Tags
compilation, decomposed mesh, openfoam


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.com] Installing OpenFOAM on MacOS with Apple Silicon Kolan OpenFOAM Installation 22 November 20, 2024 19:35
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology wyldckat OpenFOAM 17 November 10, 2017 16:54
OpenFOAM v3.0+ ?? SBusch OpenFOAM 22 December 26, 2016 15:24
OpenFOAM Training, London, Chicago, Munich, Houston 2016-2017 cfd.direct OpenFOAM Announcements from Other Sources 0 September 14, 2016 04:19
OpenFOAM Training Beijing 22-26 Aug 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 May 3, 2016 05:57


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