|
[Sponsors] |
June 15, 2012, 12:51 |
Contrib/swak4Foam
|
#1 |
Senior Member
Julien
Join Date: Jun 2012
Location: France
Posts: 152
Rep Power: 14 |
Hi,
sorry for that very low skilled question, but I don't succeed on myself... How to install and work with the library swak4Foam ? Hot link: http://openfoamwiki.net/index.php/Contrib/swak4Foam I just don't what to do. I tried on my own but nothing really good... Can anybody "give me his hand" with a step-by-step help ? |
|
June 15, 2012, 15:39 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
June 18, 2012, 05:09 |
|
#3 |
Senior Member
Julien
Join Date: Jun 2012
Location: France
Posts: 152
Rep Power: 14 |
After executing
svn checkout https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Breeder_2.0/libraries/swak4Foam/ , I typed ./Allwmake The first lines were: Code:
No 'swakConfiguration'. Python etc won't work Checking swak4Foam-version and generating file Bison is version 2.4.1 OpenFOAM-version: Major 2 Minor 0 Patch 1 The last lines were: Code:
/opt/openfoam201/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::writeStats(Foam::Ostream&) const' /opt/openfoam201/platforms/linux64GccDPOpt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::clearOut()' collect2: ld returned 1 exit status make[1]: *** [/home/meteodyn/OpenFOAM/meteodyn-2.0.1/platforms/linux64GccDPOpt/bin/replayTransientBC] Error 1 make[1]: Leaving directory `/opt/openfoam201/Telechargements/swak4Foam/swak4Foam/Utilities/replayTransientBC' make: *** [replayTransientBC] Error 2 make: Target `application' not remade because of errors. |
|
June 18, 2012, 06:32 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Yours is a fairly recent Linux, right? There has been a change in the linker where dynamic links are not implicitly linked anymore and my suspicion is that this is the case here. Try the following: in Utilities/replayTransientBC/Make/options change the line -lmeshTools to -lmeshTools -ltriSurface and see if anything changes |
||
June 18, 2012, 06:45 |
not better
|
#5 |
Senior Member
Julien
Join Date: Jun 2012
Location: France
Posts: 152
Rep Power: 14 |
Nothing better:
Code:
No 'swakConfiguration'. Python etc won't work Checking swak4Foam-version and generating file Bison is version 2.4.1 OpenFOAM-version: Major 2 Minor 0 Patch 1 No change to swak4FoamParsers/foamVersion4swak.H '/home/meteodyn/OpenFOAM/meteodyn-2.0.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so' is up to date. '/home/meteodyn/OpenFOAM/meteodyn-2.0.1/platforms/linux64GccDPOpt/lib/libgroovyBC.so' is up to date. SOURCE=swakCodedFunctionObject.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I../swak4FoamParsers/lnInclude -I/opt/openfoam201/src/finiteVolume/lnInclude -I/opt/openfoam201/src/meshTools/lnInclude -I/opt/openfoam201/src/sampling/lnInclude -I/opt/openfoam201/src/triSurface/lnInclude -I/opt/openfoam201/src//postProcessing/functionObjects/utilities/lnInclude -I/opt/openfoam201/src/lagrangian/basic/lnInclude -IlnInclude -I. -I/opt/openfoam201/src/OpenFOAM/lnInclude -I/opt/openfoam201/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/swakCodedFunctionObject.o Code:
/opt/openfoam201/platforms/linux64GccDPOpt/lib/libfiniteVolume.so: undefined reference to `Foam::reduce(double&, Foam::sumOp<double> const&)' /opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so: undefined reference to `Foam::UPstream::addValidParOptions(Foam::HashTable<Foam::string, Foam::word, Foam::string::hash>&)' /opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so: undefined reference to `Foam::UPstream::exit(int)' /opt/openfoam201/platforms/linux64GccDPOpt/lib/libfiniteVolume.so: undefined reference to `Foam::UOPstream::write(Foam::UPstream::commsTypes, int, char const*, long, int)' collect2: ld returned 1 exit status make[1]: *** [/home/meteodyn/OpenFOAM/meteodyn-2.0.1/platforms/linux64GccDPOpt/bin/replayTransientBC] Error 1 make[1]: Leaving directory `/opt/openfoam201/Telechargements/swak4Foam/swak4Foam/Utilities/replayTransientBC' make: *** [replayTransientBC] Error 2 make: Target `application' not remade because of errors. Code:
--> FOAM FATAL IO ERROR: Unknown patchField type groovyBC for patch type patch Valid patchField types are : ... |
|
June 18, 2012, 07:14 |
|
#6 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Anyway: what kind of Linux are you using (my prejudices say "Ubuntu") and could you check which versions are the dynamic linker and the compiler ("ld -V" and "gcc -v" give you that information) For the groovyBC-problem: there must be something about a dynamic-lib not loading further up in the output |
||
June 18, 2012, 08:05 |
|
#7 |
Senior Member
Julien
Join Date: Jun 2012
Location: France
Posts: 152
Rep Power: 14 |
Bernhard , thanks a lot. I don't know what I'd do without your kind help.
About my installation: Linux version: SUSE LINUX Release 11.4 (Celadon) Kernel Linux 2.6.37.1-1.2-desktop GNOME 2.32.1 Code:
ld -V GNU ld (GNU Binutils; openSUSE 11.4) 2.21 Code:
gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.5/lto-wrapper Target: x86_64-suse-linux Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.5 --enable-ssp --disable-libssp --disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.5 --enable-linux-futex --without-system-libunwind --enable-gold --with-plugin-ld=/usr/bin/gold --with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux Thread model: posix gcc version 4.5.1 20101208 [gcc-4_5-branch revision 167585] (SUSE Linux) Beginning: Code:
No 'swakConfiguration'. Python etc won't work Checking swak4Foam-version and generating file Bison is version 2.4.1 OpenFOAM-version: Major 2 Minor 0 Patch 1 No swak4FoamParsers/foamVersion4swak.H. Generated wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file printSwakVersion.C Making dependency list for source file SurfacesRepository.C Making dependency list for source file SetsRepository.C Making dependency list for source file GlobalVariablesRepository.C Making dependency list for source file ExpressionDriverWriter.C Making dependency list for source file ExpressionResult.C Making dependency list for source file StoredExpressionResult.C Making dependency list for source file swakRegistryProxySurface.C Making dependency list for source file swakRegistryProxySet.C Making dependency list for source file FieldValueExpressionParser.yy could not open file FieldValueExpressionParser.tab.hh for source file FieldValueExpressionParser.yy could not open file FixedValuePointPatchField.H for source file FieldValueExpressionParser.yy could not open file ZeroGradientPointPatchField.H for source file FieldValueExpressionParser.yy could not open file CalculatedPointPatchField.H for source file FieldValueExpressionParser.yy Code:
SOURCE=replayTransientBC.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam201/src/cfdTools/lnInclude -I/opt/openfoam201/src/cfdTools/general/lnInclude -I/opt/openfoam201/src/finiteVolume/lnInclude -I/opt/openfoam201/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam201/src/OpenFOAM/lnInclude -I/opt/openfoam201/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/replayTransientBC.o g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam201/src/cfdTools/lnInclude -I/opt/openfoam201/src/cfdTools/general/lnInclude -I/opt/openfoam201/src/finiteVolume/lnInclude -I/opt/openfoam201/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam201/src/OpenFOAM/lnInclude -I/opt/openfoam201/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed Make/linux64GccDPOpt/replayTransientBC.o -L/opt/openfoam201/platforms/linux64GccDPOpt/lib \ -lfiniteVolume -lmeshTools -ltriSurface -lPStream -lOpenFOAM -ldl -lm -o /home/meteodyn/OpenFOAM/meteodyn-2.0.1/platforms/linux64GccDPOpt/bin/replayTransientBC /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: cannot find -lPStream collect2: ld returned 1 exit status make[1]: *** [/home/meteodyn/OpenFOAM/meteodyn-2.0.1/platforms/linux64GccDPOpt/bin/replayTransientBC] Error 1 make[1]: Leaving directory `/opt/openfoam201/Telechargements/swak4Foam/swak4Foam/Utilities/replayTransientBC' make: *** [replayTransientBC] Error 2 make: Target `application' not remade because of errors. |
|
June 18, 2012, 10:32 |
|
#8 | |||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Quote:
Quote:
|
||||
June 18, 2012, 11:13 |
|
#9 |
Senior Member
Julien
Join Date: Jun 2012
Location: France
Posts: 152
Rep Power: 14 |
At the beginning, I can read:
Code:
.../libsimpleFunctionObjects.so' is up to date. .../libsimpleSwakFunctionObjects.so' is up to date. .../libswakTopoSources.so' is up to date. .../libswakSourceFields.so' is up to date. .../libgroovyStandardBCs.so' is up to date. Code:
collect2: ld returned 1 exit status make[1]: *** [/home/meteodyn/OpenFOAM/meteodyn-2.0.1/platforms/linux64GccDPOpt/bin/funkySetFields] Error 1 make[1]: Leaving directory `/opt/openfoam201/Telechargements/swak4Foam/swak4Foam/Utilities/funkySetFields' make: *** [funkySetFields] Error 2 make[1]: Entering directory `/opt/openfoam201/Telechargements/swak4Foam/swak4Foam/Utilities/replayTransientBC' g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam201/src/cfdTools/lnInclude -I/opt/openfoam201/src/cfdTools/general/lnInclude -I/opt/openfoam201/src/finiteVolume/lnInclude -I/opt/openfoam201/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam201/src/OpenFOAM/lnInclude -I/opt/openfoam201/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed Make/linux64GccDPOpt/replayTransientBC.o -L/opt/openfoam201/platforms/linux64GccDPOpt/lib \ -lfiniteVolume -lmeshTools -ltriSurface -lPstream -lOpenFOAM -ldl -lm -o /home/meteodyn/OpenFOAM/meteodyn-2.0.1/platforms/linux64GccDPOpt/bin/replayTransientBC /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: cannot find -lPstream collect2: ld returned 1 exit status make[1]: *** [/home/meteodyn/OpenFOAM/meteodyn-2.0.1/platforms/linux64GccDPOpt/bin/replayTransientBC] Error 1 make[1]: Leaving directory `/opt/openfoam201/Telechargements/swak4Foam/swak4Foam/Utilities/replayTransientBC' make: *** [replayTransientBC] Error 2 make: Target `application' not remade because of errors. Code:
--> FOAM FATAL IO ERROR: Unknown patchField type groovyBC for patch type patch |
|
June 18, 2012, 15:37 |
|
#10 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
ls $FOAM_MPI_LIBBIN whether this is set on your system. If yes: add -L$(FOAM_MPI_LIBBIN) at the start(!) of the line you've already been editing in Make/options This is not my fault. The binary distro you're using (I assume from the path that you didn't compile OF yourself) seems to be broken for compilations I guess you added groovyBC to the libs-list in the controlDict, right? In that case check further up in the solver output: there should be some error about not being able to load it. If not recheck the libs-entry |
||
June 19, 2012, 05:10 |
|
#11 |
Senior Member
Julien
Join Date: Jun 2012
Location: France
Posts: 152
Rep Power: 14 |
Hi Bernhard!
OK. I understood that you think my installation is not as "clean" as possible. So I will try to reinstall everything. Right now, I am updating my system (zipper, yast,...), and then, I will fallow the instructions of http://www.openfoam.org/download/suse.php Does it sounds good for you? Do you think I am in the correct path? Last edited by Djub; June 19, 2012 at 06:54. Reason: mystake |
|
June 19, 2012, 06:53 |
Re-install
|
#12 |
Senior Member
Julien
Join Date: Jun 2012
Location: France
Posts: 152
Rep Power: 14 |
I just installed OpenFOAM-2.1.0 from http://sourceforge.net/projects/foam/files/foam/suse/11.4/x86_64/
('cause my suse version is only 11.4). I fallowed the instruction of official OpenFOAM page http://www.openfoam.org/download/suse.php (rpm-i ... user configuration ... check on icofoam) . Then, I ran svn on swak4Foam . And then ./Allwmake. Still the same problem. I added -lmeshTools -ltriSurface -lPstream but it still dosn't work: Code:
collect2: ld returned 1 exit status make[1]: *** [/home/meteodyn/OpenFOAM/meteodyn-2.1.0/platforms/linux64GccDPOpt/bin/funkySetFields] Error 1 make[1]: Leaving directory `/opt/OpenFOAM-2.1.0/Telechargements/swak4Foam/Utilities/funkySetFields' make: *** [funkySetFields] Error 2 make[1]: Entering directory `/opt/OpenFOAM-2.1.0/Telechargements/swak4Foam/Utilities/replayTransientBC' SOURCE=replayTransientBC.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/OpenFOAM-2.1.0/src/cfdTools/lnInclude -I/opt/OpenFOAM-2.1.0/src/cfdTools/general/lnInclude -I/opt/OpenFOAM-2.1.0/src/finiteVolume/lnInclude -I/opt/OpenFOAM-2.1.0/src/meshTools/lnInclude -IlnInclude -I. -I/opt/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude -I/opt/OpenFOAM-2.1.0/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/replayTransientBC.o g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/OpenFOAM-2.1.0/src/cfdTools/lnInclude -I/opt/OpenFOAM-2.1.0/src/cfdTools/general/lnInclude -I/opt/OpenFOAM-2.1.0/src/finiteVolume/lnInclude -I/opt/OpenFOAM-2.1.0/src/meshTools/lnInclude -IlnInclude -I. -I/opt/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude -I/opt/OpenFOAM-2.1.0/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/replayTransientBC.o -L/opt/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib \ -lfiniteVolume -lmeshTools -ltriSurface -lPstream -lOpenFOAM -ldl -lm -o /home/meteodyn/OpenFOAM/meteodyn-2.1.0/platforms/linux64GccDPOpt/bin/replayTransientBC /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: cannot find -lPstream collect2: ld returned 1 exit status make[1]: *** [/home/meteodyn/OpenFOAM/meteodyn-2.1.0/platforms/linux64GccDPOpt/bin/replayTransientBC] Error 1 make[1]: Leaving directory `/opt/OpenFOAM-2.1.0/Telechargements/swak4Foam/Utilities/replayTransientBC' make: *** [replayTransientBC] Error 2 make: Target `application' not remade because of errors. |
|
June 19, 2012, 16:01 |
|
#13 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
June 19, 2012, 18:38 |
|
#14 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
@Julien: I've just now finished testing on openSUSE 11.4 x86_64 with the RPM packages of OpenFOAM 2.1.0 and had no problems at all! My guess is that the problem you're having is due to placing swak4Foam's code in the folder "/opt/OpenFOAM-2.1.0/Telechargements/swak4Foam" . After the OpenFOAM environment was ready to be used, I did: Code:
mkdir -p $FOAM_RUN run svn checkout https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Breeder_2.0/libraries/swak4Foam/ cd swak4Foam export WM_NCOMPPROCS=4 ./Allwmake ./Allwmake Best regards, Bruno
__________________
|
|
June 20, 2012, 04:59 |
|
#15 |
Senior Member
Julien
Join Date: Jun 2012
Location: France
Posts: 152
Rep Power: 14 |
(Thanks everybody! I really appreciate your kind help !)
OK, I apologize. I wanted to make it nice, so I made a special folder for the downloads, in order not to "mix" everything, but know I know I was totally wrong... Nevertheless, I did not understand from which cwd I should launch svn ? |
|
June 20, 2012, 06:11 |
|
#16 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
June 20, 2012, 06:33 |
|
#17 |
Senior Member
Julien
Join Date: Jun 2012
Location: France
Posts: 152
Rep Power: 14 |
Know, swak4foam is in /home/me/OpenFOAM/me-2.1.0/run
So, I made cd swak4Foam/ ./Alwmake There is still the errors. |
|
June 20, 2012, 11:38 |
It works now !
|
#18 |
Senior Member
Julien
Join Date: Jun 2012
Location: France
Posts: 152
Rep Power: 14 |
Bernhard, Bruno , thanks a lot . I think I found.
Compiling problems: I had to change several /Make/option files:
/opt/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/dummy/libPstrem.so to /opt/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/ (??? Why was it in a "dummy" folder ???) Now it's working! 'hope my post could help somebody else... Bernhard: updateded my controlDict . I works now. Once again, thanks a lot ! PS: do you think I should post a nethreaded, clean, in order to share my solution without all the rough exchanges with no interest? |
|
June 20, 2012, 13:48 |
|
#19 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Got to catch this quickly before Bruno does. He's only 19 posts behind me and at the rate he's posting my estimate is that he'll overtake me before the weekend
Quote:
Not sure whether your stuff will no work in parallel Quote:
|
|||
June 20, 2012, 17:16 |
|
#20 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Bernhard and Julien,
@Bernhard: Quote:
(And I got my powers upgraded a week and a half ago nothing like whirling an axe at a spammer ) @Julien: OK, having to hack around in OpenFOAM's installation folder, usually can only mean one thing: you've got a contaminated shell environment. Let me explain: your "$HOME/.bashrc" probably has something like this: Code:
source /opt/OpenFOAM-2.0.1/etc/bashrc source /opt/OpenFOAM-2.1.0/etc/bashrc Code:
alias of201='source /opt/OpenFOAM-2.0.1/etc/bashrc' alias of210='source /opt/OpenFOAM-2.1.0/etc/bashrc' Now, whenever you start a new terminal window/tab, you should run only one of the aliases above:
The other possibility is that you might have skipped some important step... for example, might not have installed Open-MPI - what does this command output: Code:
mpirun --version Bruno
__________________
|
||
Tags |
swak4foam |
|
|