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

Compiling OpenFOAM14_patch on Solaris 10

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 4, 2007, 09:58
Default Hi All I try to port OpenFO
  #1
jfb
New Member
 
Josef F. Buergler
Join Date: Mar 2009
Posts: 16
Rep Power: 8
jfb is on a distinguished road
Hi All

I try to port OpenFOAM-1.4_patch (checked out via svn from sourceforge) onto a Solaris-10 System.
Currently I'm using gcc-4.2.0 and binutils-2.17 (both installed in $HOME/OpenFOAM/solaris/).

I had some issues with the wmake script, which relys actually on bash, which is different from the Solaris-Shell
(/bin/sh), which unfortunately does not know about the "-e" option (file exists).
So I would suggest to use "#!/bin/bash" instead of "#!/bin/sh" as the first line in "wmake".
Also, "wmake" relys on gnu-find, which knows about the option "-maxdepth"!

There is another issues with flex++: In the files
- ./src/thermophysicalModels/combustion/Make/options
- ./src/thermophysicalModels/combustion/Make/solarisGcc4DPOpt/options
I had to add "-I/opt/csw/flex-2.5.33/include" to EXE_INC in order to advice the compiler to find "FlexLexer.h".

Currently I'm stuck with the following problem:

/home/zabuergl/OpenFOAM/OpenFOAM-1.4/wmake/wmakeLnInclude: linking include files to /CFDData/OpenFOAM/OpenFOAM-1.4/src/LESmodels/incompressible/lnInclude

Making dependency list for source file Smagorinsky2/Smagorinsky2.C
cmd=make --no-print-directory -j 4 -f /home/zabuergl/OpenFOAM/OpenFOAM-1.4/wmake/Makefile MAKE_DIR=Make INCLUDE_DEPS=Make/solarisGcc4DPOpt/includeDeps libso
SOURCE=Smagorinsky2/Smagorinsky2.C ; g++ -Dsolaris -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -O3 -fno-schedule-insns -DNoRepository -ftemplate-depth-30 -I/home/zabuergl/OpenFOAM/OpenFOAM-1.4/src/finiteVolume/lnInclude -I/home/zabuergl/OpenFOAM/OpenFOAM-1.4/src/meshTools/lnInclude -I/home/zabuergl/OpenFOAM/OpenFOAM-1.4/src/LESmodels/LESdeltas/lnInclude -I/home/zabuergl/OpenFOAM/OpenFOAM-1.4/src/LESmodels/LESfilters/lnInclude -I/home/zabuergl/OpenFOAM/OpenFOAM-1.4/src/transportModels -IlnInclude -I. -I/home/zabuergl/OpenFOAM/OpenFOAM-1.4/src/OpenFOAM/lnInclude -fPIC -c $SOURCE -o Make/solarisGcc4DPOpt/Smagorinsky2.o
Smagorinsky2/Smagorinsky2.C: In member function 'virtual Foam::tmp<foam::fvmatrix<foam::vector<double> > > Foam::LESmodels::Smagorinsky2::divB(Foam::volVecto rField&) const':
Smagorinsky2/Smagorinsky2.C:86: error: no matching function for call to 'laplacian(Foam::volSymmTensorField&, Foam::GeometricField<foam::vector<double>, Foam::fvPatchField, Foam::volMesh>&)'
make: *** [Make/solarisGcc4DPOpt/Smagorinsky2.o] Error 1

I would greatly appreciate any help on this problem!

Thanks a lot in advance :-)
jfb is offline   Reply With Quote

Old   July 4, 2007, 12:45
Default Hi Josef, Could you please
  #2
New Member
 
Martin Karlsson
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 13
Rep Power: 8
martin is on a distinguished road
Hi Josef,

Could you please provide me the gcc-4.2.0 binary for Solaris 10 of yours. I have a few problems to build it my self (I am not root on the Solaris system and root is on vaccation). If I got gcc to work on my Solaris, I will try to port OpenFOAM-1.4_patch as well.

Thanks in advance,
Martin
martin is offline   Reply With Quote

Old   July 4, 2007, 17:17
Default Hi Martin You find the bina
  #3
jfb
New Member
 
Josef F. Buergler
Join Date: Mar 2009
Posts: 16
Rep Power: 8
jfb is on a distinguished road
Hi Martin

You find the binary version of gcc-4.2.0.tar.gz for Solaris 10 under the following URL

http://iserver.hta.fhz.ch/~jfb/hta/gcc-4.2.0.tar.gz

The correspondings checksums are:
SHA(/tmp/gcc-4.2.0.tar.gz)= 8ed5a1c89e295200863dd1b651a195f53fb1ad1e
RIPEMD160(/tmp/gcc-4.2.0.tar.gz)= 509d2559c41338ddaf8aafb732c0ae302b863e07
SHA1(/tmp/gcc-4.2.0.tar.gz)= f734476d55b4ec74655984fb05df18cbb21c55aa
MD5(/tmp/gcc-4.2.0.tar.gz)= 553ab99f0816d9e0a339026228a0077d

Hope it works for You!
jfb is offline   Reply With Quote

Old   July 5, 2007, 15:21
Default Do not compile Smagorinsky2.C.
  #4
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
Do not compile Smagorinsky2.C.

In Make/options replace the C++ style '//' comment with /* ... */
mattijs is offline   Reply With Quote

Old   July 5, 2007, 15:22
Default Oops. Should be Make/files. On
  #5
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
Oops. Should be Make/files. On line 21:

//Smagorinsky2/Smagorinsky2.C
mattijs is offline   Reply With Quote

Old   July 9, 2007, 14:15
Default Thanks Mattijs; "//" does not
  #6
jfb
New Member
 
Josef F. Buergler
Join Date: Mar 2009
Posts: 16
Rep Power: 8
jfb is on a distinguished road
Thanks Mattijs; "//" does not work under Solaris 10!

Unfortunately there are still errors, for example the following:

-fPIC -c $SOURCE -o Make/solarisGcc4DPOpt/decompositionMethod.o
FoamXAny.C:564: error: 'void FoamX::operator>(const FoamXServer::FoamXAny&, const FoamXServer::FoamXAny&)'
should have been declared inside 'FoamX'
FoamXAny.C:692: error: 'void FoamX::operator<(const FoamXServer::FoamXAny&, const FoamXServer::FoamXAny&)'
should have been declared inside 'FoamX'
gmake[2]: *** [Make/solarisGcc4DPOpt/FoamXAny.o] Error 1
jfb is offline   Reply With Quote

Old   July 10, 2007, 13:31
Default This is gcc4.2? Does it work i
  #7
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
This is gcc4.2? Does it work if you explicitly declare 'operator>' in the FoamX namespace?

FoamXAny.H
mattijs is offline   Reply With Quote

Old   July 19, 2007, 10:58
Default Hi Mattijs Your "FoamXAny.H
  #8
jfb
New Member
 
Josef F. Buergler
Join Date: Mar 2009
Posts: 16
Rep Power: 8
jfb is on a distinguished road
Hi Mattijs

Your "FoamXAny.H" helped to cure the problem. Currently OpenFAOM-1.4 (patched) compiles and works
without parallelization support. Currently I run all the tutorials to find differences with Linux. After that, I try to get the parallelization-stuff working!

If You are interested, I can send a Patchfile to the current release (checked out today via svn).
jfb is offline   Reply With Quote

Old   July 26, 2007, 06:05
Default The following steps describe t
  #9
jfb
New Member
 
Josef F. Buergler
Join Date: Mar 2009
Posts: 16
Rep Power: 8
jfb is on a distinguished road
The following steps describe the process to port OpenFOAM_1.4 to Solaris10:
================================================== =========================

1. Install software from blastwave
----------------------------------
Basically I had first to make sure, that I have the same environment
on Solaris as on Linux. Therefore I installed some software, i.e. "flex_new",
"bison", "gmake" and "findutils" from http://www.blastwave.org by first
executing the appended shell script ("add_pkg_get.sh") and then typing
some commands (as explained in the shell script and the blastwave site).

2. Install software from scratch
--------------------------------
After that I compiled/installed from source
- gcc-4.2.0
- binutils-2.17
- j2sdk1.4.2_14 (Version 14 instead of 5 seems to work)
- java3d-1_3_1

3. Problems with the SHELL
--------------------------
Then I had to replace hardcoded paths to /bin/sh in most of the shell
scripts (Allwmake, etc.), because /bin/sh on Linux is most probably
/bin/bash, whereas on Solaris it is the SUN-Shell, which for example
does not know about "let ..." instead one has to use p=`expr $p + 1`).

4. Problems with GNU/Solaris-commands options
---------------------------------------------
Also grep and find (as well as tar and make) on Solaris use different Options
as the corresponding gnu-Versions! I would suggest, that one should
use something similar to gnu-autoconfigure, etc. in order to find the
correct versions of each of the used commands.

5. Problems with flex-Files
---------------------------
I also had to change some occurences of "]]" to "] ]" in some (f)lex-Files.

6. Patch-File
-------------
Attached You will find a patch-file, produced with the following commands
$ cd ~
$ diff -crB OpenFOAM-1.4_patch OpenFOAM_1.4_solaris10 > Solaris10.patch
You should be able to apply it with
$ cd OpenFOAM-1.4_patch
$ patch [--dry-run] -p1 -i Solaris10.patch

7. Adapting compilations rules for Solaris10
--------------------------------------------
For Solaris10, the wmake-rules files are copied with
$ foam
$ cp -r wmake/rules/solaris{Gcc4,}

8. Not everything working yet
-----------------------------
I should also mention, that not all tutorial-cases completed successfully
(see attached "testLoopReport_Solaris10_20070725"). Some might not
have completed successfully because of broken parallelization software.

9. Future work
--------------
Currently I'm trying to get the parallization software (lam-7.1.3) to run
under Solaris10. Unfortunately, MPI/GAMMA will not run on Solaris10,
because the "someone" would have to rewrite the network-drivers from
anew! What other software package (besides lam-7.1.3) could You suggest
me to use?

I hope this information will be useful to people trying to compile and
install OpenFOAM_1.4 on Solaris 10.

Attached files can be found at http://iserver.hta.fhz.ch/~jfb/Solaris10/
jfb is offline   Reply With Quote

Old   April 16, 2010, 08:58
Default
  #10
Senior Member
 
J. Cai
Join Date: Apr 2009
Posts: 180
Rep Power: 8
chiven is on a distinguished road
Hi, Josef, thank you for sharing the precious experience on the installation of OF in Solaris.

Now, I am installing OF-1.6 in Solaris 10 following your suggestions.

The system have installed "flex, bison, and gmake" in /usr/sfw/bin/ directory. Thus I install findutils, gcc, binutils, and java3d in the WM_THIRD_PARTY_DIR directory. Since j2sdk1.4.2_14 is NOT found from internet, I try to replace it with java_ee_sdk-6-unix.sh, but fail, and the following problem is meeting.

HTML Code:
Could not locate a suitable Java runtime.
Please ensure that you have Java 6 or newer installed on your system
and accessible in your PATH or by setting JAVA_HOME
What a pity, I can NOT link to your web page of http://iserver.hta.fhz.ch/~jfb/Solaris10/.

My questions are,
1) Though the softwares are installed and the paths are added to LD_LIBRARY_PATH and PATH, the original shells are still used. For example, when "which find", "/usr/bin/find" still occurs. How to set?

2) When I run the foamSystemCheck script I get the error :
./foamSystemCheck: syntax error at line 56: `NOCHAR=$' unexpected
Maybe many scripts are not able to run on Solaris 10? If yes, how to improve it?

3) Any comments on the java_ee_sdk-6-unix.sh installation?

4) Did you install OF-1.6 in Solaris 10? If yes, would you like to share the experiences to us?

Thank you in advance.
Best regards,
Chiven
chiven is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM Solaris mamaly60 OpenFOAM Installation 13 May 10, 2010 21:16
CFX 4.4 on Solaris 9 Prash CFX 0 February 21, 2005 11:41
64-bit Solaris Steve CD-adapco 4 April 30, 2004 04:18
64-bit Solaris Steve FLUENT 0 April 28, 2004 04:18
CFX & CAD2mesh on Solaris 64-bit Danie CFX 1 January 22, 2004 17:48


All times are GMT -4. The time now is 23:48.