compiling in a Mac

Discussion about building and installing Elmer
Post Reply
bbeltran
Posts: 5
Joined: 11 Oct 2017, 21:44
Antispam: Yes

compiling in a Mac

Post by bbeltran »

Hi,

I am trying to compile Elmer in a Mac with OS 10.12 Sierra and I have gcc6 installed via MacPorts.
I have run cmake after setting
export FC=gfortran-mp-6
export CXX=g++-mp-6

and cmake and make install have run without problems or compilation errors.
But when I run ctest I get
0% tests passed, 449 tests failed out of 449

where the 449 test give the same error as shown here.

Start 449: vortex3d
449/449 Test #449: vortex3d ................................................***Exception: Other 0.02 sec

449 - vortex3d (OTHER_FAULT)


If I try to run /Users/bbeltran/work/elmer/install/bin/ElmerSolver is get the following error

Bertas-MacBook:bin bbeltran$ ./ElmerSolver
ELMER SOLVER (v 8.3) STARTED AT: 2017/10/11 12:49:36
ParCommInit: Initialize #PEs: 1
MAIN:
MAIN: =============================================================
MAIN: ElmerSolver finite element software, Welcome!
MAIN: This program is free software licensed under (L)GPL
MAIN: Copyright 1st April 1995 - , CSC - IT Center for Science Ltd.
MAIN: Webpage http://www.csc.fi/elmer, Email elmeradm@csc.fi
MAIN: Version: 8.3 (Rev: caaf6907, Compiled: 2017-10-11)
MAIN: =============================================================
ERROR:: InitializeElementDescriptions: elements.def not found


Any suggestion ?

Thanks

Berta
FEMUser
Posts: 2
Joined: 12 Oct 2017, 10:32
Antispam: Yes

Re: compiling in a Mac

Post by FEMUser »

Hi Berta,

Did you install Elmer with GUI? If so how did you go around the QT4 issue. In my system I can't compile with GUI.
bbeltran
Posts: 5
Joined: 11 Oct 2017, 21:44
Antispam: Yes

Re: compiling in a Mac

Post by bbeltran »

Hi,
I actually was too quick in posting my question. ElmerSolver was not finding the file because I had a mistake in my definition of $ELMER_HOME. Now that I have corrected it ElmerSolver works fine from the command line. I don't think that I will be using the GUI.

Thanks

Berta
mwdawson
Posts: 3
Joined: 10 Aug 2019, 15:09
Antispam: Yes

Re: compiling in a Mac

Post by mwdawson »

I ran into the same error message after compiling on linux ubuntu 16.04. The error was
"ERROR:: InitializeElementDescriptions: elements.def not found"

After some research I figured out that the guidance given in section 17.1 of ElmerSolver manual for setting up the shell variable ELMER_HOME were incorrect. This section should read

export ELMER_HOME=$HOME/elmer/install/bin
export PATH=$ELMER_HOME:$PATH

The ElmerSolver manual guidance talks about setting variable LD_LIBRARY_PATH. I don't think this variable is used for anything. I didn't set it and ElmerSolver seem to work just fine. The search logic used by program to find "elements.def" can be found in the subroutine InitializeElementDescriptions in the source file ElementDescription.F90
jvelasco
Posts: 10
Joined: 03 Feb 2021, 16:45
Antispam: Yes

Re: compiling in a 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
Post Reply