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

Error compiling OpenFOAM 1.7.x

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 5, 2012, 18:51
Default Error compiling OpenFOAM 1.7.x
  #1
uli
New Member
 
Join Date: Jun 2012
Posts: 25
Rep Power: 14
uli is on a distinguished road
hi everybody

I followed the instructions on http://albertopassalacqua.com/?p=920

but compiling finally gives me

Code:
/home/uli/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/libscotch.so: undefined reference to `pthread_create'
/home/uli/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/libscotch.so: undefined reference to `pthread_detach'
collect2: ld returned 1 exit status
make[2]: *** [/home/uli/OpenFOAM/OpenFOAM-1.7.x/applications/bin/linux64GccDPOpt/IFCLookUpTableGen] Error 1
make[2]: Leaving directory `/home/uli/OpenFOAM/OpenFOAM-1.7.x/applications/utilities/thermophysical/IFCLookUpTableGen'
make[1]: *** [IFCLookUpTableGen] Error 2
make[2]: Entering directory `/home/uli/OpenFOAM/OpenFOAM-1.7.x/applications/utilities/thermophysical/mixtureAdiabaticFlameT'
Making dependency list for source file mixtureAdiabaticFlameT.C
make[2]: Leaving directory `/home/uli/OpenFOAM/OpenFOAM-1.7.x/applications/utilities/thermophysical/mixtureAdiabaticFlameT'
make[2]: Entering directory `/home/uli/OpenFOAM/OpenFOAM-1.7.x/applications/utilities/thermophysical/mixtureAdiabaticFlameT'
SOURCE=mixtureAdiabaticFlameT.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -I/home/uli/OpenFOAM/OpenFOAM-1.7.x/src/thermophysicalModels/specie/lnInclude -IlnInclude -I. -I/home/uli/OpenFOAM/OpenFOAM-1.7.x/src/OpenFOAM/lnInclude -I/home/uli/OpenFOAM/OpenFOAM-1.7.x/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/mixtureAdiabaticFlameT.o
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -I/home/uli/OpenFOAM/OpenFOAM-1.7.x/src/thermophysicalModels/specie/lnInclude -IlnInclude -I. -I/home/uli/OpenFOAM/OpenFOAM-1.7.x/src/OpenFOAM/lnInclude -I/home/uli/OpenFOAM/OpenFOAM-1.7.x/src/OSspecific/POSIX/lnInclude   -fPIC -Xlinker --add-needed Make/linux64GccDPOpt/mixtureAdiabaticFlameT.o -L/home/uli/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt \
     -lspecie -lOpenFOAM -ldl   -lm -o /home/uli/OpenFOAM/OpenFOAM-1.7.x/applications/bin/linux64GccDPOpt/mixtureAdiabaticFlameT
make[2]: Leaving directory `/home/uli/OpenFOAM/OpenFOAM-1.7.x/applications/utilities/thermophysical/mixtureAdiabaticFlameT'
make[1]: Target `application' not remade because of errors.
make[1]: Leaving directory `/home/uli/OpenFOAM/OpenFOAM-1.7.x/applications/utilities/thermophysical'
make: *** [thermophysical] Error 2
make: Target `application' not remade because of errors.
(hope all the Errors are in there)

One point in the installation recipe says
"Download both the OpenFOAM and ThirdParty packages from here and save them in your ~/OpenFOAM directory"
but I only found the file "ThirdParty-1.7.1.gtgz" (no OpenFOAM?) under that link - maybe the reason for my problem?

I use opensuse 12.1
any support is appreciated

thanks in advance
Uli
uli is offline   Reply With Quote

Old   June 6, 2012, 07:15
Default
  #2
Member
 
Michael Wild
Join Date: Mar 2009
Location: Bern, Switzerland
Posts: 79
Rep Power: 17
mwild is on a distinguished road
And why do you want to use the ancient 1.7.x? There are binary packages of the current 2.1.1 version available for OpenSUSE 12.1: http://openfoam.org/download/suse.php
mwild is offline   Reply With Quote

Old   June 6, 2012, 08:21
Default
  #3
uli
New Member
 
Join Date: Jun 2012
Posts: 25
Rep Power: 14
uli is on a distinguished road
Thanks for your reply.
I need to use OF 1.7.x because thats the version used at my university.
uli is offline   Reply With Quote

Old   June 6, 2012, 18:35
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

@uli: OK, there's a big problem here: OpenFOAM 1.7.x isn't 100% compatible with Gcc 4.6.2 that openSUSE 12.1 has by default. Or at least, AFAIK it wasn't very well tested with the Gcc 4.6 series, so results may be very suspicious.
Side note: http://openfoamwiki.net/index.php/In...ibility_Matrix for more info on relations between versions of OpenFOAM and Gcc.

The latest known compatible series is Gcc 4.5, which isn't very easy to properly get on openSUSE 12.1, unless you get the quick unstable 1-click install for 12.1 from here: http://software.opensuse.org/package/gcc45 - Otherwise, you'll have to build it yourself... which instructions you might find on my signature link.

What would save you a lot of trouble would be to go back to openSUSE 11.4, but I'm assuming that it's not an option. Therefore, here are the steps I've taken to get things built with openSUSE 12.1 Gcc 4.6.2, although I haven't checked for mathematical cohesion:
  1. In root mode:
    Code:
    zypper install git-core
    zypper install -t pattern devel_C_C++
    zypper install cmake libqt4-devel gnuplot
  2. In normal user mode:
    1. Get the software source code:
      Code:
      git clone git://github.com/OpenCFD/OpenFOAM-1.7.x.git
      wget "http://downloads.sourceforge.net/foam/ThirdParty-1.7.1.gtgz?use_mirror=mesh" -O ThirdParty-1.7.1.tgz
      tar -xf ThirdParty-1.7.1.tgz
      mv ThirdParty-1.7.1 ThirdParty-1.7.x
    2. Add this line to your "~/.bashrc" or "~/.alias", as well as run it:
      Code:
      alias of17x='source $HOME/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc WM_NCOMPPROCS=4'
      Adjust the value 4 to the number of cores on your machine.
    3. Prepare things:
      Code:
      of17x
      foam3rdParty
    4. Edit the file "Allwmake" in the "ThirdParty-1.7.x" folder as indicated in bold:
      Code:
      case "$WM_MPLIB" in
      OPENMPI)
          if [ -d "$MPI_ARCH_PATH/lib64" -a ! -d "$MPI_ARCH_PATH/lib" ]; then
              ln -s $MPI_ARCH_PATH/lib64 $MPI_ARCH_PATH/lib
          fi
      
          if [ -r $MPI_ARCH_PATH/lib/libmpi.so ]
          then
      A bit below:
      Code:
              make -j $WM_NCOMPPROCS
              make install
              make distclean
    5. Run Allwmake in the ThirdParty folder twice:
      Code:
      ./Allwmake > make.log 2>&1
      ./Allwmake > make.log 2>&1
    6. Finally build OpenFOAM:
      Code:
      foam
      ./Allwmake > make.log 2>&1
In case something goes wrong:
Code:
tar -czf make.log.tar.gz make.log
And attach "make.log.tar.gz" to your next post.


Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   June 7, 2012, 10:40
Default
  #5
uli
New Member
 
Join Date: Jun 2012
Posts: 25
Rep Power: 14
uli is on a distinguished road
thanks a lot wyldckat!

openSUSE 11.4 is quite an option for me and maybe I will install it, but since I'm almost new to Linux I have some more questions first if you don't mind.

  • What exactly do you mean by mathematical cohesion?
  • What do I have to do at the 3rd point ("prepare things"), just type "of17x" and "foam3rdParty" ?
  • Are there any disadvantages in the way you showed?

best
Uli
uli is offline   Reply With Quote

Old   June 7, 2012, 11:42
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Uli,

Quote:
Originally Posted by uli View Post
What exactly do you mean by mathematical cohesion?
Here's an example: several months ago, when OpenFOAM 1.7.0 was released, it was successfully tested and working when built with Gcc 4.3.3 and up to Gcc 4.4.y.
Weeks after OpenFOAM 1.7.0 was released, people started building it with Gcc 4.5.0... and the problem was that it did build with 4.5.0, but then things sometimes didn't work as expected. I vaguely remember about problems when meshing and one solver had problems. You can check the history by reading the following thread: http://www.cfd-online.com/Forums/ope...gcc-4-5-x.html

Therefore, since there is no specific report about OpenFOAM 1.7.x working properly with Gcc 4.6.y, such a study should first be done just to confirm this. I vaguely remember that in OpenFOAM 2.0.x there are a few references to the changes necessary for proper operations with Gcc 4.6.y, but I haven't kept track of them.

Quote:
Originally Posted by uli View Post
What do I have to do at the 3rd point ("prepare things"), just type "of17x" and "foam3rdParty" ?
Yes, the text was an brief introductory note: of17x activates the environment and foam3rdParty jumps directly into the ThirdParty folder. For more on this: Advanced tips for working with the OpenFOAM shell environment

Quote:
Originally Posted by uli View Post
Are there any disadvantages in the way you showed?
Like I've been writing: I don't know if this is mathematically stable/coherent. And using the Gcc 4.5 version provided in the unstable packages at software.opensuse.org is another possible source of concern... since it's specifically marked as "unstable"...

So it all sums up to this: if you are using your personal installation of OpenFOAM 1.7.x just for preparing cases, and then run the cases in the school's computers with verified OpenFOAM installations, then I guess it's OK...
Otherwise, you're risking it a bit, since there is a possibility that you might get results with a particular solver that has issues with Gcc 4.6.y...

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   June 11, 2012, 10:42
Default
  #7
uli
New Member
 
Join Date: Jun 2012
Posts: 25
Rep Power: 14
uli is on a distinguished road
hi wyldckat and all!

I now decided to install suse 11.4. which the OF installation worked out with. Till now I only faced a graphics problem with Paraview that I solved by installing another driver for my nvidia graphics chip.

I think although it took me some time this is the best solution to avoid problems due to different versions.

Thanks a lot for your effort!

best
uli
uli is offline   Reply With Quote

Reply

Tags
1.7.x, compiling, error, openfoam


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
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 07:55
Installing OpenFOAM 1.7.x on CAElinux without Internet Connection joel.lehikoinen OpenFOAM Installation 3 June 14, 2011 12:09
OpenFOAM 1.6.x, 1.7.0 and 1.7.x are not fully prepared to work with gcc-4.5.x wyldckat OpenFOAM Bugs 18 October 21, 2010 06:51
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 07:25
Modified OpenFOAM Forum Structure and New Mailing-List pete Site News & Announcements 0 June 29, 2009 06:56


All times are GMT -4. The time now is 16:46.