CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   compiling swak4foam on an IBM Dataplex running 64-bit RedHat 6.3 (http://www.cfd-online.com/Forums/openfoam-installation/127732-compiling-swak4foam-ibm-dataplex-running-64-bit-redhat-6-3-a.html)

jianni December 18, 2013 15:35

compiling swak4foam on an IBM Dataplex running 64-bit RedHat 6.3
 
I am having trouble trying to compile swak4foam for Openfoam 2.1.1 (please see below). I have Openfoam 2.1.1 running in parallel using openmpi with gcc4.4. Now I need to get swak4foam to compile. Any suggestions?

Code:

60 pershing-login04> ./Allwmake
Reading variables from 'swakConfiguration'
Checking swak4Foam-version and generating file
Swak version is 0.2.4
Bison is version 2.4.1
Flex is version 2.5.35 (Minor version: 35)
OpenFOAM-version: Major 2 Minor 1 Patch 1 (-1 == x)
swak4FoamParsers/foamVersion4swak.H changed
wmakeLnInclude: linking include files to ./lnInclude
make: *** No rule to make target `/usr/cta/unsupported/swak/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/debugName.H', needed by `plugins/SampledSurfaceValuePluginFunction.dep'.  Stop.
Parser library did not compile OK. No sense continuing as everything else depends on it
Requirements for Library not satisfied. I see no sense in going on


wyldckat December 25, 2013 09:08

Greetings jianni and welcome to the forum!

Can you please specify how exactly you've installed OpenFOAM 2.1.1 and on which system (Linux or Mac OS X)?

I ask this because something is not right in the feedback that swak4Foam's Allwmake is giving us, namely this address:
Code:

/usr/cta/unsupported/swak/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude
It's not pointing to any of the standard OpenFOAM installation paths, which seems to imply that something very wrong is going on :(

And when if you run the following commands, right after you run Allwmake, what do they give you?
Code:

icoFoam -help
which icoFoam

Best regards,
Bruno

jianni December 26, 2013 10:18

Dear Bruno,
Thanks for the response! I'm trying to compile this on an IBM Dataplex running 64-bit RedHat 6.3:
"Red Hat Enterprise Linux Server release 6.3 (Santiago)"
For icoFoam:

60 pershing-login04> icoFoam -help
Usage: icoFoam [OPTIONS]
options:
-case <dir> specify alternate case directory, default is the cwd
-noFunctionObjects
do not execute functionObjects
-parallel run in parallel
-roots <(dir1 .. dirN)>
slave root directories for distributed running
-srcDoc display source code in browser
-doc display application documentation in browser
-help print the usage
Using: OpenFOAM-2.1.1 (see www.OpenFOAM.org)
Build: 2.1.1-221db2718bbb

61 pershing-login04> which icoFoam
/usr/cta/unsupported/swak/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/bin/icoFoam

62 pershing-login04> uname -a
Linux pershing-login04 2.6.32-279.33.1.el6.x86_64 #1 SMP Sun Jun 30 03:00:43 EDT
2013 x86_64 x86_64 x86_64 GNU/Linux

Also, I noticed the include file debugName.H is nowhere in the entire directory structure! Could I been using a version of swak for Openfoam 1.x by accident?

-James

wyldckat December 26, 2013 11:43

Greetings James,

The problem seems to be that you have a binaries-only installation of OpenFOAM 2.1.1. And since you need to build swak4Foam from source, you need the source code of OpenFOAM as well.

Check the contents of this folder:
Code:

/usr/cta/unsupported/swak/OpenFOAM-2.1.1/src/
If it's empty or it doesn't even exist, then that is the reason why swak4Foam is not able to build.

Do you know how exactly OpenFOAM 2.1.1 was installed on the IBM Dataplex you are using?

Best regards,
Bruno

jianni December 26, 2013 11:49

I've installed Openfoam (2.x and 1.x) on this (and many other systems) here.

All the source files are there:
74 pershing-login04> find src | wc -l
17120
75 pershing-login04> find src -name "*.H" -print | wc -l
5274
76 pershing-login04> ls -ltrR src | grep -i debug | grep -i name
-James

wyldckat December 26, 2013 14:45

Hi James,

OK, I did some researching and tests:
  1. It's not swak4Foam 1.x, because you should have gotten this message:
    Code:

    lnInclude/swak.H:58:2: error: #error "This swak4Foam-version is only used for the 1.x-versions of OpenFOAM. For higher versions there is a special branch"
  2. The file "debugName.H" came into existence with OpenFOAM 2.2.x.
So, my guess is that you either have a strange shell environment going on, or you didn't run Allwclean after building swak4Foam for OpenFOAM 2.2.2.


Best regards,
Bruno

jianni December 26, 2013 15:34

./Allwclean corrected the issue!
Now I need to find out how to pass PYTHONINCLUDE to swak build (it cannot find Python.h):

142 pershing-login04> ./Allwmake | tee view.txt
Reading variables from 'swakConfiguration'
Checking swak4Foam-version and generating file
Swak version is 0.2.4
Bison is version 2.4.1
Flex is version 2.5.35 (Minor version: 35)
OpenFOAM-version: Major 2 Minor 1 Patch 1 (-1 == x)
No change to swak4FoamParsers/foamVersion4swak.H
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libgroovyBC.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libswakFunctionObjects.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libsimpleFunctionObjects.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libsimpleLagrangianFunctionObjects.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libsimpleSearchableSurfaces.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libsimpleSwakFunctionObjects.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libswakTopoSources.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libswakSourceFields.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libgroovyStandardBCs.so' is up to date.
SOURCE=pythonInterpreterWrapper.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/usr/cta/CSE.20130926/Release/python-2.7.5/include -I../swak4FoamParsers/lnInclude -I../simpleFunctionObjects/lnInclude -IlnInclude -I. -I/usr/cta/unsupported/swak/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/usr/cta/unsupported/swak/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/pythonInterpreterWrapper.o
In file included from pythonInterpreterWrapper.C:37:
pythonInterpreterWrapper.H:52:20: error: Python.h: No such file or directory
In file included from pythonInterpreterWrapper.C:37:
pythonInterpreterWrapper.H:79: error: ISO C++ forbids declaration of ‚PyThreadState‚ with no type
pythonInterpreterWrapper.H:79: error: expected ‚;‚ before ‚*‚ token

jianni December 26, 2013 15:45

Never mind. They changed the Python paths on me. I'm now getting this error:
Code:

178 pershing-login04> ./Allwmake | tee view.txt
Reading variables from 'swakConfiguration'
Checking swak4Foam-version and generating file
Swak version is 0.2.4
Bison is version 2.4.1
Flex is version 2.5.35 (Minor version: 35)
OpenFOAM-version: Major 2 Minor 1 Patch 1 (-1 == x)
No change to swak4FoamParsers/foamVersion4swak.H
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libgroovyBC.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libswakFunctionObjects.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libsimpleFunctionObjects.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libsimpleLagrangianFunctionObjects.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libsimpleSearchableSurfaces.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libsimpleSwakFunctionObjects.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libswakTopoSources.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libswakSourceFields.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libgroovyStandardBCs.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libswakPythonIntegration.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libswakMeshQualityFunctionPlugin.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libswakLocalCalculationsFunctionPlugin.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libswakRandomFunctionPlugin.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libswakFvcSchemesFunctionPlugin.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libswakThermoTurbFunctionPlugin.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libswakTransportTurbFunctionPlugin.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libswakSurfacesAndSetsFunctionPlugin.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libswakLagrangianCloudSourcesFunctionPlugin.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libswakVelocityFunctionPlugin.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libswakChemistryModelFunctionPlugin.so' is up to date.
'/usr/people/ianni/OpenFOAM/ianni-2.1.1/platforms/linux64GccDPOpt/lib/libswakRadiationModelFunctionPlugin.so' is up to date.
Compiling user function-plugin ../Examples/UserPlugins/swakTestFunctionPlugins
wmake error: file 'Make/files' does not exist in /usr/cta/unsupported/swak/OpenFOAM-2.1.1/swak4Foam/Examples/UserPlugins/swakTestFunctionPlugins
Requirements for Library not satisfied. I see no sense in going on


wyldckat December 26, 2013 15:49

Hi James,
  1. Looks like the file "Examples/UserPlugins/swakTestFunctionPlugins/Make/files" is missing. Perhaps you erased it by accident?
  2. Uhm... could you please use the [CODE] markers to post code and output? It's explained on the last link of my signature.
Best regards,
Bruno

jianni December 26, 2013 15:53

The path is there, but there are no files. I cannot imagine accidentally erase such files in such a long path. Maybe they were never there?

Code:


187 pershing-login04> pwd
/mnt/gpfs_cta/unsupported/swak/OpenFOAM-2.1.1/swak4Foam/Examples/UserPlugins/swakTestFunctionPlugins/Make
188 pershing-login04> ls -ltr
total 0


wyldckat December 26, 2013 16:00

Quote:

Originally Posted by jianni (Post 467762)
The path is there, but there are no files. I cannot imagine accidentally erase such files in such a long path. Maybe they were never there?

:confused: Yes, yes there are files in that folder:

jianni December 26, 2013 16:11

I checked the zip file given to me and those files are NOT there. I think the person who gave me the swak zip file may have inadvertently not included them. I really, REALLY wish you guys would create a gzipped tar file to download instead of utilizing SVN as all SVN ports are blocked.
-James

wyldckat December 26, 2013 16:17

Hi James,

Well, you can always report this on the bug tracker ;) -> http://openfoamwiki.net/index.php/Co...oam#Bugreports

But still, if you look at the wiki page, section Downloading: http://openfoamwiki.net/index.php/Co...am#Downloading - you'll see that nowadays there are several ways to download the files.

In addition, from my Github repository, which unofficially provides a git based mirror and tweaks of the official SVN swak4Foam (for OpenFOAM 2.x), you can even download zip files directly: https://github.com/wyldckat/swak4foam/tree/OF22X

Best regards,
Bruno

jianni December 27, 2013 11:45

Bruno,

I noticed that SWAK placed the shared libraries in my home directory. Can I simply copy these to a common area for anyone to link to? I'm assuming there are no hard coded paths inside these shared libraries?
-James

wyldckat December 27, 2013 12:52

Hi James,

AFAIK, the paths should not be hard-coded into the binaries of swak4Foam. If they are, then it's a bug ;)

OpenFOAM has got a path meant for sharing custom solvers et al with more than one person... ah, I've found the post that explains this: http://www.cfd-online.com/Forums/ope...tml#post241758 post #4

Best regards,
Bruno

jianni December 30, 2013 15:41

Bruno,
Your git repository also does NOT have the Examples/UserPlugins/* area, the SVN repository is blocked and I cannot create tar images from SourceForce. Any other suggestions where I can get the full swak version for Openfoam 2.x ?
-James

wyldckat December 30, 2013 16:00

Hi James,
Quote:

Originally Posted by jianni (Post 468139)
Your git repository also does NOT have the Examples/UserPlugins/* area,

:confused: That's very, very strange. Did you download this file: https://github.com/wyldckat/swak4foam/archive/OF22X.zip - or did you use "git clone"?

There are two unofficial mirror repositories of swak4Foam at GitHub, which rely on git-svn to keep track of the history from SVN in Git form:
Both pages have the big ZIP button on the right of the page, but the ZIP links are also provided in the list above. Both of those repositories only have the master branch, so there is no confusion with the branches.

Please let me know if these work or not!

Best regards,
Bruno

jianni December 31, 2013 10:52

Is this correct for linux-64 bit, openfoam 2.x ?
openfoam-extend-Breeder2.0-libraries-swak4Foam-master.zip

wyldckat December 31, 2013 12:26

Quote:

Originally Posted by jianni (Post 468210)
Is this correct for linux-64 bit, openfoam 2.x ?
openfoam-extend-Breeder2.0-libraries-swak4Foam-master.zip

Yes, it's the source code of swak4Foam for OpenFOAM 2.x.
32 or 64 bit is not applicable in this case, since it's the source code and you can compile it for any architecture ;)

jianni December 31, 2013 15:27

That worked! Full compilation and no errors! Thanks!
A quick question : I dont see the binary funkySetFields. Is that supposed to be a stand alone executable or something to be linked with? .


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