|
[Sponsors] |
November 9, 2012, 19:11 |
Segmentation fault with particleTracks
|
#1 |
New Member
Join Date: Nov 2012
Posts: 4
Rep Power: 14 |
Hello,
I'm trying to generate particle tracks using the particleTracks utility from trajectories obtained from solidParticleFoam. The output ends with the following: Code:
... Time = 39400.897 Reading particle positions Read 682 particles Time = 39400.898 Reading particle positions Read 682 particles Time = 39400.899 Reading particle positions Read 682 particles Time = 39400.9 Reading particle positions Read 682 particles Particle statistics: Found 0 particles originating from processor 0 Generating 0 particle tracks for cloud defaultCloud Time = 39400 Reading particle positions Constructing tracks #0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #1 Foam::sigSegv::sigHandler(int) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #2 in "/lib/libc.so.6" #3 in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/particleTracks" #4 __libc_start_main in "/lib/libc.so.6" #5 in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/particleTracks" Segmentation fault My particleTracksProperties file: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object particleTrackProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // cloudName defaultCloud; sampleFrequency 1; maxPositions 1000000; // ************************************************************************* // I can try to provide any additional information that would help in diagnosing the problem. Thanks in advance, Greg |
|
November 12, 2012, 11:13 |
|
#2 |
New Member
Join Date: Nov 2012
Posts: 4
Rep Power: 14 |
I have just now tried to run this using the gdb debugger. The results aren't particularly informative to me (looks like the crash is in the main() function), but my hope is that they will be meaningful to someone else:
Code:
... Particle statistics: Found 0 particles originating from processor 0 Generating 0 particle tracks for cloud defaultCloud Time = 39400 Reading particle positions Constructing tracks Program received signal SIGSEGV, Segmentation fault. 0x00000000004098f0 in main () (gdb) where #0 0x00000000004098f0 in main () |
|
February 22, 2013, 15:24 |
|
#3 |
New Member
Join Date: Nov 2012
Posts: 4
Rep Power: 14 |
I think I've figured out the problem and came up with a way to address this.
I added some debugging lines to determined that was related to insufficient origId information; the code was storing -1 for all the IDs and the code was crashing on the line "if (allTracks[trackId].size() < maxPositions)" with trackId equal to -1. It turns out that I wasn't aware of the need for origId and origProcId files when I ran solidParticleFoam (which I used to generate the trajectories); solidParticleFoam didn't seem to require origID or origProcID in the 0/lagrangian/defaultCloud directory (actually, technically, I'm using 39400 as starting time here), and when I ran solidParticleFoam, it filled subsequent time directories with "1000{-1}" and "1000{0}" for these files, respectively. If I instead put origID and origProcID in the 0/lagrangian/defaultCloud directory, filled with contents like shown below, before running solidParticleFoam, then subsequent use of particleTracks works fine, and without error. Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class labelField; location "39400"; object origId; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 1000 ( 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ... Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class labelField; location "39400"; object origProcId; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 1000 ( 0 0 0 0 0 0 0 0 0 ... |
|
February 7, 2015, 09:56 |
|
#4 |
Senior Member
|
Hi,
I have a similar problem. But your solution didn't work on mine. I am using DPMFoam on OF 2.3. neither it worked on my own solver in which I added particle tracking library into icoFoam. In both serial and parallel runs I get the following error: Code:
#0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigSegv::sigHandler(int) at ??:? #2 in "/lib/x86_64-linux-gnu/libc.so.6" #3 Foam::coordSet::scalarCoord(int) const at ??:? #4 Foam::writer<double>::writeTable(Foam::coordSet const&, Foam::List<Foam::List<double> const*> const&, Foam::Ostream&) const at ??:? #5 Foam::rawSetWriter<double>::write(bool, Foam::PtrList<Foam::coordSet> const&, Foam::List<Foam::word> const&, Foam::List<Foam::List<Foam::Field<double> > > const&, Foam::Ostream&) const at ??:? #6 at ??:? #7 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #8 at ??:? Segmentation fault (core dumped) origId: Code:
9(0 1 2 3 4 5 6 7 8) Code:
9{0} Here is my particleTrackProperties file: Code:
cloudName kinematicCloud; sampleFrequency 1; maxPositions 9; setFormat csv; // see sampleDict for set formats
__________________
Learn OpenFOAM in Persian SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member Complex Heat & Flow Simulation Research Group If you can't explain it simply, you don't understand it well enough. "Richard Feynman" |
|
February 7, 2015, 10:10 |
|
#5 |
Senior Member
|
I think I found a solution.
Changing the setFormat into vtk seems to solve the problem. However I don't know why raw or csv formats don't work yet.
__________________
Learn OpenFOAM in Persian SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member Complex Heat & Flow Simulation Research Group If you can't explain it simply, you don't understand it well enough. "Richard Feynman" |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Segmentation fault when running dieselFoam or dieselEngineFoam in parallel | francesco | OpenFOAM Bugs | 4 | May 2, 2017 22:59 |
segmentation fault when installing OF-2.1.1 on a cluster | Rebecca513 | OpenFOAM Installation | 9 | July 31, 2012 16:06 |
Segmentation Fault | Shawn_A | OpenFOAM Running, Solving & CFD | 6 | October 31, 2011 15:38 |
ParaView segmentation fault only for multiphase | gwierink | OpenFOAM | 9 | March 25, 2010 08:23 |
segmentation fault | usker | Siemens | 5 | March 6, 2007 00:14 |