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

[foam-extend.org] ld cannot find lmpi?

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By EternalSeekerX
  • 1 Post By saladbowl

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 24, 2021, 01:45
Default ld cannot find lmpi?
  #1
Senior Member
 
Sultan Islam
Join Date: Dec 2015
Location: Canada
Posts: 143
Rep Power: 11
EternalSeekerX is on a distinguished road
Hello everyone,


So has anyone run into this issue?


Code:
+ wmake libso parMetisDecomp
/usr/bin/ld: cannot find -lmpi
collect2: error: ld returned 1 exit status
make: *** [/home/si/.root/opt/OpenFOAM/foam/foam-extend-4.0/wmake/Makefile:188: /home/si/.root/opt/OpenFOAM/foam/foam-extend-4.0/lib/linux64GccDPOpt/libparMetisDecomp.so] Error 1

I have systemmpi specified and mpicc works fine though? Why can't ld find mpi?
saladbowl likes this.
EternalSeekerX is offline   Reply With Quote

Old   June 18, 2021, 09:53
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
Quote:
Originally Posted by EternalSeekerX View Post
Hello everyone,


So has anyone run into this issue?


Code:
+ wmake libso parMetisDecomp
/usr/bin/ld: cannot find -lmpi
collect2: error: ld returned 1 exit status
make: *** [/home/si/.root/opt/OpenFOAM/foam/foam-extend-4.0/wmake/Makefile:188: /home/si/.root/opt/OpenFOAM/foam/foam-extend-4.0/lib/linux64GccDPOpt/libparMetisDecomp.so] Error 1
I have systemmpi specified and mpicc works fine though? Why can't ld find mpi?

Not much to go on. Wish to tell us more about operating system etc?
olesen is offline   Reply With Quote

Old   March 24, 2022, 23:34
Default
  #3
New Member
 
Juan Salazar
Join Date: Jun 2019
Posts: 19
Rep Power: 7
saladbowl is on a distinguished road
Quote:
Originally Posted by EternalSeekerX View Post
Hello everyone,


So has anyone run into this issue?


Code:
+ wmake libso parMetisDecomp
/usr/bin/ld: cannot find -lmpi
collect2: error: ld returned 1 exit status
make: *** [/home/si/.root/opt/OpenFOAM/foam/foam-extend-4.0/wmake/Makefile:188: /home/si/.root/opt/OpenFOAM/foam/foam-extend-4.0/lib/linux64GccDPOpt/libparMetisDecomp.so] Error 1

I have systemmpi specified and mpicc works fine though? Why can't ld find mpi?
Indeed, I have.

OF=foam-extend-4.1
gcc=9.3.0
MPI=openmpi-4.0.4
OS=CentOS Stream 8
WM_MPLIB=SYSTEMOPENMPI

My ugly fix was to change the following line in src/decompositionMethods/parMetisDecomp/Make/options

Code:
-L$(OPENMPI_DIR)/lib -lmpi
to

Code:
-L$(MPI_ARCH_PATH)/lib -lmpi
I also noticed that the line

Code:
 include $(RULES)/mplib$(WM_MPLIB)
wasn't really doing anything because $RULES at this point was not set, which I verified by inserting an `echo $RULES` command in src/decompositionMethods/Allwmake just before `wmake libso parMetisDecomp` is called. After this modification the error went away and I could find lib/$WM_OPTIONS/libparMetisDecomp.so.
EternalSeekerX likes this.
saladbowl 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
[foam-extend.org] 3.2 Installation in Debian 8.5 jsm OpenFOAM Installation 2 June 19, 2016 11:53
How to make a code parallel? Bruno Machado Fluent UDF and Scheme Programming 15 May 27, 2016 10:18
CFX-Pre problem, pls help!!! cth_yao CFX 0 February 17, 2012 01:52
OpenFOAM 1.6-ext git installation on Ubuntu 11.10 x64 Attesz OpenFOAM Installation 45 January 13, 2012 13:38
Problem Building OF on Centos cluster (no admin rights) CKH OpenFOAM Installation 5 November 13, 2011 07:32


All times are GMT -4. The time now is 23:50.