View Issue Details

IDProjectCategoryView StatusLast Update
0003415OpenFOAMBugpublic2020-01-07 10:30
Reporterdeo Assigned Towill  
PrioritynormalSeverityminorReproducibilityrandom
Status closedResolutionno change required 
PlatformGNU/LinuxOSRHELOS Version8
Summary0003415: Memory problems with OpenFOAM-7 on RHEL8
DescriptionWe recently moved to RHEL8 on our cluster. I installed OpenFOAM-7. I am experiencing memory problems. Runs are crashing due to:

"new cannot satisfy memory request.
This does not necessarily mean you have run out of virtual memory.
It could be due to a stack violation caused by e.g. bad use of pointers or an out of date shared library"

See error.txt.

I ran some tests with valgrind. A memory leak is detected quite quickly. I don't know if this is related, because the run continues anyway. See "Steps To Reproduce".

It seems that this memory leak is caused when the square is taken of the patch().nf() vectorField.

Steps To Reproduce1) Take the $FOAM_TUTORIALS/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumn case

2) Edit the Allrun file and comment the "runApplication $(getApplication)" line

3) ./Allrun

4) Do "valgrind reactingTwoPhaseEulerFoam". This givers no errors.

5) Now edit system/blockMeshDict and change line 33 to "hex (0 1 2 3 4 5 6 7) (24 74 1) simpleGrading (1 1 1)", i.e., a 24x74 mesh instead of 25x75.

6) rm -r 0/alpha.air; rm log.*; ./Allrun

5) Now doing "valgrind reactingTwoPhaseEulerFoam" again gives errors as provided in valgrind.txt
Additional Information#gcc --version
gcc (GCC) 8.3.1 20190507 (Red Hat 8.3.1-4)
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

#uname -r
4.18.0-147.0.3.el8_1.x86_64
TagsNo tags attached.

Activities

deo

2019-12-19 17:44

reporter  

error.txt (3,867 bytes)   
GAMG:  Solving for p_rgh, Initial residual = 2.317479128e-05, Final residual = 1.629717219e-08, No Iterations 10
GAMG:  Solving for p_rgh, Initial residual = 3.366242766e-06, Final residual = 7.458398625e-09, No Iterations 9
new cannot satisfy memory request.
This does not necessarily mean you have run out of virtual memory.
It could be due to a stack violation caused by e.g. bad use of pointers or an out of date shared library
[vinci106:72892] *** Process received signal ***
[vinci106:72892] Signal: Aborted (6)
[vinci106:72892] Signal code:  (-6)
[vinci106:72892] [ 0] /lib64/libc.so.6(+0x37960)[0x7f4381f7b960]
[vinci106:72892] [ 1] /lib64/libc.so.6(gsignal+0x10f)[0x7f4381f7b8df]
[vinci106:72892] [ 2] /lib64/libc.so.6(abort+0x127)[0x7f4381f65cf5]
new cannot satisfy memory request.
This does not necessarily mean you have run out of virtual memory.
It could be due to a stack violation caused by e.g. bad use of pointers or an out of date shared library
[vinci106:72903] *** Process received signal ***
[vinci106:72903] Signal: Aborted (6)
[vinci106:72903] Signal code:  (-6)
[vinci106:72892] [ 3] /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZN4Foam8newErrorEv+0x54)[0x7f43831697a4]
[vinci106:72892] [ 4] /lib64/libstdc++.so.6(_Znwm+0x34)[0x7f4382937cf4]
[vinci106:72892] [ 5] /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/reactingMultiphaseEulerFoam(_ZN4Foam14GeometricFieldINS_6TensorIdEENS_12fvPatchFieldENS_7volMeshEEC1ERKNS_8IOobjectERKNS_6fvMeshERKNS_11dimensionedIS2_EERKNS_4wordE+0x33d)[0x4a1aad]
[vinci106:72892] [ 6] /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/reactingMultiphaseEulerFoam(_ZN4Foam3fvc10surfaceSumINS_6TensorIdEEEENS_3tmpINS_14GeometricFieldIT_NS_12fvPatchFieldENS_7volMeshEEEEERKNS5_IS6_NS_13fvsPatchFieldENS_11surfaceMeshEEE+0x162)[0x4a1ce2]
[vinci106:72892] [ 7] /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/reactingMultiphaseEulerFoam[0x4a367a]
[vinci106:72892] [ 8] /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/reactingMultiphaseEulerFoam[0x43d5d6]
[vinci106:72892] [ 9] /lib64/libc.so.6(__libc_start_main+0xf3)[0x7f4381f67873]
[vinci106:72892] [10] /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/reactingMultiphaseEulerFoam[0x43ffce]
[vinci106:72892] *** End of error message ***
[vinci106:72903] [ 0] /lib64/libc.so.6(+0x37960)[0x7f31f6919960]
[vinci106:72903] [ 1] /lib64/libc.so.6(gsignal+0x10f)[0x7f31f69198df]
[vinci106:72903] [ 2] /lib64/libc.so.6(abort+0x127)[0x7f31f6903cf5]
[vinci106:72903] [ 3] /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZN4Foam8newErrorEv+0x54)[0x7f31f7b077a4]
[vinci106:72903] [ 4] /lib64/libstdc++.so.6(_Znwm+0x34)[0x7f31f72d5cf4]
[vinci106:72903] [ 5] /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/reactingMultiphaseEulerFoam(_ZN4Foam14GeometricFieldINS_6TensorIdEENS_12fvPatchFieldENS_7volMeshEEC1ERKNS_8IOobjectERKNS_6fvMeshERKNS_11dimensionedIS2_EERKNS_4wordE+0x33d)[0x4a1aad]
[vinci106:72903] [ 6] /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/reactingMultiphaseEulerFoam(_ZN4Foam3fvc10surfaceSumINS_6TensorIdEEEENS_3tmpINS_14GeometricFieldIT_NS_12fvPatchFieldENS_7volMeshEEEEERKNS5_IS6_NS_13fvsPatchFieldENS_11surfaceMeshEEE+0x162)[0x4a1ce2]
[vinci106:72903] [ 7] /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/reactingMultiphaseEulerFoam[0x4a367a]
[vinci106:72903] [ 8] /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/reactingMultiphaseEulerFoam[0x43d5d6]
[vinci106:72903] [ 9] /lib64/libc.so.6(__libc_start_main+0xf3)[0x7f31f6905873]
[vinci106:72903] [10] /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/reactingMultiphaseEulerFoam[0x43ffce]
[vinci106:72903] *** End of error message ***
error.txt (3,867 bytes)   
valgrind.txt (11,875 bytes)   
==76523== Memcheck, a memory error detector
==76523== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==76523== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==76523== Command: reactingTwoPhaseEulerFoam
==76523==
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  7
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 7
Exec   : reactingTwoPhaseEulerFoam
Date   : Dec 19 2019
Time   : 18:34:05
Host   : "..."
PID    : 76523
I/O    : uncollated
Case   : ...
nProcs : 1
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


PIMPLE: No convergence criteria found


PIMPLE: No corrector convergence criteria found
        Calculations will do 3 corrections


PIMPLE: Operating solver in transient mode with 3 outer correctors



Reading g

Reading hRef
Creating phaseSystem

Selecting twoPhaseSystem basicTwoPhaseSystem
Selecting phaseModel for air: purePhaseModel
Selecting diameterModel for phase air: isothermal
Selecting thermodynamics package
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}

Calculating face flux field phi.air
Selecting turbulence model type laminar
Selecting laminar stress model Stokes
Selecting phaseModel for water: purePhaseModel
Selecting diameterModel for phase water: constant
Selecting thermodynamics package
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       const;
    thermo          eConst;
    equationOfState perfectFluid;
    specie          specie;
    energy          sensibleInternalEnergy;
}

Calculating face flux field phi.water
Selecting turbulence model type laminar
Selecting laminar stress model Stokes
No MRF models present

Selecting default blending method: linear
Selecting drag blending method: linear
Selecting surfaceTensionModel for (air and water): constant
Selecting aspectRatioModel for (air in water): constant
Selecting aspectRatioModel for (water in air): constant
Selecting dragModel for (air and water): segregated
Selecting swarmCorrection for (air and water): none
Selecting dragModel for (air in water): SchillerNaumann
Selecting swarmCorrection for (air in water): none
Selecting dragModel for (water in air): SchillerNaumann
Selecting swarmCorrection for (water in air): none
Selecting virtualMassModel for (air in water): constantCoefficient
Selecting virtualMassModel for (water in air): constantCoefficient
Selecting heatTransferModel for (air in water): RanzMarshall
Selecting heatTransferModel for (water in air): RanzMarshall
Calculating field g.h

Reading field p_rgh

Courant Number mean: 0.011125 max: 0.037

Starting time loop

fieldAverage fieldAverage1:
    Starting averaging at time 0

Courant Number mean: 0.011125 max: 0.037
Max Ur Courant Number = 0.037
Time = 0.005

PIMPLE: Iteration 1
MULES: Solving for alpha.air
MULES: Solving for alpha.air
alpha.air volume fraction = 0.297297  Min(alpha1) = 0  Max(alpha1) = 1
Constructing momentum equations
==76523== Invalid read of size 16
==76523==    at 0x9AF75F4: Foam::sqr(Foam::Field<Foam::SymmTensor<double> >&, Foam::UList<Foam::Vector<double> > const&) (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so)
==76523==    by 0x9AF796C: Foam::sqr(Foam::tmp<Foam::Field<Foam::Vector<double> > > const&) (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so)
==76523==    by 0x6F2FDB9: Foam::pressureInletOutletVelocityFvPatchVectorField::updateCoeffs() (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so)
==76523==    by 0x4645C9: Foam::fvMatrix<Foam::Vector<double> >::fvMatrix(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/reactingTwoPhaseEulerFoam)
==76523==    by 0x43A965: main (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/reactingTwoPhaseEulerFoam)
==76523==  Address 0x146fab48 is 568 bytes inside a block of size 576 alloc'd
==76523==    at 0x4C31C63: operator new[](unsigned long) (vg_replace_malloc.c:433)
==76523==    by 0x6C8EDF4: Foam::tmp<Foam::Field<Foam::Vector<double> > > Foam::operator/<Foam::Vector<double> >(Foam::UList<Foam::Vector<double> > const&, Foam::UList<double> const&) (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so)
==76523==    by 0x6C8E44C: Foam::fvPatch::nf() const (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so)
==76523==    by 0x6F2FDAE: Foam::pressureInletOutletVelocityFvPatchVectorField::updateCoeffs() (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so)
==76523==    by 0x4645C9: Foam::fvMatrix<Foam::Vector<double> >::fvMatrix(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/reactingTwoPhaseEulerFoam)
==76523==    by 0x43A965: main (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/reactingTwoPhaseEulerFoam)
==76523==
smoothSolver:  Solving for e.air, Initial residual = 1, Final residual = 6.61277e-09, No Iterations 2
smoothSolver:  Solving for e.water, Initial residual = 1, Final residual = 9.84031e-11, No Iterations 4
GAMG:  Solving for p_rgh, Initial residual = 0.00018724, Final residual = 2.39268e-09, No Iterations 10
==76523== Invalid read of size 16
==76523==    at 0x9AF75F4: Foam::sqr(Foam::Field<Foam::SymmTensor<double> >&, Foam::UList<Foam::Vector<double> > const&) (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so)
==76523==    by 0x9AF796C: Foam::sqr(Foam::tmp<Foam::Field<Foam::Vector<double> > > const&) (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so)
==76523==    by 0x6F2FDB9: Foam::pressureInletOutletVelocityFvPatchVectorField::updateCoeffs() (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so)
==76523==    by 0x6D34D01: Foam::directionMixedFvPatchField<Foam::Vector<double> >::evaluate(Foam::UPstream::commsTypes) (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so)
==76523==    by 0x45653A: Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::Boundary::evaluate() (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/reactingTwoPhaseEulerFoam)
==76523==    by 0x43E231: main (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/reactingTwoPhaseEulerFoam)
==76523==  Address 0x14016598 is 568 bytes inside a block of size 576 alloc'd
==76523==    at 0x4C31C63: operator new[](unsigned long) (vg_replace_malloc.c:433)
==76523==    by 0x6C8EDF4: Foam::tmp<Foam::Field<Foam::Vector<double> > > Foam::operator/<Foam::Vector<double> >(Foam::UList<Foam::Vector<double> > const&, Foam::UList<double> const&) (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so)
==76523==    by 0x6C8E44C: Foam::fvPatch::nf() const (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so)
==76523==    by 0x6F2FDAE: Foam::pressureInletOutletVelocityFvPatchVectorField::updateCoeffs() (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so)
==76523==    by 0x6D34D01: Foam::directionMixedFvPatchField<Foam::Vector<double> >::evaluate(Foam::UPstream::commsTypes) (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so)
==76523==    by 0x45653A: Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::Boundary::evaluate() (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/reactingTwoPhaseEulerFoam)
==76523==    by 0x43E231: main (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/reactingTwoPhaseEulerFoam)
==76523==
==76523== Invalid read of size 16
==76523==    at 0x9AF75F4: Foam::sqr(Foam::Field<Foam::SymmTensor<double> >&, Foam::UList<Foam::Vector<double> > const&) (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so)
==76523==    by 0x9AF796C: Foam::sqr(Foam::tmp<Foam::Field<Foam::Vector<double> > > const&) (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so)
==76523==    by 0x6F2FDB9: Foam::pressureInletOutletVelocityFvPatchVectorField::updateCoeffs() (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so)
==76523==    by 0x6D34CFC: Foam::directionMixedFvPatchField<Foam::Vector<double> >::evaluate(Foam::UPstream::commsTypes) (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so)
==76523==    by 0x45653A: Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::Boundary::evaluate() (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/reactingTwoPhaseEulerFoam)
==76523==    by 0x43E231: main (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/reactingTwoPhaseEulerFoam)
==76523==  Address 0x14017a28 is 568 bytes inside a block of size 576 alloc'd
==76523==    at 0x4C31C63: operator new[](unsigned long) (vg_replace_malloc.c:433)
==76523==    by 0x6C8EDF4: Foam::tmp<Foam::Field<Foam::Vector<double> > > Foam::operator/<Foam::Vector<double> >(Foam::UList<Foam::Vector<double> > const&, Foam::UList<double> const&) (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so)
==76523==    by 0x6C8E44C: Foam::fvPatch::nf() const (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so)
==76523==    by 0x6F2FDAE: Foam::pressureInletOutletVelocityFvPatchVectorField::updateCoeffs() (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so)
==76523==    by 0x6D34CFC: Foam::directionMixedFvPatchField<Foam::Vector<double> >::evaluate(Foam::UPstream::commsTypes) (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so)
==76523==    by 0x45653A: Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::Boundary::evaluate() (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/reactingTwoPhaseEulerFoam)
==76523==    by 0x43E231: main (in /software/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/reactingTwoPhaseEulerFoam)
==76523==
PIMPLE: Iteration 2
MULES: Solving for alpha.air
MULES: Solving for alpha.air
alpha.air volume fraction = 0.297302  Min(alpha1) = 0  Max(alpha1) = 1
Constructing momentum equations
smoothSolver:  Solving for e.air, Initial residual = 0.0294606, Final residual = 3.72835e-09, No Iterations 3
smoothSolver:  Solving for e.water, Initial residual = 5.07225e-05, Final residual = 1.8718e-10, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 3.97072e-05, Final residual = 5.83036e-09, No Iterations 7
PIMPLE: Iteration 3
MULES: Solving for alpha.air
MULES: Solving for alpha.air

...
valgrind.txt (11,875 bytes)   

deo

2019-12-19 17:51

reporter   ~0010993

I used the ThirdParty makeGcc script to compile gcc-7.5.0 with gmp-5.1.2, mpfr-3.1.2 and mpc-1.0.1. When recompiling OpenFOAM using this gcc version, the valgrind errors are gone on the bubbleColumn case.

deo

2019-12-19 17:58

reporter   ~0010994

Also, with OpenFOAM compiled with debug flags, valgrind doesn't detect any memory errors.

henry

2019-12-19 18:48

manager   ~0010995

Try gcc-9.1.1 which is what we have on OpenSuSE Tumbleweed. We have not seen this problem with any gcc version we have tested.

deo

2019-12-19 22:41

reporter   ~0010996

I can't find gcc-9.1.1 so I tried 9.1.0. Same valgrind errors.

wyldckat

2019-12-24 11:42

updater   ~0011003

@deo: It's very likely that there is an optimization flag being turned on by default in GCC, to optimize the binaries for the CPUs in your cluster. This would explain why using a Debug build would not give you any problems.

You could try to change the flag '-O3' to '-O2' or '-O1' in the file "wmake/rules/linux64Gcc/c++Opt", in an attempt to tell GCC to not use such an aggressive optimization heuristic, but it's not 100% guaranty that it will solve the issue.

If you can tell us which CPU model(s) you are using your cluster, it might be easier for us and other people in the community to reproduce this issue and try to isolate which optimization flag has broken the build. Or at the very least, search online for clues on issues with GCC + that CPU model.

deo

2019-12-24 16:31

reporter   ~0011004

Alright, some additional research pointed out the following:

1) The valgrind errors and the "new cannot satisfy memory request" are unrelated. We found out that the latter is caused by the kernel parameter 'vm.overcommit_memory=2'. Setting it back to 0 (its default value) stops the "new cannot satisfy memory request" error from occurring. The overcommit_memory=2 causes the total virtual memory space to be limited. What's strange is that this limit was set sufficiently high. Anyway, this issue now reduces to the valgrind errors with 'new' Gcc versions only, and should no longer be marked as causing crashes (can this be changed?)

2) We're using machines with 2 x AMD EPYC 7551 CPUs, each with 32 cores.

3) I can confirm that compiling with '-O2' instead of '-O3' indeed prevents the valgrind errors from occurring. I would expect though (didn't test) that this gives a performance decrease, no?

wyldckat

2019-12-24 22:05

updater   ~0011005

So the first detail is that the AMD EPYC are somewhat recent CPUs and there are some optimizations that could go the wrong way if not properly tested with all possible situations.

As for '-O2' vs '-O3', the differences are listed here for GCC 8.3: https://gcc.gnu.org/onlinedocs/gcc-8.3.0/gcc/Optimize-Options.html

So one of those extra optimization flags listed there for '-O3' are acting up with those CPU models. As for the validity for them to improve performance, usually it's always left to the people compiling things to assess what works for them... for example, here is a webpage dedicated to listing advisable compilation flags for AMD EPYC: http://www.prace-ri.eu/best-practice-guide-amd-epyc


As for the over-commit option, seems to be a tricky parameter to configure: https://serverfault.com/questions/606185/how-does-vm-overcommit-memory-work
According to the description there, some software might ask for more RAM than available to check how much RAM it can use... but I'm not aware of OpenFOAM doing such a thing... so it is possible that it's one of the GCC optimization flags that are requesting extra RAM just in case it needs to increase the array sizes... given how much it costs in processing time to create a new array.

will

2020-01-07 10:30

manager   ~0011041

Non-critial errors (like invalid read) frequently happen when running valgrind with an optimised compilation. The compiler might choose, for whatever reason, to extend blocks of memory, which can cause some handling of invalid and/or uninitialised data. I don't know if this aspect of valgrind's reporting is considered correct or not, but it's not something to be concerned about. The important thing is that the solver runs without error when the compilation is not optimised (i.e., -O0), which it does.

Also, I've reproduced the messages on a machine with (very old) Intel Xeon X5550 processors, so it's nothing to do with optimisations on AMD EPYC.

The only advice I would have regarding the overcommit memory issue is that if you have recently changed operating system, then make sure you also re-build OpenFOAM in order to avoid any incompatibilities between an old OpenFOAM build and the new system libraries.

Closing. All issues appear to be resolved.

Issue History

Date Modified Username Field Change
2019-12-19 17:44 deo New Issue
2019-12-19 17:44 deo File Added: error.txt
2019-12-19 17:44 deo File Added: valgrind.txt
2019-12-19 17:51 deo Note Added: 0010993
2019-12-19 17:58 deo Note Added: 0010994
2019-12-19 18:48 henry Note Added: 0010995
2019-12-19 22:41 deo Note Added: 0010996
2019-12-24 11:42 wyldckat Note Added: 0011003
2019-12-24 16:31 deo Note Added: 0011004
2019-12-24 22:05 wyldckat Note Added: 0011005
2020-01-07 10:29 will Severity crash => minor
2020-01-07 10:30 will Assigned To => will
2020-01-07 10:30 will Status new => closed
2020-01-07 10:30 will Resolution open => no change required
2020-01-07 10:30 will Note Added: 0011041