CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Compiling OpenFOAM14_patch on Solaris 10 (https://www.cfd-online.com/Forums/openfoam-installation/57515-compiling-openfoam14_patch-solaris-10-a.html)

jfb July 4, 2007 10:58

Hi All I try to port OpenFO
 
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 :-)

martin July 4, 2007 13:45

Hi Josef, Could you please
 
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

jfb July 4, 2007 18:17

Hi Martin You find the bina
 
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!

mattijs July 5, 2007 16:21

Do not compile Smagorinsky2.C.
 
Do not compile Smagorinsky2.C.

In Make/options replace the C++ style '//' comment with /* ... */

mattijs July 5, 2007 16:22

Oops. Should be Make/files. On
 
Oops. Should be Make/files. On line 21:

//Smagorinsky2/Smagorinsky2.C

jfb July 9, 2007 15:15

Thanks Mattijs; "//" does not
 
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

mattijs July 10, 2007 14:31

This is gcc4.2? Does it work i
 
This is gcc4.2? Does it work if you explicitly declare 'operator>' in the FoamX namespace?

http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif FoamXAny.H

jfb July 19, 2007 11:58

Hi Mattijs Your "FoamXAny.H
 
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 July 26, 2007 07:05

The following steps describe t
 
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/

chiven April 16, 2010 09:58

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


All times are GMT -4. The time now is 01:43.