Homebrew installation on Mac

Discussion about building and installing Elmer
tinganho
Posts: 1
Joined: 27 Dec 2020, 18:10
Antispam: Yes

Re: Homebrew installation on Mac

Post by tinganho »

Hi jeromiglopez
Maybe this link https://stackoverflow.com/questions/355 ... to-restart can solve your problem.
I installed Elmer by compiling the project on Mac. But, I still get the error "Symbol not found: __cg_jpeg_resync_to_restart". Fiddling around with different paths just generated problems with ElmerGUI (Other linkage problems occurred). As said, in the Stackoverflow, there is two libJPEG.dylib one in /usr/local/lib and one in /System/Library/Frameworks/ImageIO.framework/Versions/Current/Resources. And i think, Qt4 uses the one in /System....

I noticed that ElmerGUI starts a subprocess EmberSolver with no arguments. Maybe it is just as easy as passing the whole environment down to EmberSolver?
https://doc.qt.io/qt-5/qprocess.html#se ... nvironment

I can run EmberSolver directly from the terminal. It just requires a file ELMERSOLVER_STARTINFO, which I don't have a clue about.

More info about this problem can be found here:
https://forum.qt.io/topic/39597/compila ... s-x-10-8-5
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Homebrew installation on Mac

Post by kevinarden »

Yes ElmerGUI just starts ElmerSolver with no arguments, just like in a command line, if you type ElmerSolver, with no arguments. ELMERSOLVER_STARTINFO is a file that contains the arguments if not are provided, generally it is only the name of the sif file. ElmerGUI builds and saves a project, which is the mesh, the sif, and the ELMERSOLVER_STARTINFO file. Then it just calls ElmerSolver.
jvelasco
Posts: 10
Joined: 03 Feb 2021, 16:45
Antispam: Yes

Re: Homebrew installation on Mac

Post by jvelasco »

Here's a series of videos on how to install Elmer.

The first one shows how to use Homebrew's gcc compiler and the second one how to install a full fledge version of Elmer with MPI and ElmeGUI

https://www.youtube.com/watch?v=rQhSYKHw3HM&t=13s

https://www.youtube.com/watch?v=h7PswPM9qtk

Cheers,

Jon
Akthem
Posts: 3
Joined: 17 Apr 2023, 23:37
Antispam: Yes

Re: Homebrew installation on Mac

Post by Akthem »

Hello, I am trying to install Elmer on an M2 Mac. I follow the first video with the workaround from https://github.com/ElmerCSC/elmerfem/issues/313 and elmerSolver and elemerGrid are installed and I am able to start them from terminal.

However when I try to install it with GUI and MPI following the second video, I get to the point where I type in this command:

Code: Select all

cmake -DWITH_ELMERGUI:BOOL=TRUE -DWITH_MPI:BOOL=TRUE -DWITH_LUA:BOOL=TRUE -DWITH_Mumps:BOOL=TRUE -DMUMPSROOT=../mumps -DCMAKE_INSTALL_PREFIX=../install ../elmerfem
and then get this error:

Code: Select all

-- Finding Mumps
CMake Error at cmake/Modules/FindMumps.cmake:149 (MESSAGE):
  Mumps library not found.
Call Stack (most recent call first):
  CMakeLists.txt:536 (FIND_PACKAGE)
I am still a novice with mac and shell and the learning curve was very steep already getting to this point. Would you please help me follow through with the installation of Elmer with GUI and MPI on a mac with an Arm chip?
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Homebrew installation on Mac

Post by kevinarden »

Mumps is nice, but not a requirement, you could get started with
-DWITH_Mumps:BOOL=FALSE

Mumps is a way to use the direct solver with mpi, the other direct way is Umfpack. Iterative solvers will work without either.

Depends on your needs.

the last info I saw on installing mumps was
https://discourse.brew.sh/t/no-availabl ... 3?u=foadsf

But the error you are experiencing is that it can't find mumps.
Akthem
Posts: 3
Joined: 17 Apr 2023, 23:37
Antispam: Yes

Re: Homebrew installation on Mac

Post by Akthem »

Thank you! I set withmumps to false and followed through with the installation successfully. However, when I try to run ElmerGUI, I get the following:

Code: Select all

Akthem@X-mbp build % elmerGUI
objc[95135]: Class QMacAutoReleasePoolTracker is implemented in both /opt/homebrew/Cellar/qt/6.4.3_2/lib/QtCore.framework/Versions/A/QtCore (0x1044b05d0) and /opt/homebrew/Cellar/qt@5/5.15.8_2/lib/QtCore.framework/Versions/5/QtCore (0x102995310). One of the two will be used. Which one is undefined.
objc[95135]: Class QT_ROOT_LEVEL_POOL__THESE_OBJECTS_WILL_BE_RELEASED_WHEN_QAPP_GOES_OUT_OF_SCOPE is implemented in both /opt/homebrew/Cellar/qt/6.4.3_2/lib/QtCore.framework/Versions/A/QtCore (0x1044b0648) and /opt/homebrew/Cellar/qt@5/5.15.8_2/lib/QtCore.framework/Versions/5/QtCore (0x102995388). One of the two will be used. Which one is undefined.
objc[95135]: Class KeyValueObserver is implemented in both /opt/homebrew/Cellar/qt/6.4.3_2/lib/QtCore.framework/Versions/A/QtCore (0x1044b0670) and /opt/homebrew/Cellar/qt@5/5.15.8_2/lib/QtCore.framework/Versions/5/QtCore (0x1029953b0). One of the two will be used. Which one is undefined.
objc[95135]: Class RunLoopModeTracker is implemented in both /opt/homebrew/Cellar/qt/6.4.3_2/lib/QtCore.framework/Versions/A/QtCore (0x1044b06c0) and /opt/homebrew/Cellar/qt@5/5.15.8_2/lib/QtCore.framework/Versions/5/QtCore (0x102995400). One of the two will be used. Which one is undefined.
objc[95135]: Class QCocoaPageLayoutDelegate is implemented in both /opt/homebrew/Cellar/qt/6.4.3_2/lib/QtPrintSupport.framework/Versions/A/QtPrintSupport (0x10183c258) and /opt/homebrew/Cellar/qt@5/5.15.8_2/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport (0x100f05180). One of the two will be used. Which one is undefined.
objc[95135]: Class QCocoaPrintPanelDelegate is implemented in both /opt/homebrew/Cellar/qt/6.4.3_2/lib/QtPrintSupport.framework/Versions/A/QtPrintSupport (0x10183c2d0) and /opt/homebrew/Cellar/qt@5/5.15.8_2/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport (0x100f051f8). One of the two will be used. Which one is undefined.
Load /Users/Akthem/elmer/install/bin/../share/ElmerGUI/edf/egini.xml... done
Load tetgen plugin... not found
Tetgen functionality unavailable
Constructing ElmergridAPI... done
QWidget: Must construct a QApplication before a QWidget
zsh: abort      elmerGUI
When I try to remove qt/qwt@6 I get another error that the qwt_plot.h is not found during the make -j12 install command run. I hope this is the last push. Please help with it =)
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Homebrew installation on Mac

Post by kevinarden »

which QT version do you have if you remove 6? I believe the default is QT4 but if you have QT5 then you need a
-DWITH_QT5=TRUE
Akthem
Posts: 3
Joined: 17 Apr 2023, 23:37
Antispam: Yes

Re: Homebrew installation on Mac

Post by Akthem »

kevinarden wrote: 18 Apr 2023, 11:38 which QT version do you have if you remove 6? I believe the default is QT4 but if you have QT5 then you need a
-DWITH_QT5=TRUE
I can finally open ElmerGUI! You are a saviour. I will take this for a spin finally, now that I got over the installation hurdles thanks to your support.

Best
Akthem
Post Reply