Floating Point Exception in Neighbor::check_distance()

Submitted by evansmuts on Fri, 02/15/2013 - 14:23

Hi

I am running coupled simulations with a particle volume fraction of about 20%. After a fairly short time (about 1% of total solution time, which is roughly 3.7 million DEM iterations) my simulations crash with a floating point exception. This happens for a number of different simulation settings, and seems to be linked to the higher volume fractions. The error message in my std_out file points to line 1215 in the neighbor.cpp file (LIGGGHTS v.2.0.4). Here is the first part of the error file:

[7] #0 Foam::error::printStack(Foam::Ostream&) in "/home/evan/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[7] #1 Foam::sigFpe::sigHandler(int) in "/home/evan/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[7] #2 __restore_rt at sigaction.c:0
[7] #3 LAMMPS_NS::Neighbor::check_distance() at ~/LIGGGHTS2/src/Obj_fedora_fpic/neighbor.cpp:1215
[7] #4 LAMMPS_NS::Verlet::run(int) at ~/LIGGGHTS2/src/Obj_fedora_fpic/verlet.cpp:250
[7] #5 LAMMPS_NS::Run::command(int, char**) at ~/LIGGGHTS2/src/Obj_fedora_fpic/run.cpp:175
[7] #6 LAMMPS_NS::Input::execute_command() at ~/LIGGGHTS2/src/Obj_fedora_fpic/pointers.h:59
[7] #7 LAMMPS_NS::Input::one(char const*) at ~/LIGGGHTS2/src/Obj_fedora_fpic/input.cpp:273
[7] #8 Foam::twoWayMPI::couple() const in "/home/evan/OpenFOAM/evan-2.1.1/platforms/linux64GccDPOpt/lib/liblagrangianCFDEM-PUBLIC-2.1.1.so"
[7] #9 Foam::cfdemCloud::evolve(Foam::GeometricField&, Foam::GeometricField,
...

Below is a exert of the offending code from neighbor.cpp. Line 1215 is the final if statement ( if (rsq... ).

int flag = 0;
if(radvary_flag == 0)
{
for (int i = 0; i < nlocal; i++) {
delx = x[i][0] - xhold[i][0];
dely = x[i][1] - xhold[i][1];
delz = x[i][2] - xhold[i][2];
rsq = delx*delx + dely*dely + delz*delz;
if (rsq > deltasq) flag = 1; //line 1215
}
}

As far as I can tell, "deltasq" is a constant based on the skin distance (for my simulation). So does this mean that the exception occurs because "rsq" is becoming undefined? How could this happen? My logfile indicates nothing suspicous happening in the solution - no particles are lost, the KE is low, the courant number is low, the fluid flow is not showing problems.

For one simulation (out of the 20 or so I tried), it crashed in another pair_style that I use (pair_colloid). What is interesting to note in this case, is that the std_err also pointed to a line with a "if (rsq < ... ". So it is a similar type of problem (rsq), but it occurs in another function.

Does anyone have an idea as to what the problem could be?. I am running LIGGGHTS v.2.0.4 and CFDEM v.2.4.4.

Regards

Evan

ckloss's picture

ckloss | Mon, 02/18/2013 - 23:53

Could be that something becomes NaN due to erroneous force calculations.
That's the only explanation I have...

I would recommend to check any code modifications you implemented, e.g. by using valgrind and to update to the latest'n'greatest LIGGGHTS and CFDEMcoupling version

Cheers
Christoph

Schrader | Tue, 10/02/2018 - 21:04

Hello Evan,
it seems so that I have a similar problem. I have different cases and some of them are crashing with a floating point exception in "Neighbor::check_distance()", but without any for me visible reason. Could you solve your problem and if yes how?

Cheers,
Marcel