-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenFOAM-8: symbol not found in flat namespace '_MPI_Abort' #76
Comments
I found the culprit. In libDir=`mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'` It simply returns one of the directories that are to be linked
whereas there is also another directory that need to be adde: % mpicc --showme:link
-L/opt/homebrew/Cellar/open-mpi/4.1.2/lib -L/opt/homebrew/opt/libevent/lib -lmpi Maybe some kind of regex problem (?)... So I added the
Thank you for maintaining this repository. I really appreciate your work. |
Thanks for the update. Yes, the problem is that on macOS there are two folders in |
Thanks for posting this 👍🏽 @reverseila . I think I also have the same issue, so wanted to follow your solution. System: M1Pro with 32Gigs of RAM. Tried OpenFOAM 9 (similar issue) then found this and trying OpenFOAM 8. Part of my
I also got the same output as you:
After the modification, I start the build with
Can you please help me, I think I'm missing something trivial, but can't figure out myself 🙁 |
LOL. This is crazy. I've just noticed a strange typo. Not sure where it came from. Ok, basically do this and you'll be fine.
Instead of an uppercase Although it seems wrong, it works so far for me. Maybe I tweaked something else somewhere. But let me know If there is any problem. And sorry for your frustration. Note that I built OpenFOAM before changing these settings, So I guess you don't need to recompile it. Just test it with those changes. Thanks for testing it @massisenergy. So I think the issue need to be reopen. |
taking a look at # ~~~
# Prefix to LD_LIBRARY_PATH
_foamAddLib()
{
while [ $# -ge 1 ]
do
export LD_LIBRARY_PATH=$1:$LD_LIBRARY_PATH
shift
done
}
# ~~~ Fixing my typo, having
and that comes from I manually added those two directories to the beginning of Another thing I did was checking that whether the script executed the function or not. So I put two It seems that redirection to stdout is thrown away. I redirect #~~~
libDir=`mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'`
libDir2="/opt/homebrew/Cellar/open-mpi/4.1.2/lib"
# Bit of a hack: strip off 'lib' and hope this is the path to openmpi
# include files and libraries.
_foam_on_macos || export MPI_ARCH_PATH="${libDir%/*}"
echo "before" > ~/debug
echo "libDir: $libDir" >> ~/debug
echo "libDir2: $libDir2" >> ~/debug
echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH" >> ~/debug
_foamAddLib $libDir
_foamAddLib $libDir2
echo "after" >> ~/debug
echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH" >> ~/debug
unset libDir
unset libDir2
;;
#~~~ Now, sourcing
So it seems that Okay, adding an |
@reverseila if you take a look at . $WM_PROJECT_DIR/etc/config.sh/functions
_foam_on_macos && . $WM_PROJECT_DIR/etc/config.sh/mac/functions So, on macOS additional
These two lines are not touched by patch:
The last does |
I look at |
@mrklein Yes, as I said, it was a typo on my side. |
@mrklein Now I see. $ type _foamAddLib
_foamAddLib is a shell function from /Users/ali/OpenFOAM/OpenFOAM-8/etc/config.sh/mac/functions So Now, If I do: #~~~
libDir=`mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'`
libDir2="/opt/homebrew/Cellar/open-mpi/4.1.2/lib"
# Bit of a hack: strip off 'lib' and hope this is the path to openmpi
# include files and libraries.
_foam_on_macos || export MPI_ARCH_PATH="${libDir%/*}"
echo "before" > ~/debug
echo "libDir: $libDir" >> ~/debug
echo "libDir2: $libDir2" >> ~/debug
echo "DYLD_LIBRARY_PATH: $DYLD_LIBRARY_PATH" >> ~/debug
_foamAddLib $libDir
_foamAddLib $libDir2
echo "after" >> ~/debug
echo "DYLD_LIBRARY_PATH: $DYLD_LIBRARY_PATH" >> ~/debug
unset libDir
unset libDir2
;;
#~~~ I get following:
Which is what we actually want. However that does not fix the linking problem. Still I get the following abortion error:
Now, let's compare it with the case it works (that magical typo). In that scenario, we don't have those
We don't have those two directories here anymore. But It fixes that linking issue. So What's wrong? |
My guess would be: if you remove OpenMPI paths from |
Yes, you are right. I can confirm that. I cannot decompose mesh using |
Is there any update about the issue? |
Since, I do not have access to Apple's ARM hardware, I cannot do anything about the issue. Could you post output of:
|
Here are the output of your suggested commands:
|
I found the files on a different location:
|
Thank you for the reply. So, library is there and it has mentioned symbol. Could you post output of the following commands (after setting up OpenFOAM environment):
|
Here are the outputs:
|
The only difference I see from the output on my Intel macBook is (also you have different versions of open-mpi in this (4.1.4_2) and previous (4.1.5) messages):
So, on Intel location of Could you post output of:
|
Sorry for my delayed answer. This is the output
|
So, basically MPI libraries are not linked in your case. Here is my output:
Could you post command line used to link Pstream dynamic library? The simples way would be to delete
|
I deleted the file I noticed that the option
|
Thank you for the output. You are mixing architectures and, I think, this causes the problem. OpenMPI libraries are arm64 binaries (as you posted here: #76 (comment)), while you compile the code for x64_64 architecture ( Quick solution is to edit
to
Do the same thing with More complicated solution would be to create separate set of rules in |
Installation finished without any error. Every utility or solver I run, aborts. Am I missing something?
output of
uname -a
:Complete Error:
The text was updated successfully, but these errors were encountered: