Topic: OOFEM Instalation - Mac OS X 10.9.2 (Mavericks)

This post might be of some guidance to those who are trying to install OOFEM on Mac OS. In summary, the installation process is pretty close to the one describe for Unix/Linux. So, here we go:

1 - Make sure you have "cmake" installed in your Mac
- you can install it via homebrew: brew install cake (For that, you will new Homebrew installed, check: https://github.com/Homebrew/homebrew/wiki/Installation)
- alternatively, you can download cmake here: http://en.sourceforge.jp/projects/sfnet … .2.tar.gz/ and follow the installation procedure.

2 - Download OOFEM.zip, e.g. oofem-2.3.zip

3 - Create a folder out-of-oofem (In Terminal: "mkdir -p ~/build/debug")

4 - In Terminal, run cmake and configure the target to oofem-2.3 (PATH_TO_OOFEM_FOLDER)
- make sure you are in the "debug" folder (cd build/degug) before you run "cmake"
- the cmake command should look like this: cmake ~/oofem-2.3

5 - Compile OOFEM using "make" command in Terminal
- Some command line tools, e.g. make, already exist on OS X, but you may need a newer version: brew install make
- you can check some details here: http://www.topbug.net/blog/2013/04/14/i … -mac-os-x/

6 - There few warning during the installation, they are presented as follows:
/Users/wilson/Desktop/oofem-2.3/src/oofemlib/xfem/enrichmentitem.C:1180:71: warning:
      implicit conversion of NULL constant to 'bool' [-Wnull-conversion]
  ...totalThickness = layeredCS->give(CS_Thickness, NULL, NULL, NULL); // no ...
                      ~~~~~~~~~                                 ^~~~
                                                                false
/Users/wilson/Desktop/oofem-2.3/src/sm/intmatbilinczjansson.C:499:14: warning:
      unused variable 'tolerance' [-Wunused-const-variable]
const double tolerance = 1.0e-12; // small number
             ^
/Users/wilson/Desktop/oofem-2.3/src/sm/intmatbilinczfagerstrom.C:527:14: warning:
      unused variable 'tolerance' [-Wunused-const-variable]
const double tolerance = 1.0e-12; // small number

7 - Next, running the tests "crest", the following result was obtained:
99% tests passed, 1 tests failed out of 191
Total Test time (real) =  25.07 sec
The following tests FAILED:
    125 - test_weakPeriodicTriangularObstacle.in (Failed)
Errors while running CTest

8 - Alternatively, he release version can be installed based on the already presented steps, with a few modifications:
step 3 - mkdir -p ~/build/release/
           - cd ~/build/release/
step 4 - cmake -DCMAKE_BUILD_TYPE=Release ~/oofem-2.3

9 - Installing the Release Version yielded the following warnings:
In file included from /Users/wilson/Desktop/oofem-2.3/src/sm/fracturemanager.C:35:
/Users/wilson/Desktop/oofem-2.3/src/sm/fracturemanager.h:91:25: warning: private field 'type'
      is not used [-Wunused-private-field]
    FailureCriteriaType type;       // local, nonlocal
                        ^
/Users/wilson/Desktop/oofem-2.3/src/sm/fracturemanager.h:93:10: warning: private field
      'failedFlag' is not used [-Wunused-private-field]
    bool failedFlag;                // is the criteria fulfilled?

/Users/wilson/Desktop/oofem-2.3/src/oofemlib/xfem/enrichmentitem.C:1180:71: warning: implicit
      conversion of NULL constant to 'bool' [-Wnull-conversion]
    double totalThickness = layeredCS->give(CS_Thickness, NULL, NULL, NULL); // no position available
                            ~~~~~~~~~                                 ^~~~
                                                                      false
[90%] /Users/wilson/Desktop/oofem-2.3/src/sm/intmatbilinczjansson.C:499:14: warning: unused variable
      'tolerance' [-Wunused-const-variable]
const double tolerance = 1.0e-12; // small number
             ^
Building CXX object src/oofemlib/CMakeFiles/core.dir/mmaleastsquareprojection.C.o
/Users/wilson/Desktop/oofem-2.3/src/sm/intmatbilinczfagerstrom.C:527:14: warning: unused
      variable 'tolerance' [-Wunused-const-variable]
const double tolerance = 1.0e-12; // small number

10 - And "ctest":
99% tests passed, 1 tests failed out of 191
Total Test time (real) =  12.26 sec
The following tests FAILED:
    125 - test_weakPeriodicTriangularObstacle.in (Failed)
Errors while running CTest

I do not know why these warning are coming up. It might be something related to Mac OS since I installed on Linux Ubuntu 13.10 and he installation worked like a charm.

I hope this procedure will be of some support to Mac OS users.

Kind regards,

Wilson

Re: OOFEM Instalation - Mac OS X 10.9.2 (Mavericks)

You can view more information about a failed test by running

ctest -R test_weakPeriodicTriangularObstacle -V

All three compilation warnings are absolutely correct warnings, though not all compilers produce them.
All of them will be fixed eventually

Re: OOFEM Instalation - Mac OS X 10.9.2 (Mavericks)

Despite the warnings, OOFEM is working perfectly on Mac OS.
Thanks for you remarks Mr. Ohman.