CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

OpenFOAM-2.2.2 installation failed on Mavericks

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 11, 2014, 20:06
Default OpenFOAM-2.2.2 installation failed on Mavericks
  #1
New Member
 
vdr
Join Date: Jan 2014
Posts: 7
Rep Power: 12
vdr2 is on a distinguished road
Hi,

I tried following the steps listed on this page but got errors. I have a feeling I am missing either some needed modules or my path is wrong. I am attaching the first few occurences of the error as it keeps repeating and the size of the complete log file is 275mb. Hope some one ran into a similar issue. Any help is appreciated.

- VDR
Attached Files
File Type: zip openfoam_error_log.zip (2.9 KB, 13 views)
vdr2 is offline   Reply With Quote

Old   January 12, 2014, 04:32
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

It seems that you have got a problem with gcc installation according to log file. Can you compile something simple with it? Something like:

Code:
#include <iostream>
#include <string>

int main(int argc, char* argv[])
{
    std::string msg = "Hello, World!";
    std::cout << msg << std::endl;
}
Also on Mavericks you can compile OpenFOAM using clang which comes with Xcode, though you'll need another set of patches. Brief guide can be found here.
alexeym is offline   Reply With Quote

Old   January 13, 2014, 21:03
Default
  #3
New Member
 
vdr
Join Date: Jan 2014
Posts: 7
Rep Power: 12
vdr2 is on a distinguished road
Thanks a lot! I have tested the gcc installation is fine.

I would rather use clang if possible. One thing I see in your clang instructions - what is the equivalent of the gcc-mp to be used? Should I still use gcc-mp? Shouldn't there be a clang equivalent of it?

I still the same errors if I use gcc-mp.

-VDR
vdr2 is offline   Reply With Quote

Old   January 13, 2014, 21:29
Default
  #4
New Member
 
vdr
Join Date: Jan 2014
Posts: 7
Rep Power: 12
vdr2 is on a distinguished road
Even when I use clang as the default compiler for all I get the same error. I just noticed that I get an additional error that it cannot find mpicc. Unfortunately mpicc is not available through macports. Is mpicc the same as clang?

Also the errors start happening when the compilation for PStream starts. Until then it goes through fine. Here is the error again -

+ wmakePrintBuild -check
no git description found
+ /bin/rm -f OpenFOAM/Make/darwinIntel64ClangDPOpt/global.C
+ wmakeLnInclude OpenFOAM
+ wmakeLnInclude OSspecific/POSIX
+ Pstream/Allwmake
+ wmake libso dummy
SOURCE=UPstream.C ; clang++ -m64 -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-overloaded-virtual -Wno-unused-comparison -O3 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -IMYHOME/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -IMYHOME/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64ClangDPOpt/UPstream.o
In file included from UPstream.C:26:
In file included from MYHOME/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude/UPstream.H:43:
In file included from MYHOME/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude/labelList.H:47:
In file included from MYHOME/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude/label.H:61:
In file included from MYHOME/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude/int.H:39:
In file included from MYHOME/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude/word.H:42:
In file included from MYHOME/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude/string.H:51:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/string:430:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:90:
In file included from MYHOME/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude/wchar.h:42:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cwchar:118:9: error: no member named 'mbstate_t' in the global namespace
using ::mbstate_t;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cwchar:120:9: error: no member named 'tm' in the global namespace
using ::tm;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1
vdr2 is offline   Reply With Quote

Old   January 14, 2014, 02:21
Default
  #5
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Well,

- It should be not just clang but clang++ as you're compiling C++ code.

- Why do you need gcc-mp for clang build?

- To get mpicc you need MPI libraries, so you can a) use 'export WM_MPLIB=OPENMPI' in etc/bashrc and OpenMPI from ThirdParty folder will be built, b) install OpenMPI yourself and use 'export WM_MPLIB=SYSTEMOPENMPI' to use installed version.

- When you install OpenMPI using Macports the name of compiler wrapper is openmpicc. IIRC in patches by Bernhard Gschaider he uses that name.

About your last error: is it clean build? Or maybe you are trying to mix gcc and clang builds and it messes up include paths.
alexeym is offline   Reply With Quote

Old   January 14, 2014, 10:23
Default
  #6
New Member
 
vdr
Join Date: Jan 2014
Posts: 7
Rep Power: 12
vdr2 is on a distinguished road
Thanks Alexey

I am already all the things you mentioned, except one.

> - It should be not just clang but clang++ as you're compiling C++ code.

I meant to say the clang eco system of tools in Mavericks not clang the tool specifically. I am using clang++.

> - Why do you need gcc-mp for clang build?
I asked that question because I had to configure that (set an env variable) in addition to gcc with the previous instructions.

> - To get mpicc you need MPI libraries, so you can a) use 'export WM_MPLIB=OPENMPI' in etc/bashrc and OpenMPI from ThirdParty folder will be built, b) install OpenMPI yourself and use 'export WM_MPLIB=SYSTEMOPENMPI' to use installed version.

I already installed openmpi and have set the WM_MPLIB variable to SYSTEMOPENMPI. I see that the build is picking it up.

> - When you install OpenMPI using Macports the name of compiler wrapper is openmpicc. IIRC in patches by Bernhard Gschaider he uses that name.

I did not know (guess) mpicc is openmpicc. After making a symbolic link to it in the bin directory in OpenFoam it picks it up. So went past that.

> About your last error: is it clean build? Or maybe you are trying to mix gcc and clang builds and it messes up include paths.

I suspect this too. Can you send me the options to clang++ when you compile UPstream.C file in your environment? I can compare with the ones I am seeing and then fix the build myself.

Here is what I am seeing --

SOURCE=UPstream.C ; clang++ -m64 -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-overloaded-virtual -Wno-unused-comparison -O3 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -I/HOME/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/HOME/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64ClangDPOpt/UPstream.o

Now can you send me the command you see being run in your successful build?

Thanks a lot for your help.
vdr2 is offline   Reply With Quote

Old   January 14, 2014, 16:20
Default
  #7
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hello,

I've tried to reproduce your error so I've decided to go from the very beginning - from creation of disk image. And I was able to reproduce your compilation error

Code:
In file included from /Users/alexey/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude/string.H:51:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/string:430:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:90:
In file included from /Users/alexey/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude/wchar.h:42:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cwchar:118:9: error: no member
      named 'mbstate_t' in the global namespace
using ::mbstate_t;
      ~~^
only when I've created (by accident) disk image with case insensitive file system. Are you sure your disk image has case sensitive file system?

And answering your question, here is the line from build log file for compilation of UPStream.C:

Code:
SOURCE=UPstream.C ;  clang++ -m64 -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -W
no-overloaded-virtual -Wno-unused-comparison -O3  -DNoRepository -ftemplate-depth-100  -IlnInclude -I. -I/Users/alexey/OpenFOAM/Open
FOAM-2.2.2/src/OpenFOAM/lnInclude -I/Users/alexey/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude   -fPIC -Ddarwin -c $SOURCE
 -o Make/darwinIntel64ClangDPOpt/UPstream.o
alexeym is offline   Reply With Quote

Old   January 16, 2014, 10:05
Default
  #8
New Member
 
vdr
Join Date: Jan 2014
Posts: 7
Rep Power: 12
vdr2 is on a distinguished road
That was it. The image I created was not case sensitive.

Sadly, I learned that I cannot follow simple instructions in English! Thanks for your help. It compiles without any issues. One thing (I think you mentioned it in your instructions) if you use homebrew you don't even need to change the etc/bashrc file.
vdr2 is offline   Reply With Quote

Old   January 16, 2014, 11:28
Default
  #9
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Quote:
Originally Posted by vdr2 View Post
One thing (I think you mentioned it in your instructions) if you use homebrew you don't even need to change the etc/bashrc file.
Actually, if you won't modify etc/bashrc after applying patches, you will be using OpenMPI from ThirdParty folder (and in this case, I guess, you don't need even Homebrew). If you, for example, would like to use Homebrew installed OpenMPI you need to change "export WM_MPLIB=OPENMPI" to "export WM_MPLIB=SYSTEMOPENMPI".
alexeym is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM solvers not able to run in parallel raagh77 OpenFOAM Installation 5 November 27, 2013 17:05
OpenFOAM 1.7 installation on Redhat linux maxims OpenFOAM Installation 2 November 30, 2012 04:29
Openfoam 2.1 installation in ubuntu 12.04 jsm OpenFOAM Installation 11 May 7, 2012 04:56
Source Pack Installation OpenFOAM Version 2.1.0 on Redhat Linux Indrajit OpenFOAM Installation 1 April 1, 2012 04:39
OpenFOAM-1.6 install cookbook MadsR OpenFOAM Installation 372 November 20, 2010 11:57


All times are GMT -4. The time now is 09:42.