segfault using USER-ATC package

Hi-
When I use the USER-ATC package, I get a segfault. See the attached input script. The error message is printed below. Any help would be appreciated

ATC: constructing kernel field estimate
ATC: version 2.0
[login04:28015] *** Process received signal ***
[login04:28015] Signal: Segmentation fault (11)
[login04:28015] Signal code: Address not mapped (1)
[login04:28015] Failing at address: 0x40000001c
[login04:28015] [ 0] /lib64/libpthread.so.0[0x30dd60f710]
[login04:28015] [ 1] lammps[0xc6e238]
[login04:28015] [ 2] lammps[0xa7d131]
[login04:28015] [ 3] lammps[0xe8622c]
[login04:28015] [ 4] lammps[0xaab628]
[login04:28015] [ 5] lammps[0x574532]
[login04:28015] [ 6] lammps[0x72dbe4]
[login04:28015] [ 7] lammps[0x72860b]
[login04:28015] [ 8] lammps[0x6ec5c2]
[login04:28015] [ 9] lammps[0x6e9172]
[login04:28015] [10] lammps[0x706644]
[login04:28015] [11] /lib64/libc.so.6(__libc_start_main+0xfd)[0x30dce1ed5d]
[login04:28015] [12] lammps[0x40c249]
[login04:28015] *** End of error message ***

Thanks, Steven

in.test (683 Bytes)

i get:

]$ lmp_g++ -in in.test -echo screen
LAMMPS (6 Apr 2015-ICMS)
WARNING: OMP_NUM_THREADS environment is not set. (../comm.cpp:89)
  using 1 OpenMP thread(s) per MPI task
#LAMMPS input script

I still get the segfault even if I comment out the fix_modify lines. Do you have any suggestions of how to track this down?
Thanks, Steven

I still get the segfault even if I comment out the fix_modify lines. Do you
have any suggestions of how to track this down?

using an executable compiled with -g and gdb i find that you seem to
be missing a fix_modify kernel statement, because the library tries
to dereference a kernel function set to a NULL pointer.

axel.

Hi Steven, what version are you using? Your syntax seems old. Try

fix_modify AtC fields add stress

Jeremy

when i change the AtC related parts in the input to this (i.e. add a
kernel option), it runs without a segfault.

fix AtC all atc hardy
fix_modify AtC mesh create 4 4 1 simbox p p p
fix_modify AtC atom_element_map eulerian 10
fix_modify AtC fields none
fix_modify AtC fields add stress
fix_modify AtC kernel quartic_sphere 2.0
fix_modify AtC output hardy 10 text

looking at the code where the null-pointer dereference happens, how
about adding a check to the constructor and printing a proper message,
e.g. by throwing an exception?

diff --git a/lib/atc/PerPairQuantity.cpp b/lib/atc/PerPairQuantity.cpp
index fa3bbe3..86ad331 100644
--- a/lib/atc/PerPairQuantity.cpp
+++ b/lib/atc/PerPairQuantity.cpp
@@ -272,6 +272,8 @@ BondMatrixKernel::BondMatrixKernel(LammpsInterface
* lammpsInterface,
   BondMatrix(lammpsInterface,pairMap,x,feMesh),
   kernelFunction_(kernelFunction)
{
+ if (kernelFunction_ == NULL)
+ throw ATC_Error("No AtC kernel function initialized");
};
void BondMatrixKernel::reset(void) const
{

Jeremy,

I am using ATC version 2.0; the version that comes with the 30 April 2015 version of LAMMPS. I am now using that command you suggest. However, that was not the cause of the original error, since commenting out all of the fix_modify lines did not affect the error. I have now tried compiling with serial g++. This allows me to get past the original error. Now the error is:

LAMMPS (30 Apr 2015)
Lattice spacing in x,y,z = 1 1 1
Created orthogonal box = (0 0 0) to (4 4 4)
1 by 1 by 1 MPI processor grid
Created 64 atoms
ATC: constructing kernel field estimate
ATC: version 2.0
ATC: peratom PE compute created with ID: 3
ATC: created uniform mesh with 50 nodes, 16 unique nodes, and 16 elements
ATC: Warning : text output can create LARGE files
ATC: output custom names:

Neighbor list info …
2 neighbor list requests
update every 1 steps, delay 0 steps, check yes
master list distance cutoff = 2.8
Setting up run …
ATC: computing bond matrix Segmentation fault (core dumped)

The input script I used is attached. I have also been able to get to the same point using g++ with openmpi. Next I will try to compile with intel, which is the version I was using when I generated the original error.

Thanks for the help, steven

in.test (645 Bytes)

Jeremy,
I am using ATC version 2.0; the version that comes with the 30 April 2015
version of LAMMPS. I am now using that command you suggest. However, that
was not the cause of the original error, since commenting out all of the
fix_modify lines did not affect the error. I have now tried compiling with
serial g++. This allows me to get past the original error. Now the error is:

LAMMPS (30 Apr 2015)
Lattice spacing in x,y,z = 1 1 1
Created orthogonal box = (0 0 0) to (4 4 4)
  1 by 1 by 1 MPI processor grid
Created 64 atoms
ATC: constructing kernel field estimate
ATC: version 2.0
ATC: peratom PE compute created with ID: 3
ATC: created uniform mesh with 50 nodes, 16 unique nodes, and 16 elements
ATC: Warning : text output can create _LARGE_ files
ATC: output custom names:

Neighbor list info ...
  2 neighbor list requests
  update every 1 steps, delay 0 steps, check yes
  master list distance cutoff = 2.8
Setting up run ...
ATC: computing bond matrix Segmentation fault (core dumped)

The input script I used is attached. I have also been able to get to the
same point using g++ with openmpi. Next I will try to compile with intel,
which is the version I was using when I generated the original error.

this has nothing to do with the compiler or what compiler flags you
use. comparing to similar inputs in the examples directory shows that
basically your input is incomplete and the AtC library doesn't handle
it gracefully.

axel.

Ah, I see. That works! Thanks for the help.
-Steven

Again, it’s a syntax issue. The line you create the atc fix on should be:

fix AtC all atc field

This is because you are using the mesh as your coarse-graining operator and not a kernel function.
Jeremy

Thanks Axel
  It looks like a sequencing problem ie one of the fix modify commands is predicated on another. So Steve can start running again by swapping the input lines and well trap the error in the code for the next push.
Reese

Reese Jones
[email protected]...
925 294-4744