|
[Sponsors] |
February 22, 2013, 19:39 |
|
#241 | |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
Quote:
I am having the same problem. I have the options, options.rej, options.org files open, but I am not too familiar with patching files. Would you be able to share what your patched options file looks like? Thanks |
||
February 23, 2013, 05:03 |
|
#242 | |
New Member
Per Jørgensen
Join Date: Mar 2012
Posts: 20
Rep Power: 14 |
Quote:
EXE_INC = \ -IphaseModel/lnInclude \ -ImultiphaseSystem/lnInclude \ -ImultiphaseFixedFluxPressure \ /*-IkineticTheoryModels/lnInclude*/ \ -IinterfacialModels/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/incompressible/LES/LESModel \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -lmultiphaseSystem \ -lcompressibleMultiPhaseModel \ -linterfaceProperties \ -lincompressibleTransportModels \ -lcompressibleMultiphaseEulerianInterfacialModels \ -lincompressibleTurbulenceModel \ /*-lcompressibleKineticTheoryModel*/ \ -lincompressibleLESModels \ -lincompressibleRASModels \ -lfiniteVolume |
||
February 23, 2013, 05:09 |
AVX on OS X
|
#243 |
New Member
Per Jørgensen
Join Date: Mar 2012
Posts: 20
Rep Power: 14 |
Hi
I would like to compile an optimized OpenFOAM using AVX instruction set. But the OS X assembler does not recognize AVX. I found a suggested fix but it does not seem to work Does anyone have had success in compiling OpenFOAM with AVX on OS X? Best regards, Per |
|
February 23, 2013, 19:53 |
|
#244 |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
perjorgen,
Thanks for the file contents. Matt |
|
February 24, 2013, 08:33 |
|
#245 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
http://stackoverflow.com/questions/9...-mac-os-x-lion Note: I'm currently having strange problems compiling OF with gcc-mp-4.7 but 4.6 works (clang needs some changes, but then the compiler runs out of memory when compiling the swak-parsers with -O2 .... on a 8 Gig machine ... so it is unusable for me)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
February 24, 2013, 17:51 |
|
#246 | |
New Member
Per Jørgensen
Join Date: Mar 2012
Posts: 20
Rep Power: 14 |
Quote:
|
||
February 27, 2013, 17:13 |
Mountain Lion
|
#247 |
New Member
Thomas Olsen
Join Date: Feb 2013
Posts: 6
Rep Power: 13 |
Greetings,
I'm another newbie to OpenFOAM and I have a problem with the mpi.h header file not being found. My make.log file gives: Code:
+ wmakeLnInclude OSspecific/POSIX + Pstream/Allwmake + wmake libso dummy '${HOME}/OpenFOAM/OpenFOAM-2.1.x/platforms/darwinIntel64Gcc46DPOpt/lib/dummy/libPstream.dylib' is up to date. + case "$WM_MPLIB" in + set +x Note: ignore spurious warnings about missing mpicxx.h headers wmake libso mpi SOURCE=UIPread.C ; g++-mp-4.6 -m64 -fsignaling-nans -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -I${HOME}/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I${HOME}/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64Gcc46DPOptMACPORTOPENMPI/UIPread.o SOURCE=UOPwrite.C ; g++-mp-4.6 -m64 -fsignaling-nans -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -I${HOME}/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I${HOME}/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64Gcc46DPOptMACPORTOPENMPI/UOPwrite.o UIPread.C:29:17: fatal error: mpi.h: No such file or directory compilation terminated. UOPwrite.C:29:17: fatal error: mpi.h: No such file or directory compilation terminated. make: *** [Make/darwinIntel64Gcc46DPOptMACPORTOPENMPI/UIPread.o] Error 1 make: *** Waiting for unfinished jobs.... make: *** [Make/darwinIntel64Gcc46DPOptMACPORTOPENMPI/UOPwrite.o] Error 1 I'm using openmpi 1.6.3 from macports and gcc-mp-4.6, g++-mp-4.6, and openmpicc for scotch-5.1.11. I set WM_MPLIB=SYSTEMOPENMPI as discussed in this thread and the patch for config/settings.sh changes this to export WM_MPLIB=MACPORTOPENMPI I think that these are all the relevant points for openmpi from macports. If you need any more information, just ask. Thank you, Tom |
|
March 1, 2013, 07:09 |
|
#248 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
To clarify: forget about SYSTEMOPENMPI. MACPORTOPENMPI should be the value The compiler calls for me look something like this: Code:
SOURCE=UOPwrite.C ; ccache g++-mp-4.6 -m64 -fsignaling-nans -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -DOMPI_SKIP_MPICXX -I/opt/local/include/openmpi -IlnInclude -I. -I/Users/bgschaid/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/Users/bgschaid/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64Gcc46DPOptMACPORTOPENMPI/UOPwrite.o BTW: which version of the patch are you using? MACPORTOPENMPI is only in newer versions
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
March 1, 2013, 16:04 |
|
#249 | ||
New Member
Thomas Olsen
Join Date: Feb 2013
Posts: 6
Rep Power: 13 |
Quote:
Quote:
Code:
ThirdParty-2.1.0-Mac.patch OpenFOAM-2.1.x-Mac_20130125.patch OpenFOAM-2.1.x-Mac-gcc46.patch Code:
ln -s ../../etc/wmakeFiles/scotch/Makefile.inc.i686_mac_darwin.shlib-OpenFOAM Makefile.inc Also, what is the ccache command for in the code section of your reply above? Code:
SOURCE=UOPwrite.C ; ccache g++-mp-4.6 -m64 -fsignaling-nans -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -DOMPI_SKIP_MPICXX -I/opt/local/include/openmpi -IlnInclude -I. -I/Users/bgschaid/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/Users/bgschaid/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64Gcc46DPOptMACPORTOPENMPI/UOPwrite.o Thanks for all your help. |
|||
March 2, 2013, 16:31 |
Mountain Lion
|
#250 |
New Member
Thomas Olsen
Join Date: Feb 2013
Posts: 6
Rep Power: 13 |
Greetings,
I used `git pull` to update the sources and created mplibMACPORTOPENMPI in ${HOME}/OpenFOAM/OpenFOAM-2.1.x/wmake/rules/darwinIntel64Gcc46/. The mplibMACPORTOPENMPI contains Code:
PFLAGS = -DOMPI_SKIP_MPICXX PINC = -I$(MPI_ARCH_PATH)/include/openmpi PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi Thanks again for all the help given in this thread. Tom |
|
March 6, 2013, 07:42 |
|
#251 |
New Member
nicolas
Join Date: Oct 2009
Posts: 24
Rep Power: 17 |
Hi,
I am trying to compile OF2.1.1 on my mac Mountain Lion. Because I am using homebrew, and since it is recommended not to have both (homebrew and macports), I have installed gcc 4.6.3 using homebrew. I also installed Open MPI 1.6.4, since according to a previous post (#236) from Bernard "OpenMPI: the latest is OK". I have used the following patches: ThirdParty-2.1.0-Mac.patch OpenFOAM-2.1.x-Mac.patch OpenFOAM-2.1.x-Mac-gcc46.patch OpenFOAM-2.1.x-Mac_20130125.patch Regarding the ThirdParty patch, I linked Makefile.inc to ../../etc/wmakeFiles/scotch/Makefile.inc.i686_mac_darwin.shlib-OpenFOAM following a previous post (#249). I have also changed in files wmake/rules/darwinIntel64Gcc46/c and wmake/rules/darwinIntel64Gcc46/c++: Code:
cc = gcc-mp-4.6 -m64 -fsignaling-nans -ftrapping-math CC = g++-mp-4.6 -m64 -fsignaling-nans -ftrapping-math Code:
cc = gcc-4.6 -m64 -fsignaling-nans -ftrapping-math CC = g++-4.6 -m64 -fsignaling-nans -ftrapping-math I am getting some errors which I cannot figure how to solve. This is the first error I get. Code:
SOURCE=fileStat.C ; g++-4.6 -m64 -fsignaling-nans -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -I/Users/nicolas/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/Users/nicolas/OpenFOAM/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64Gcc46DPOpt/fileStat.o signals/sigFpe.C: In destructor 'Foam::sigFpe::~sigFpe()': signals/sigFpe.C:175:12: error: 'system_malloc_' was not declared in this scope signals/sigFpe.C:189:36: error: 'mach_task_self' was not declared in this scope signals/sigFpe.C:190:32: warning: use of old-style cast [-Wold-style-cast] signals/sigFpe.C:193:21: warning: use of old-style cast [-Wold-style-cast] signals/sigFpe.C:193:36: warning: use of old-style cast [-Wold-style-cast] signals/sigFpe.C:194:17: error: 'vm_protect' was not declared in this scope signals/sigFpe.C:201:36: error: 'mach_task_self' was not declared in this scope signals/sigFpe.C:202:32: warning: use of old-style cast [-Wold-style-cast] signals/sigFpe.C:205:21: warning: use of old-style cast [-Wold-style-cast] signals/sigFpe.C:206:17: error: 'vm_protect' was not declared in this scope signals/sigFpe.C: In member function 'void Foam::sigFpe::set(bool)': signals/sigFpe.C:355:12: error: 'system_malloc_' was not declared in this scope signals/sigFpe.C:375:32: error: 'mach_task_self' was not declared in this scope signals/sigFpe.C:376:28: warning: use of old-style cast [-Wold-style-cast] signals/sigFpe.C:379:17: warning: use of old-style cast [-Wold-style-cast] signals/sigFpe.C:379:32: warning: use of old-style cast [-Wold-style-cast] signals/sigFpe.C:380:13: error: 'vm_protect' was not declared in this scope signals/sigFpe.C:382:9: error: 'system_malloc_' was not declared in this scope signals/sigFpe.C:383:22: error: 'nan_malloc_' is not a member of 'Foam::sigFpe' signals/sigFpe.C:387:32: error: 'mach_task_self' was not declared in this scope signals/sigFpe.C:388:28: warning: use of old-style cast [-Wold-style-cast] signals/sigFpe.C:391:17: warning: use of old-style cast [-Wold-style-cast] signals/sigFpe.C:392:13: error: 'vm_protect' was not declared in this scope make: *** [Make/darwinIntel64Gcc46DPOpt/sigFpe.o] Error 1 Thanks, Nicolas |
|
March 7, 2013, 08:37 |
|
#252 | |
New Member
Thomas Olsen
Join Date: Feb 2013
Posts: 6
Rep Power: 13 |
Quote:
Did you apply both the OpenFOAM-2.1.x-Mac.patch and the OpenFOAM-2.1.x-Mac_20130125.patch to the same OpenFOAM-2.1.x file? Did you see any errors when you applied the OpenFOAM-2.1.x-Mac_20130125.patch? If so, you should probably restart and just use the OpenFOAM-2.1.x-Mac_20130125.path. Also, you may want to use the sources in the git repository. See http://www.openfoam.org/download/git.php and use 2.1.x instead of 2.2.0 for the git pull command. The version of git provided with Mountain Lion works fine. You can also try 2.2.0 and apply the patches using the 2.2.0 sources provided at openfoam.org. I haven't tried this yet. Also, check with gschaider about any patches he may be working on for 2.2.0. I hope this helps. Good luck, Tom |
||
March 7, 2013, 08:47 |
|
#253 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Or you can install the gcc46 from MacPorts (due to the name it will live happily besides your Homebrew-compiler)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
March 7, 2013, 08:49 |
|
#254 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
March 7, 2013, 11:00 |
|
#255 |
New Member
nicolas
Join Date: Oct 2009
Posts: 24
Rep Power: 17 |
Thank you very much Tom.
I just used the patches, as I should have used them in the first place, and now it compiles. Silly me. I also had to modify the Make/options file based on post #242. Perhaps it would be nice, if the wikipage gets updated. Anyway, in case there are other noobie's like me, below I give an up-to-date summary of the steps that worked for me (based on posts #236, #242, #249 and the wiki-page). Just a reminder I use Mountain Lion 10.8.2. The following steps start after one creates the sparse disk-image, and unpack both OpenFOAM and ThirdParty, as explained in the wiki-page. Code:
cd ln -s /Volumes/OpenFOAM-v2.1 OpenFOAM cd ~/OpenFOAM/ThirdParty-2.1.1/scotch_5.1.11/src ln -s ../../etc/wmakeFiles/scotch/Makefile.inc.i686_mac_darwin.shlib-OpenFOAM Makefile.inc cd ~/OpenFOAM/ThirdParty-2.1.1 patch -p1 < ../ThirdParty-2.1.0-Mac.patch cd ~/OpenFOAM/OpenFOAM-2.1.1 patch -p1 < ../OpenFOAM-2.1.x-Mac_20130125.patch chmod a+x bin/addr2line4Mac.py cd ~/OpenFOAM/OpenFOAM-2.1.1/wmake/rules rm darwinIntel64Gcc46 ln -s darwinIntel64Gcc darwinIntel64Gcc46 Code:
source ~/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc Code:
vi ~/OpenFOAM/OpenFOAM-2.1.1/applications/solvers/multiphase/multiphaseEulerFoam/Make/options Code:
cd ~/OpenFOAM/OpenFOAM-2.1.1 ./Allwmake 2>&1 | tee make.log Nicolas |
|
March 7, 2013, 11:40 |
|
#256 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
March 7, 2013, 18:56 |
Final patch for 2.1
|
#257 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
As today the git for 2.2 was opened and usually OpenCFD doesn't push any changes to the "old" git anymore I decided to make a final patch for 2.1 (you find it attached). The only major change to the previous patch is that if the paraview application is installed as paraview (No version number like older binaries did) in the applications folder it will be added to the path (also pvpython etc which come with the latest paraview)
OpenFOAM-2.1.x_Mac-20130307.patch
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
March 11, 2013, 11:11 |
|
#258 |
New Member
Join Date: Mar 2013
Posts: 10
Rep Power: 13 |
hi there,
I think there is something wrong with my open mpi. When I type mpirun -V I get bash: mpirun: command not found. When I try to source bashrc by typing . OpenFOAM/OpenFOAM-2.1.0/etc/bashrc as instructed I get the same response. please help |
|
March 11, 2013, 11:58 |
|
#259 |
New Member
Join Date: Mar 2013
Posts: 10
Rep Power: 13 |
Here is my compilation log. seems to be some error with scotch?
|
|
March 11, 2013, 12:36 |
|
#260 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
I think they do it to make it possible to have a MPIch-installation at the same time
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
Tags |
compilation error |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Extend Project 1.6-ext Binary Release for Mac OS X | hjasak | OpenFOAM Announcements from Other Sources | 26 | November 5, 2013 17:50 |
Openfoam mac: Compiling custom libraries | atareen64 | OpenFOAM | 3 | April 14, 2011 12:01 |
OpenFOAM-1.6 on Mac OS X 10.6.1 | elvisjohndowson | OpenFOAM | 6 | October 21, 2009 16:45 |
Mac Simple Install Request or Processing Assistance Help | sjohnson | OpenFOAM Installation | 4 | December 12, 2008 08:46 |
MAC + SOLA for free surface | T | Main CFD Forum | 1 | April 11, 2001 14:43 |