-
-
Notifications
You must be signed in to change notification settings - Fork 32
Notes on El Capitan
El Capitan introduces System Integrity Protection and it breaks certain things. In particular it clears LD_LIBRARY_PATH and DYLD_LIBRARY_PATH variables. I.e. if I run the following commands by hand
$ echo $DYLD_LIBRARY_PATH; echo; echo $LD_LIBRARY_PATH
I get usual output
/usr/local/opt/boost/lib:/usr/local/opt/cgal/lib:$WM_PROJECT_DIR/platforms/darwin64ClangDPInt32Opt/lib/openmpi-system:/usr/local/Cellar/open-mpi/1.10.1/lib:$WM_PROJECT_DIR/platforms/darwin64ClangDPInt32Opt/lib:$WM_PROJECT_DIR/platforms/darwin64ClangDPInt32Opt/lib:$WM_PROJECT_DIR/platforms/darwin64ClangDPInt32Opt/lib:$WM_PROJECT_DIR/platforms/darwin64ClangDPInt32Opt/lib/dummy
/usr/local/opt/boost/lib:/usr/local/opt/cgal/lib:$WM_PROJECT_DIR/platforms/darwin64ClangDPInt32Opt/lib/openmpi-system:/usr/local/Cellar/open-mpi/1.10.1/lib:$WM_PROJECT_DIR/platforms/darwin64ClangDPInt32Opt/lib:$WM_PROJECT_DIR/platforms/darwin64ClangDPInt32Opt/lib:$WM_PROJECT_DIR/platforms/darwin64ClangDPInt32Opt/lib:$WM_PROJECT_DIR/platforms/darwin64ClangDPInt32Opt/lib/dummy
Yet, if I run these commands from shell script, output is empty.
$ cat test.sh
#!/bin/sh
echo $DYLD_LIBRARY_PATH
echo $LD_LIBRARY_PATH
$ ./test.sh
Since OpenFOAM(R) libraries are installed in non-standard locations, solvers and utilities can not function properly with the variables being empty. I have discovered the problem while using lib ("myLovelyLibrary.dylib")
construction in controlDict
, later it was reported by Jarle Kramer (#15) that parallel execution breaks.
As a solution you can...
- Disable SIP.
- Add
source $WM_PROJECT_DIR/etc/bashrc
line to your scripts (somewhere before you run OpenFOAM executables).
This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM(R) and OpenCFD(R) trade marks.
OPENFOAM(R) is a registered trade mark of OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com.