CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (https://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   Cumulative patch for OpenFOAM 14 (https://www.cfd-online.com/Forums/openfoam-bugs/62572-cumulative-patch-openfoam-14-a.html)

alberto June 12, 2007 07:50

I thought to collect the corre
 
I thought to collect the correction to the bugs found up to now in OpenFOAM 1.4, to facilitate their correction.

Here there are a short description of the problem solved by this cumulative patch and the instruction on how to use it.

Date : June 11th, 2007
Applies to : OpenFOAM 1.4

Description : This package is a cumulative patch to solve the issue found till
now in OpenFOAM 1.4. The resolved bugs are listed below:

- Serious bug in backwardDdtScheme
http://www.cfd-online.com/OpenFOAM_D...tml?1180777044
- Minor bug in CrankNicholsonDdtScheme
http://www.cfd-online.com/OpenFOAM_D...tml?1179849129
- Problem of compilation. OF 1.4:Allwmake: command not found
http://www.cfd-online.com/OpenFOAM_D...tml?1178802602
- Recursive "wmake all" doesn't find "Allwmake"
http://www.cfd-online.com/OpenFOAM_D...tml?1176898510
- Failed dimensional check with dynamic LES models
http://www.cfd-online.com/OpenFOAM_D...tml?1181588437

Installation instruction
------------------------

1. Extract the tgz archive with the command:

tar xzf OpenFOAM-1.4-patches-11_june_2007

2. Copy the directory "OpenFOAM-1.4" over your OpenFOAM-1.4 directory and accept
to overwrite the files when the system will ask you to do so.

For example, if you installed OpenFOAM in /home/you_user_name/OpenFOAM/, just
copy the OpenFOAM-1.4 provided with this cumulative patch in that directory.

3. Recompile OpenFOAM using the following commands:

foam
cd src
./Allwmake
cd ../applications
./Allwmake

http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif OpenFOAM-1.4-patches-11_june_2007.tgz

I hope this helps,
Alberto

benru June 13, 2007 07:40

I try to recompile (as prescri
 
I try to recompile (as prescribed higher) and see:

OpenFOAM/OpenFOAM-1.4/src$ ./Allwmake
+ cd OpenFOAM/OpenFOAM-1.4/src/OpenFOAM
+ wmakeLnInclude .
+ wmake libso zlib-1.2.1
`OpenFOAM/OpenFOAM-1.4/lib/linuxGcc4DPOpt/libz.so' is up to date.
+ wmake libso foamUser
`OpenFOAM/OpenFOAM-1.4/lib/linuxGcc4DPOpt/libfoamUser.so' is up to date.
+ '[' LAM = OPENMPI -a '!' -r /lib/libmpi.a -a '!' -r /lib/libmpi.so ']'
+ '[' LAM = LAM -a '!' -r /OpenFOAM/OpenFOAM-1.4/src/lam-7.1.2/platforms/linuxGcc4DPOpt/lib/libmpi.a -a '!' -r /OpenFOAM/OpenFOAM-1.4/src/
lam-7.1.2/platforms/linuxGcc4DPOpt/lib/libmpi.so ']'
+ '[' LAM = MPICH -a '!' -r /lib/libmpich.a -a '!' -r /lib/libmpich.so ']'
+ cd Pstream
+ ./Allwmake
+ wmake libso dummy
`/OpenFOAM/OpenFOAM-1.4/lib/linuxGcc4DPOpt/dummy/libPstream.so' is up
to date.
+ '[' LAM = LAM -o LAM = OPENMPI -o LAM = MPI -o LAM = MPICH -o LAM = MPICH-GM ']'
+ export WM_OPTIONS=linuxGcc4DPOptLAM
+ WM_OPTIONS=linuxGcc4DPOptLAM
+ wmake libso mpi
`/OpenFOAM/OpenFOAM-1.4/lib/linuxGcc4DPOpt/lam-7.1.2/libPstream.so' i
s up to date.
+ wmake libso OpenFOAM
SOURCE=global/global.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno
-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -DWM_PROJECT
_VERSION='"'1.4'"' -I/OpenFOAM/OpenFOAM-1.4/src/zlib-1.2.1 -IlnInclud
e -I. -I/OpenFOAM/OpenFOAM-1.4/src/OpenFOAM/lnInclude -fPIC -pthrea
d -c $SOURCE -o Make/linuxGcc4DPOpt/global.o
In file included from global/global.C:61:
lnInclude/error.C:46:22: error: demangle.h: No such file or directory
lnInclude/error.C: In static member function 'static void Foam::error::printStack(Foam:
http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&)':
lnInclude/error.C:398: error: 'auto_demangling' was not declared in this scope
lnInclude/error.C:399: error: 'cplus_demangle' was not declared in this scope
make: *** [Make/linuxGcc4DPOpt/global.o] Error 1

Is the file demangle.h absent, and where it should be ? NEED HELP !

gschaider June 13, 2007 08:07

Hi Ruben! The missing of th
 
Hi Ruben!

The missing of the demangle.h on non-OpenSUSE has been discussed before (use the search engine to find a solution). As an alternative (a demangle-less error.C) try the one published at http://openfoamwiki.net/index.php/Ho...e_OpenFOAM_Mac (it should work for Linux, too). Maybe I already posted it to the board. Can't remember.

alberto June 13, 2007 09:54

While recompiling applications
 
While recompiling applications, you also get an error when building PVFoamReader.

Just skip it and manually recompile the remaining directories (preProcessing, surface, thermoPhysical) by entering into them and using wmake all.

Regards,
A.

benru June 13, 2007 10:22

2 Bernhard & Alberto - many bi
 
2 Bernhard & Alberto - many big thanks !

May be OpenFOAM/OpenFOAM-1.4/src/OpenFOAM/db/error/error.C & your advices add to patch & README file in one - because without them make new code is not possible ?

Best regards Ruben

alberto June 13, 2007 10:45

It is a distribution-specific
 
It is a distribution-specific issue, so it's better to do two packages, I think.

Where can I get the working error.C file for non-SuSE distributions?

Regards,
A.

gschaider June 13, 2007 11:21

Hi Alberto! On the Wiki-pag
 
Hi Alberto!

On the Wiki-page mentioned above. That error.C works with MacOSX and Linux (tested on Redhat)

(But you can always install binutils-debug to make the stock error.C work with your distribution)

Bernhard

alberto June 13, 2007 14:20

Thanks Bernhard! OK. Consid
 
Thanks Bernhard!

OK. Considering there's a solution for the specific distribution, I would prefer to leave this out of the patch package.

Moreover I find Novell SLE/openSUSE a lot more user friendly than Red Hat/Fedora, and I think it should be the platform of choice for OpenFOAM users :-)

With kind regards,
Alberto

benru June 14, 2007 01:15

As I tried, changed error.C ne
 
As I tried, changed error.C needs for RedHat/Fedora, Debian, Ubuntu distributions, and only openSUSE has no problem. It seems to me, that it shoud be added (with corresponded commentaries) to patch.

Regards
Ruben

benru June 14, 2007 02:18

After successful compilation o
 
After successful compilation of /src directory I tried to recompile /applications directory and was stopped with :

r117-1http://www.cfd-online.com/OpenFOAM_D...part/proud.gifpenFOAM/OpenFOAM-1.4/applications$./Allwmake
+ cd solvers
+ wmake all
make[1]: Entering directory `OpenFOAM/OpenFOAM-1.4/applications/solvers/compressible'
make[2]: Entering directory `OpenFOAM/OpenFOAM-1.4/applications/solvers/compressible/rhoSimpleFoam'
g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IOpenFOAM/OpenFOAM-1.4/src/finiteVolume/cfdTools -IOpenFOAM/OpenFOAM-1.4/src/finiteVolume/lnInclude -IOpenFOAM/OpenFOAM-1.4/src/thermophysicalModels/basic/lnInclude -IOpenFOAM/OpenFOAM-1.4/src/turbulenceModels -IlnInclude -I. -IOpenFOAM/OpenFOAM-1.4/src/OpenFOAM/lnInclude -fPIC -pthread Make/linuxGcc4DPOpt/rhoSimpleFoam.o -LOpenFOAM/OpenFOAM-1.4/lib/linuxGcc4DPOpt \
-lfiniteVolume -lmeshTools -lbasicThermophysicalModels -lspecie -lcompressibleTurbulenceModels -lOpenFOAM -liberty -ldl -lm -o OpenFOAM/OpenFOAM-1.4/applications/bin/linuxGcc4DPOpt/rhoSimpleFoam
/usr/bin/ld: cannot find -liberty
collect2: ld returned 1 exit status
make[2]: *** [OpenFOAM/OpenFOAM-1.4/applications/bin/linuxGcc4DPOpt/rhoSimpleFoam] Error 1
make[2]: Leaving directory `OpenFOAM/OpenFOAM-1.4/applications/solvers/compressible/rhoSimpleFoam'
make[1]: *** [rhoSimpleFoam] Error 2
make[1]: Leaving directory `OpenFOAM/OpenFOAM-1.4/applications/solvers/compressible'
make: *** [compressible] Error 2
+ cd utilities
+ wmake all
make[1]: Entering directory `OpenFOAM/OpenFOAM-1.4/applications/utilities/mesh'
make[2]: Entering directory `OpenFOAM/OpenFOAM-1.4/applications/utilities/mesh/manipulation'
make[3]: Entering directory `OpenFOAM/OpenFOAM-1.4/applications/utilities/mesh/manipulation/moveDynamicMesh'
g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IOpenFOAM/OpenFOAM-1.4/src/dynamicFvMesh/lnInclude -IOpenFOAM/OpenFOAM-1.4/src/meshTools/lnInclude -IOpenFOAM/OpenFOAM-1.4/src/finiteVolume/lnInclude -IlnInclude -I. -IOpenFOAM/OpenFOAM-1.4/src/OpenFOAM/lnInclude -fPIC -pthread Make/linuxGcc4DPOpt/moveDynamicMesh.o -LOpenFOAM/OpenFOAM-1.4/lib/linuxGcc4DPOpt \
-ldynamicFvMesh -lmeshTools -ldynamicMesh -lOpenFOAM -liberty -ldl -lm -o OpenFOAM/OpenFOAM-1.4/applications/bin/linuxGcc4DPOpt/moveDynamicMesh
/usr/bin/ld: cannot find -liberty
collect2: ld returned 1 exit status
make[3]: *** [OpenFOAM/OpenFOAM-1.4/applications/bin/linuxGcc4DPOpt/moveDynamicMesh] Error 1
make[3]: Leaving directory `OpenFOAM/OpenFOAM-1.4/applications/utilities/mesh/manipulation/moveDynamicMesh'
make[2]: *** [moveDynamicMesh] Error 2
make[2]: Leaving directory `OpenFOAM/OpenFOAM-1.4/applications/utilities/mesh/manipulation'
make[1]: *** [manipulation] Error 2
make[1]: Leaving directory `OpenFOAM/OpenFOAM-1.4/applications/utilities/mesh'
make: *** [mesh] Error 2

What's the cause ? Please, Need help !

alberto June 14, 2007 03:21

The problem is: /usr/bin/ld
 
The problem is:

/usr/bin/ld: cannot find -liberty

The solution is here:

http://www.cfd-online.com/OpenFOAM_D...es/1/3063.html

Regards,
A.

benru June 14, 2007 03:38

Thank you, will try right now
 
Thank you, will try right now

Regards
Ruben

benru June 14, 2007 05:58

To test purity of using new er
 
To test purity of using new error.C (from patch for MAC) file I have tried to recompile all files in /src. Before it, I start script /wmake/wcleanAll from OpenFOAM-1.4 to leave previous compiled obj files & libs. The end of this process is :

+ cd malloc
+ ./Allwmake
+ wmake libo fbsdmalloc
OpenFOAM/OpenFOAM-1.4/wmake/wmakeLnInclude: linking include files to /OpenFOAM/OpenFOAM-1.4/src/malloc/fbsdmalloc/lnInclude

Making dependency list for source file fbsdmalloc.c
could not open file libc_private.h for source file fbsdmalloc.c
could not open file spinlock.h for source file fbsdmalloc.c
SOURCE=fbsdmalloc.c ; gcc -m32 -Dlinux -DDP -Wall -O3 -IlnInclude -I. -IOpenFOAM/OpenFOAM-1.4/src/OpenFOAM/lnInclude -fPIC -c $SOURCE -o Make/linuxGcc4DPOpt/fbsdmalloc.o
ld -melf_i386 -r -o OpenFOAM/OpenFOAM-1.4/lib/linuxGcc4DPOpt/libfbsdmalloc.o Make/linuxGcc4DPOpt/fbsdmalloc.o
`OpenFOAM/OpenFOAM-1.4/lib/linuxGcc4DPOpt/libfbsdmalloc.o' is up to date.
+ '[' '!' -r OpenFOAM/OpenFOAM-1.4/src/mico-2.3.12/platforms/linuxGcc4DPOpt/lib/libmico2.3.12 .a ']'
+ wmake libso foamUtil
OpenFOAM/OpenFOAM-1.4/wmake/wmakeLnInclude: linking include files to OpenFOAM/OpenFOAM-1.4/src/foamUtil/lnInclude

Making dependency list for source file libfoamUtil.C
SOURCE=libfoamUtil.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -IOpenFOAM/OpenFOAM-1.4/src/OpenFOAM/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxGcc4DPOpt/libfoamUtil.o
`OpenFOAM/OpenFOAM-1.4/lib/linuxGcc4DPOpt/libfoamUtil.so' is up to date.

Is recompilation completed successfully, or absence of libc_private.h & spinlock.h critically influence to fbsdmalloc operation ? Where should these headers be and what packet they are correspond to ? Need Help !

alberto June 14, 2007 06:15

It gives no errors so... Ho
 
It gives no errors so...

However, spinlock.h is in /usr/src/linux-2.6.xx/<platform> but also in /usr/include/linux.

I don't have libc_private.h on my openSUSE 10.2 64 bit.

Regards,
A.

benru June 14, 2007 07:40

The same situation - libc_priv
 
The same situation - libc_private.h is absent, spinlock.h in /usr/include/linux, but for why and wheather they need to fbsdmalloc ? Problem with libiberty.a i solved with copy one in OpenFoam-1.4/lib/linuxGcc4DPOpt (minimum action).

After recompiling /application i'll try to perform calcs.

Thank for help,
Regards
Ruben

gschaider June 14, 2007 07:46

@liberty: In my experience tha
 
@liberty: In my experience that is not needed when using the Mac-error.C (the name Mac is a bit misleading (you can remove it from the wmake/rules): it supports Linux as the "main" architecture). Which is good because for me liberty introduced some nasty glibc-downwards-incompatibilities (but that was a very special problem between my workstation and our cluster: stuff compiled on one of them wouldn't run on the other)

@spinlock.h: I guess that's OK. The only problem seems to be that wmkdep tries to find headers that are never used during compiling because they're guarded by #ifdef

benru June 14, 2007 08:17

What extension should libfbsdm
 
What extension should libfbsdmalloc have : (.o) or (.so) ? Now, without spinlock.h & libc_private, it have .o extension. So, if spinlock.h & libc_private.h would be commented with // - libfbsdmalloc will have .so extension ?

Ruben

benru June 14, 2007 09:23

Suggestion : in file /home/rmu
 
Suggestion : in file /home/rmukhamadeev/OpenFOAM/OpenFOAM-1.4/src/malloc/fbsdmalloc/fbsdmalloc.c performs changes :
/* # include "libc_private.h" */
# include <linux/spinlock.h>

in spite of now:
# include "libc_private.h"
# include "spinlock.h"

Ruben

connclark June 14, 2007 12:34

One more bug to correct is som
 
One more bug to correct is some versions of flex++ don't like "]]" in several .L files. Putting a space between the brackets (ie. changing them to "] ]") will fix it.

http://www.cfd-online.com/OpenFOAM_D...tml?1181838496

benru June 15, 2007 03:12

2 Conn - Thank you for solutio
 
2 Conn - Thank you for solution, it works !
Regards
Ruben

benru June 15, 2007 07:01

To recompile PVFoamReader I do
 
To recompile PVFoamReader I downloaded & install cmake (I see it in Allwmake in correspond directory), but make process was stopped with :

+ cd PVFoamReader
+ mkdir -p Make/linuxGcc4DPOpt
+ cd Make/linuxGcc4DPOpt
+ cmake ../..
-- Check for working C compiler: OpenFOAM/linux/gcc-4.1.2/bin/gcc
-- Check for working C compiler: OpenFOAM/linux/gcc-4.1.2/bin/gcc -- broken
CMake Error: The C compiler "OpenFOAM/linux/gcc-4.1.2/bin/gcc" is not able to compile a simple test program.
It fails with the following output:
OpenFOAM/OpenFOAM-1.4/wmake/gmake: cannot make, Make directory does not exist

CMake will not be able to correctly generate this project.
-- Configuring done
+ make
make: *** Do not find sources and makefile.
stop.

Could you advise me what to do to build PVFoamReader ?

alberto June 15, 2007 10:16

I have already given a workaro
 
I have already given a workaround in the 4th comment to this tread.

Just skip it and use the binary version provided with OF 1.4.

Then manually recompile the remaining directories (preProcessing, surface, thermoPhysical) by entering into them and using wmake all.

Regards,
A.

ed_teller June 15, 2007 11:14

Is this cumulative patch alrea
 
Is this cumulative patch already installed in the OpenCFD release of OF 1.4? is it Just for the initial release, or does it still apply for the most recently downloaded versions...?

alberto June 15, 2007 11:38

To my knowledge, it's not incl
 
To my knowledge, it's not included in the download version.

I just put the corrected files provided by Henry together to group them in a simple package.

Regards,
A.

nishio June 18, 2007 02:29

I use OF 1.4. Command Engin
 
I use OF 1.4.

Command EngineCompRatio have bugs?

I got this error message.but i did't got error in
OF 1.3.
What files have bugs?

Please teach me.

nishio@linux:~/OpenFOAM/nishio-1.4/run/tutorials/dieselEngineFoam> engineCompRat
io . cyclic_test
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.4 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : engineCompRatio . cyclic_test
Date : Nov 13 2007
Time : 15:15:45
Host : linux
PID : 13610
Root : /home/nishio/OpenFOAM/nishio-1.4/run/tutorials/dieselEngineFoam
Case : cyclic_test
Nprocs : 1
Create engine time

Create mesh

Selecting engineMesh layered
deckHeight: 0.16539
piston position: 0.01339
CA = 0
deltaZ = 0.095
clearance: 0.057
Piston speed = 3.8 m/s
CA = 0
deltaZ = 0
#0 Foam::error::printStack
#1 Foam::sigFpe::sigFpeHandler
#2 Uninterpreted: [0xb7f5f420]
#3 Foam::fvMesh::movePoints
#4 Foam::layeredEngineMesh::move
#5 main
#6 __libc_start_main
#7 __gxx_personality_v0 at /usr/src/packages/BUILD/glibc-2.3/csu/../sysdeps/i38 6/elf/start.S:122
Floating point exception

benru June 18, 2007 04:59

2 Alberto In accordance wit
 
2 Alberto

In accordance with your advice I recompiled /src and applications/(preProcessing, thermophysical & surface), all is ok, many big thanks.

regards
Ruben


All times are GMT -4. The time now is 09:21.