ElmerCSC / homebrew-elmerfem

Homebrew formula for installing Elmer on Macs
6 stars 15 forks source link

mumps is not available anymore as a formula #11

Open juhanikataja opened 6 years ago

juhanikataja commented 6 years ago

Workaround: Install using --without-mumps flag.

Maybe we should have a mumps formula in this tap specifically tailored for Elmer?

Foadsf commented 6 years ago

I tried the `` flag this is the error I got:

Last 15 lines from /Users/foad/Library/Logs/Homebrew/elmer/02.make: Error: Assignment to contiguous pointer from non-contiguous target at (1) /tmp/elmer-20180707-32225-190b5nu/elmerfem-release-8.2/fem/src/CRSMatrix.F90:1620:18:

 A % Values => Values
              1

Error: Assignment to contiguous pointer from non-contiguous target at (1) /tmp/elmer-20180707-32225-190b5nu/elmerfem-release-8.2/fem/src/CRSMatrix.F90:1621:16:

 A % Cols => Cols
            1

Error: Assignment to contiguous pointer from non-contiguous target at (1) make[2]: [fem/src/CMakeFiles/elmersolver.dir/CRSMatrix.F90.o] Error 1 make[2]: Waiting for unfinished jobs.... make[1]: [fem/src/CMakeFiles/elmersolver.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/elmercsc/homebrew-elmerfem/issues

These open issues may also help: Elmer build error on 10.11.6 https://github.com/ElmerCSC/homebrew-elmerfem/issues/6 Umfpack problem while compiling Elmer with homebrew https://github.com/ElmerCSC/homebrew-elmerfem/issues/2 Elmer failed to build on OS 10.12.6 https://github.com/ElmerCSC/homebrew-elmerfem/issues/8 Unable to install elmer on Mac by using brew https://github.com/ElmerCSC/homebrew-elmerfem/issues/1 Elmer failed to build on OS 10.12.1 https://github.com/ElmerCSC/homebrew-elmerfem/issues/5

Foadsf commented 6 years ago

I tried installing mumps from here http://mumps.enseeiht.fr/index.php?page=links

but now I get this error:

Error: Operation already in progress for scalapack.formula Another active Homebrew process is already using scalapack.formula. Please wait for it to finish or terminate it to continue.

Foadsf commented 6 years ago

Ok from here I was able to install elmer but not the elmergui. steps:

  1. brew edit elmer
  2. comment the depends_on "scalapack" out
  3. find the cmake_args = %W[-DCMAKE_INSTALL_PREFIX=#{prefix}] line
  4. add the cmake_args << "-DCMAKE_Fortran_COMPILER_SUPPORTS_CONTIGUOUS=FALSE" #new argument for gfortran-8 afterwards

It should compile now.

but when the --with-elmergui is used I get this error:

Last 15 lines from /Users/foad/Library/Logs/Homebrew/elmer/01.cmake: -- Check size of long - done -- Skipping test WinkelPoissonMetisKwayDual with 16 procs -- Skipping test WinkelPoissonMetisKwayNodal with 16 procs -- Building ElmerGUI



CMake Error at /usr/local/Cellar/cmake/3.11.4/share/cmake/Modules/FindQt4.cmake:1321 (message): Found unsuitable Qt version "5.11.1" from /usr/local/opt/qt/bin/qmake, this code requires Qt 4.x Call Stack (most recent call first): ElmerGUI/CMakeLists.txt:16 (FIND_PACKAGE)

-- Configuring incomplete, errors occurred! See also "/tmp/elmer-20180708-36589-1utalwv/elmerfem-release-8.2/build/CMakeFiles/CMakeOutput.log".

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

These open issues may also help: Elmer build error on 10.11.6 https://github.com/ElmerCSC/homebrew-elmerfem/issues/6 Umfpack problem while compiling Elmer with homebrew https://github.com/ElmerCSC/homebrew-elmerfem/issues/2 Elmer failed to build on OS 10.12.6 https://github.com/ElmerCSC/homebrew-elmerfem/issues/8 Unable to install elmer on Mac by using brew https://github.com/ElmerCSC/homebrew-elmerfem/issues/1 Elmer failed to build on OS 10.12.1 https://github.com/ElmerCSC/homebrew-elmerfem/issues/5

Foadsf commented 6 years ago

from here I was able to install elmergui with : brew install elmer --HEAD --with-elmergui

Foadsf commented 6 years ago

method 1:

  1. brew tap dpo/openblas
  2. brew install mumps
  3. brew tap elmercsc/homebrew-elmerfem
  4. brew edit elmer
  5. comment the depends_on "scalapack" line out
  6. brew install elmer --HEAD --with-elmergui

method 2:

  1. brew tap brewsci/science
  2. brew install mumps
  3. if that didn't work, download mumps.rb from here
  4. brew install ./mumps.rb
  5. brew tap elmercsc/homebrew-elmerfem
  6. brew install elmer --HEAD --with-elmergui
juhanikataja commented 6 years ago

The scalapack dependency was removed in 307d101.

Using the dpo/openblas tap I was able to install elmer with gcc-8 series compilers and OpenMP and ElmerICE enabled using following:

$ HOMEBREW_CC=gcc-8 HOMEBREW_CXX=g++-8 brew install elmer --HEAD --with-openmp --with-elmerice
Foadsf commented 6 years ago

@juhanikataja removing the scalapack dependency seems more like a temporary workaround. It should affect the efficiency of the solver. besides the second method doesn't require the scalapack dependency to be removed. There might be something wrong in the dpo/openblas mumps.rb formula I suppose.

juhanikataja commented 6 years ago

@Foadsf The dependency for scalapack comes only through mumps library. Currently the mumps formula (https://github.com/dpo/homebrew-openblas/blob/master/mumps.rb) depends on scalapack with default settings. But the elmer formula doesn't check if mumps is built with scalapack enabled or not. So, by removing scalapack dep one can quite safely build elmer w/o mumps and, on the other hand, building elmer with mumps has become experimental since it depends on nonstandard tap dpo/homebrew-openblas (although it seems to be pretty high quality one).

Considering this, lets re-open this issue until there is a satisfactory solution to building elmer with mumps.

Foadsf commented 6 years ago

@juhanikataja I think it is also a good idea to discuss the issue with the developers of brewsci/science/mumps.rb and dpo/openblas/mumps.rb formulas.

pmlefeuvre commented 6 years ago

Hi,

I struggled to compile Elmer on Mac OS 10.13.6 from Homebrew until I found this post and had helped from a colleague.

The solution was similar to above:

  1. either brew edit elmer or download and edit elmer.rb
  2. find the cmake_args = %W[-DCMAKE_INSTALL_PREFIX=#{prefix}] line and add: cmake_args << "-DCMAKE_Fortran_COMPILER_SUPPORTS_CONTIGUOUS=FALSE"
  3. compile with either brew install elmer --HEAD --without-mumps or brew install elmer.rb --HEAD --without-mumps

Thanks for your posts Foadsf and juhanikataja

PiM

luzpaz commented 6 years ago

Over at FreeCAD we're tracking elmerfem as an optional dependency for the FreeCAD FEM workbench. We'd love to see elmer more supported in the package ecosystem (together with other FEM solvers out there). Here are our efforts so far. Perhaps there is room to collaborate. Related:

Foadsf commented 5 years ago

@luzpaz

  1. Combining Elmer and FreeCAD is like a marriage made in heavens :)
  2. I emailed this discussion to the developers.
  3. consider following them on Twitter. see this list.
  4. I have asked Chocolatey guys to add the package as well and they are working on it. see here
Foadsf commented 4 years ago

I have updated the MUMPS installation method here. It would be a great help if Elmer's formula could also get updated accordingly.