Homebrew installation on Mac

Discussion about building and installing Elmer
kataja
Posts: 74
Joined: 09 May 2014, 16:06
Antispam: Yes

Homebrew installation on Mac

Post by kataja »

Hello,

there is now available a homebrew tap for installing Elmer in OSX.

Run

Code: Select all

$ brew tap elmercsc/homebrew-elmerfem
$ brew install elmer --HEAD
in terminal to install latest elmer version. For release 8.0 installation, drop the "--HEAD" option.

For more installation options run

Code: Select all

 $ brew info elmer 
Note that this will compile elmer from scratch so it might take a while.

Cheers,
Juhani
drone50
Posts: 4
Joined: 09 Jul 2015, 15:58
Antispam: Yes

Re: Homebrew installation on Mac

Post by drone50 »

Unfortunately, I was faild to install elmer by using your suggestions. plz check my log.



==> Installing elmer from elmercsc/homebrew-elmerfem
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Building with an alternative Fortran compiler
This is unsupported.
Warning: No Fortran optimization information was provided. You may want to consider
setting FCFLAGS and FFLAGS or pass the `--default-fortran-flags` option to
`brew install` if your compiler is compatible with GCC.

If you like the default optimization level of your compiler, ignore this
warning.
==> Building with an alternative Fortran compiler
This is unsupported.
Warning: No Fortran optimization information was provided. You may want to consider
setting FCFLAGS and FFLAGS or pass the `--default-fortran-flags` option to
`brew install` if your compiler is compatible with GCC.

If you like the default optimization level of your compiler, ignore this
warning.
==> Building with an alternative Fortran compiler
This is unsupported.
Warning: No Fortran optimization information was provided. You may want to consider
setting FCFLAGS and FFLAGS or pass the `--default-fortran-flags` option to
`brew install` if your compiler is compatible with GCC.

If you like the default optimization level of your compiler, ignore this
warning.
==> Building with an alternative Fortran compiler
This is unsupported.
Warning: No Fortran optimization information was provided. You may want to consider
setting FCFLAGS and FFLAGS or pass the `--default-fortran-flags` option to
`brew install` if your compiler is compatible with GCC.

If you like the default optimization level of your compiler, ignore this
warning.
==> Building with an alternative Fortran compiler
This is unsupported.
Warning: No Fortran optimization information was provided. You may want to consider
setting FCFLAGS and FFLAGS or pass the `--default-fortran-flags` option to
`brew install` if your compiler is compatible with GCC.

If you like the default optimization level of your compiler, ignore this
warning.
==> Cloning https://github.com/ElmerCSC/elmerfem.git
Updating /Library/Caches/Homebrew/elmer--git
==> Checking out branch devel
==> cmake ../ -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/elmer/HEAD -DWITH_Hypre:BOOL=TRUE -DWITH_Mump
==> make
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libumfpack.a(umf_zi_dump.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libumfpack.a(umf_zl_dump.c.o) has no symbols
/usr/local/Cellar/cmake/3.2.3/bin/cmake -E cmake_progress_report /tmp/elmer20150721-1416-t5ctya/build/CMakeFiles 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
[ 74%] Built target umfpack
make: *** [all] Error 2

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
https://github.com/elmercsc/homebrew-elmerfem/issues
foadsf
Posts: 81
Joined: 20 Sep 2016, 23:56
Antispam: Yes
Contact:

Re: Homebrew installation on Mac

Post by foadsf »

As explained here and here there are two different methods for installing elmer on macOS using HomeBrew:

Method 1:
  • brew tap brewsci/science
  • brew install mumps
  • if that didn't work, download mumps.rb from here
  • brew install ./mumps.rb
  • brew tap elmercsc/homebrew-elmerfem
  • brew install elmer --HEAD --with-elmergui
Method 2:
  • brew tap dpo/openblas
  • brew install mumps
  • brew tap elmercsc/homebrew-elmerfem
  • brew edit elmer
  • comment the depends_on "scalapack" line out
  • brew install elmer --HEAD --with-elmergui
ajpina
Posts: 7
Joined: 22 Mar 2018, 01:15
Antispam: Yes

Re: Homebrew installation on Mac

Post by ajpina »

Hi,
Method 2 worked for me when upgrading to v8.4. So no issues during installation, ElmerGUI, ElmerGrid and ElmerSolver ran okay.
However, I noticed that ElmerSolver started throwing SIGSEGV with models that I solved with previous versions.
So I ran ctest -L quick and realized that only 82% of tests passed, please see the log attached [Test_Elmer.txt].
Then I noticed that elmer was build with clang rather than gcc, So I tried building with gcc-8 and running ctest again, the results are in [Test_Elmer3.txt].

In summary, even though the installation is successful, the solver is not stable.

Last try was building elmer without hypre, mumps, open-mpi. This time ElmerSolver passed all the tests.

Could anybody point out to what the issue is? Apparently, there is an issue with the dependencies that is not caught during compilation and installation.

Looking forward to getting any advise.
Thanks,
Alejandro
Attachments
Tests_Elmer.txt
(32.63 KiB) Downloaded 439 times
Tests_Elmer3.txt
(32.41 KiB) Downloaded 445 times
foadsf
Posts: 81
Joined: 20 Sep 2016, 23:56
Antispam: Yes
Contact:

Re: Homebrew installation on Mac

Post by foadsf »

I tried upgrading my HomeBrew packages and now Elmer fails to upgrade returning this error:
==> Reinstalling 2 broken dependents from source:
elmercsc/elmerfem/elmer, mumps
Error: No available formula with the name "scotch" (dependency of elmercsc/elmerfem/elmer)
I would appreciate if you could help me know what is the problem and how it should be solved?
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Homebrew installation on Mac

Post by raback »

Hi,

Sorry for late reply. Scotch is a dependency of MUMPS. Do you need MUMPS? If not you could edit

https://github.com/ElmerCSC/homebrew-el ... r/elmer.rb

and set there (line 40 or so)

Code: Select all

-DWITH_Mumps:BOOL=FALSE
The problem with Mac is that nobody in ElmerTeam uses it and homobrew is not terribly stable either.

If some Mac user would sort out the problems with MUMPS we would of course be very happy.

-Peter
mcbill
Posts: 1
Joined: 12 Jan 2020, 07:48
Antispam: Yes

Re: Homebrew installation on Mac

Post by mcbill »

Hello,
I am new to Elmer and stuck with what I think is an installation problem. I downloaded the latest version of MUMPS and Elmer via Homebrew as of today. I'm running macOS 10.15.2.
The GUI runs, but when I start the solver I get this error:

dyld: Symbol not found: __cg_jpeg_resync_to_restart
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /usr/local/bin/../lib/libJPEG.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO

When I start ElmerGUI I get this:

mcbillsan@Williams-iMac bin % ElmerGUI
Load /usr/local/Cellar/elmer/HEAD-c2cf233/bin/../share/ElmerGUI/edf/egini.xml... done
Load tetgen plugin... not found
Tetgen functionality unavailable
Constructing ElmergridAPI... done
QObject::connect: No such signal MeshingThread::terminated()
Load /usr/local/Cellar/elmer/HEAD-c2cf233/bin/../share/ElmerGUI/edf/edf.xml... done
Load /usr/local/Cellar/elmer/HEAD-c2cf233/bin/../share/ElmerGUI/edf/navier-stokes.xml... done
Load /usr/local/Cellar/elmer/HEAD-c2cf233/bin/../share/ElmerGUI/edf/meshdeform.xml... done
Load /usr/local/Cellar/elmer/HEAD-c2cf233/bin/../share/ElmerGUI/edf/helmholtz.xml... done
Load /usr/local/Cellar/elmer/HEAD-c2cf233/bin/../share/ElmerGUI/edf/heatequation.xml... done
Load /usr/local/Cellar/elmer/HEAD-c2cf233/bin/../share/ElmerGUI/edf/electrostatics.xml... done
Load /usr/local/Cellar/elmer/HEAD-c2cf233/bin/../share/ElmerGUI/edf/magnetodynamics.xml... done
Load /usr/local/Cellar/elmer/HEAD-c2cf233/bin/../share/ElmerGUI/edf/linearelasticity.xml... done
Load /usr/local/Cellar/elmer/HEAD-c2cf233/bin/../share/ElmerGUI/edf/magnetodynamics2d.xml... done
Load /usr/local/Cellar/elmer/HEAD-c2cf233/bin/../share/ElmerGUI/edf/resultoutput.xml... done
Initialize GL
Vendor: NVIDIA Corporation
Renderer: NVIDIA GeForce GT 755M OpenGL Engine
Version: 2.1 NVIDIA-14.0.31 355.11.11.10.10.143

Can someone please point me in the right direction?
Thank you,
Bill
foadsf
Posts: 81
Joined: 20 Sep 2016, 23:56
Antispam: Yes
Contact:

Re: Homebrew installation on Mac

Post by foadsf »

I just tried installing Elmber using my own instructions above and got the error:

Code: Select all

Last 15 lines from /Users/foobar/Library/Logs/Homebrew/scalapack/02.make:
           ^
/usr/local/Cellar/open-mpi/4.0.2/include/mpi.h:2850:31: note: expanded from macro 'MPI_Type_struct'
#define MPI_Type_struct(...)  THIS_SYMBOL_WAS_REMOVED_IN_MPI30(MPI_Type_struct, MPI_Type_create_struct)
                              ^
/usr/local/Cellar/open-mpi/4.0.2/include/mpi.h:322:57: note: expanded from macro 'THIS_SYMBOL_WAS_REMOVED_IN_MPI30'
#define THIS_SYMBOL_WAS_REMOVED_IN_MPI30(func, newfunc) _Static_assert(0, #func " was removed in MPI-3.0.  Use " #newfunc " instead.")
                                                        ^
1 error generated.
1 error generated.
make[2]: *** [CMakeFiles/scalapack.dir/BLACS/SRC/dgamx2d_.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/scalapack.dir/BLACS/SRC/sgamx2d_.c.o] Error 1
make[2]: *** [CMakeFiles/scalapack.dir/BLACS/SRC/igamx2d_.c.o] Error 1
make[1]: *** [CMakeFiles/scalapack.dir/all] Error 2
make: *** [all] Error 2

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/dpo/homebrew-openblas/issues

These open issues may also help:
enhancement: much faster build via modern CMake for Scalapack and Mumps https://github.com/dpo/homebrew-openblas/issues/84
I wish These macOS issues would be resolved once for good.
foadsf
Posts: 81
Joined: 20 Sep 2016, 23:56
Antispam: Yes
Contact:

Re: Homebrew installation on Mac

Post by foadsf »

I have updated the MUMPS installation with mac HomeBrew here. It would be great if the Elmer formula could also get updated accordingly.
jeromiglopez
Posts: 7
Joined: 07 Mar 2020, 02:25
Antispam: Yes
Location: Mayagüez, Puerto Rico

Re: Homebrew installation on Mac

Post by jeromiglopez »

mcbill wrote: 12 Jan 2020, 09:18 Hello,
I am new to Elmer and stuck with what I think is an installation problem. I downloaded the latest version of MUMPS and Elmer via Homebrew as of today. I'm running macOS 10.15.2.
The GUI runs, but when I start the solver I get this error:

dyld: Symbol not found: __cg_jpeg_resync_to_restart
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /usr/local/bin/../lib/libJPEG.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO

When I start ElmerGUI I get this:

mcbillsan@Williams-iMac bin % ElmerGUI
Load /usr/local/Cellar/elmer/HEAD-c2cf233/bin/../share/ElmerGUI/edf/egini.xml... done
Load tetgen plugin... not found
Tetgen functionality unavailable
Constructing ElmergridAPI... done
QObject::connect: No such signal MeshingThread::terminated()
Load /usr/local/Cellar/elmer/HEAD-c2cf233/bin/../share/ElmerGUI/edf/edf.xml... done
Load /usr/local/Cellar/elmer/HEAD-c2cf233/bin/../share/ElmerGUI/edf/navier-stokes.xml... done
Load /usr/local/Cellar/elmer/HEAD-c2cf233/bin/../share/ElmerGUI/edf/meshdeform.xml... done
Load /usr/local/Cellar/elmer/HEAD-c2cf233/bin/../share/ElmerGUI/edf/helmholtz.xml... done
Load /usr/local/Cellar/elmer/HEAD-c2cf233/bin/../share/ElmerGUI/edf/heatequation.xml... done
Load /usr/local/Cellar/elmer/HEAD-c2cf233/bin/../share/ElmerGUI/edf/electrostatics.xml... done
Load /usr/local/Cellar/elmer/HEAD-c2cf233/bin/../share/ElmerGUI/edf/magnetodynamics.xml... done
Load /usr/local/Cellar/elmer/HEAD-c2cf233/bin/../share/ElmerGUI/edf/linearelasticity.xml... done
Load /usr/local/Cellar/elmer/HEAD-c2cf233/bin/../share/ElmerGUI/edf/magnetodynamics2d.xml... done
Load /usr/local/Cellar/elmer/HEAD-c2cf233/bin/../share/ElmerGUI/edf/resultoutput.xml... done
Initialize GL
Vendor: NVIDIA Corporation
Renderer: NVIDIA GeForce GT 755M OpenGL Engine
Version: 2.1 NVIDIA-14.0.31 355.11.11.10.10.143

Can someone please point me in the right direction?
Thank you,
Bill
Dear Bill,

Maybe this link https://stackoverflow.com/questions/355 ... to-restart can solve your problem.

All the best,

Jeromi
Post Reply