ElmerFEM mac Os Monterey Installation Issues

Discussion about building and installing Elmer
Post Reply
femGOD
Posts: 5
Joined: 14 Jun 2024, 14:07
Antispam: Yes

ElmerFEM mac Os Monterey Installation Issues

Post by femGOD »

Hi,

Ive been working a week now to get elmer to work.

Important notes:
On mac the default compiler is clang. You dont want thar because it will cause problems with open-mpi. We are going to use gcc-14 and g++-14.

I had to modify „umf4_f77wrapper.c“ since of forbidden forward declarations in C99. Including the „umfpack.h“ at the top if the file helped. Make sure you point to the location of the umfpack library in the elmer source directory.

I had to add cmake flags to make the compiler find the dynamic library „libiomp5.dylib“.

I cloned the elmer from git, and added a folder inside called build. With terminal I navigated into this folder and executed:

cmake -DCMAKE_C_COMPILER=/usr/local/Cellar/gcc/14.1.0_1/bin/gcc-14 \
-DCMAKE_CXX_COMPILER=/usr/local/Cellar/gcc/14.1.0_1/bin/g++-14 \
-DWITH_ELMERGUI=TRUE \
-DWITH_OpenMP:BOOLEAN=FALSE \
-DCMAKE_PREFIX_PATH="/usr/local/Cellar/open-mpi/5.0.3_1;$(brew --prefix libomp)" \
-DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp -I$(brew --prefix libomp)/include" \
-DOpenMP_CXX_LIB_NAMES="omp" \
-DOpenMP_omp_LIBRARY=$(brew --prefix libomp)/lib/libomp.a \
-DCMAKE_EXE_LINKER_FLAGS="-L/usr/local -liomp5" \
-DCMAKE_SHARED_LINKER_FLAGS="-L/usr/local -liomp5" \
..

Note that it did not make any difference if -DWITH_OpenMp was set to true or false.
After cmake I executed make install.
This seemed to write a lot of stuff into my ~/usr folder.
Make install created the executable ElmerGUI application. On startup I get three messages:
„Initialisations file does not exist“
„Material library does not exist“
„Definitions file does not exist“

I wanted to run ElmerGUI tester to recognize that cmake did not build it. Do I have to add additional flags to compile the GUItester?
I wouldnt ask to bother you unfortunately there seems to be absolutely NO Info about this project for mac.

So:
How do I get elmerGUItester to compile?
Does a successful compilation mean that all the necessary files were compiled?
I read about a PATH I have to set to make elmer find stuff. However all instructions were on Windows, idk if they apply for mac. Most certainly not.
I ran „ctest -j4“, about 130 of 900+ test failed. Does this indicate stuff is missing or are they not supposed to pass?

Id be very thankful for help. This would help many other mac users too I think and elmer would benefit from a decent compilation/installation guide.

Cheers
femGOD
Posts: 5
Joined: 14 Jun 2024, 14:07
Antispam: Yes

Re: ElmerFEM mac Os Monterey Installation Issues

Post by femGOD »

Hi,

thanks for posting that thread, I worked through it, however I dont see how it could help me. Noone there had similar issues, ran the ctest, wrote about the GUItester or had a prompt with „Initialisations file not found“.

After compiling is there supposed to be multiple executables? Bc I only have elmerGUI
femGOD
Posts: 5
Joined: 14 Jun 2024, 14:07
Antispam: Yes

Re: ElmerFEM mac Os Monterey Installation Issues

Post by femGOD »

Another thing I recognized from the logs when I startup the elmerGUI application is that elmer is looking for 2 files, "edf.xml" and "egini.xml" inside the elmer/elmerfem/build/ElmerGUI/Application/../share/ElmerGUI/edf folder. After "make -j4 install" this folder doesn't even exist. Those files exist but they are located at: elmer/elmerfem/ElmerGUI/Application/edf/

Something with this is weird because so many errors seem to occur bc of not finding the correct files and libraries, eventho they exist, just somewhere else. Which one might conclude I have setup some variables wrong or elmer is just fked.

Watching this vide:
https://www.youtube.com/watch?v=h7PswPM9qtk&t=664s
This guy uses -DCMAKE_INSTALL_PREFIX=../install ../elmerfem which tells the cmake command to install files to elmer/elmerfem/install so the edf.xml is placed there however the terminal clearly says elmer is looking for edf.xml at:

Load /Users/me/elmer/elmerfem/build2/ElmerGUI/Application/../share/ElmerGUI/edf/edf.xml

This is really....wtf is going on there. Has anybody tried to compile this since 2010?
femGOD
Posts: 5
Joined: 14 Jun 2024, 14:07
Antispam: Yes

Re: ElmerFEM mac Os Monterey Installation Issues

Post by femGOD »

Update:

After placing the files that are copied with install into the appropriate folder where elmer is actually looking for them, I solved most of the apparent issues it seems. Ctest will show more.

One thing that is missing is the tetgen plugin. Elmer shouts on startup:
Load tetgen plugin... not found
Tetgen functionality unavailable

If i only knew where elmer is looking for it and how that folder should be named....

Back to compiling tetgen...and placing it??? Where exactly

Update:

I feel tetgen is not needed since elmerGUI provides me with 2 different meshing tools.

ist the postprocessor still a thing? should it be compilable on mac? because I feel its not. There are issues with opengl and #include statments seem to be missing for multiple files.

Should all tests pass? because many dont.

Other than that, elmerGUItester gives me all green except for elmer post
kevinarden
Posts: 2435
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: ElmerFEM mac Os Monterey Installation Issues

Post by kevinarden »

Most users use paraview for post-processing, ElmerPost is not used
femGOD
Posts: 5
Joined: 14 Jun 2024, 14:07
Antispam: Yes

Re: ElmerFEM mac Os Monterey Installation Issues

Post by femGOD »

Alright thank you
Post Reply