error when use compute group/group with gpu package

Hello all,

Now I am trying to use the gpu package to do some simulations.
The version I am using is 21Jun12 and use eam potential.
The jobs can carried out successfully, except the command
"compute group/group". When I want to output the info of
"compute group/group" by thermo_style or defining this
compute to a variable and then using fix print, the program collapsed.

Error infomation is as follow:

[node41:21351] *** Process received signal ***
[node41:21351] Signal: Segmentation fault (11)
[node41:21351] Signal code: Address not mapped (1)
[node41:21351] Failing at address: 0xd818
[node41:21351] [ 0] /lib64/libpthread.so.0 [0x3efe00e4c0]
[node41:21351] [ 1] /home/WangK/try263/lmp_node119_gtx295(_ZN9LAMMPS_NS7PairEAM6singleEiiiidddRd+0xde) [0x85a46e]
[node41:21351] [ 2] /home/WangK/try263/lmp_node119_gtx295(_ZN9LAMMPS_NS17ComputeGroupGroup17pair_contributionEv+0x28e) [0x57d68e]
[node41:21351] [ 3] /home/WangK/try263/lmp_node119_gtx295(_ZN9LAMMPS_NS17ComputeGroupGroup14compute_scalarEv+0x60) [0x57d290]

......

[node41:21351] [15] /home/WangK/try263/lmp_node119_gtx295(_ZNSt8ios_base4InitD1Ev+0x41) [0x4f1c19]
[node41:21351] *** End of error message ***

Can you run your script on just the CPU?

Steve

Hi Steve,

Yes, this script can be carried out successfully on just CPU.
In addition, the GPU I used is gtx295.

Kai Wang

Hi Kai and Steve,

I think I found the issue with eam/gpu which involves the way eam/gpu
deals with the fp array. I'll try to resolve it as soon as I could and
let you know.

Thanks for reporting the issue.

Cheers,
-Trung

Hi Kai,

please copy the attached source files into src/GPU, make yes-gpu, and
rebuild LAMMPS. Let me know if the updated eam/gpu works for you.

In eam/gpu the fp array is not initialized and used, instead we use
another array (fp_pinned) of which the element type depends on the
specified precision (single or double). Therefore, when the
pair->single() function is invoked by compute group/group, the
PairEAM::single() function is called, causing segfaults with fp. What
I did is to override the single() function for PairEAMGPU, accessing
the fp_pinned array instead of fp.

Cheers,
-Trung

pair_eam_gpu.cpp (8.53 KB)

pair_eam_gpu.h (1.5 KB)

Hi Trung,

Sorry for my late reply.

I have tried your method. Yes, it works well !
It's very kind of you. Thank you very much !

Kai Wang

Thanks Trung - I'll post these in a patch today.

Steve