problem with table/gpu

Hi,
I was trying to use table/gpu potentials using 26 Jan 2012 LAMMPS
The lammps code I complied can run examples comes with the source code.
However, I kept getting cuda driver error 700 in call at file ’ geryon/nvd_timer.h’ in line 76 and 98.
After a lot of testing, I found if I used more than 10 atom types, I got the error.
If the system contains less or equal to 10 atom types, the code runs.
I tried compiling the gpu lib with SINGLE_SINGLE, SINGLE_DOUBLE, DOUBLE_DOUBLE, all give the same problem.
Does anyone face the same problem ?
Thanks

Chi-cheng

I think this is a Q for Mike ...

Steve

Wrong email address for Mike ...

Steve

Hi Chi-cheng and Steve,

I’m taking care of table/gpu, and I think I spot the mistakes I made in the code. Will keep you posted with the progress.

Sorry for this inconvenience.

Regards,
-Trung

Hi Chi-cheng and Steve,

table/gpu uses different kernels when the number of atom types exceeds some threshold depending on the hardware (in this case, the threshold is 10); and an argument for that kernel was passed incorrectly. Attached is the corrected source file; please copy it to the lammps/lib/gpu folder, do a clean make for libgpu.a, and then go to lammps/src and rebuild.

Chi-cheng, thanks for pointing this out. Please let me know if this works.

Regards,
-Trung

lal_table.cpp (14 KB)

Hi Trung and Steve,
Thanks for your help. The code works now.
I also notice another minor issue. The table/gpu have trouble reading/parsing parameters when combined with pair hybrid.
It may related to hybrid code as well. I’ll test more and see if I can find anything.

Thanks!

Chi-cheng

Hi Trung and Steve,
Thanks for your help. The code works now.
I also notice another minor issue. The table/gpu
have trouble reading/parsing parameters when combined with pair hybrid.
It may related to hybrid code as well. I'll test more and see if I can find
anything.

it is *very* likely related to pair style hybrid and the bugfix
is straightforward. i've fixed a similar issue in the past.
give me a few minutes to check it out.

axel.

Hi Trung and Steve,
Thanks for your help. The code works now.
I also notice another minor issue. The table/gpu
have trouble reading/parsing parameters when combined with pair hybrid.
It may related to hybrid code as well. I'll test more and see if I can find
anything.

it is *very* likely related to pair style hybrid and the bugfix
is straightforward. i've fixed a similar issue in the past.
give me a few minutes to check it out.

yup. please replace your pair_hybrid.cpp file with
the attached one (after uncompressing it).

this should take care of it and also fix the
similar problem for pair_style table/omp
and a bunch of other multi-threaded styles.

BTW: since using pair style hybrid will keep
you from using gpu accelerated neighbor list
builds, you might consider turning on multi-threading
and use multi-threaded neighbor list builds instead.
they are by far not as efficient as the GPU
version, but faster than serial.

axel.

pair_hybrid.cpp.gz (5.65 KB)

sorry guys,

i overlooked the inverted logic of strstr(3) vs. str(n)cmp(3)
and thus the file cannot work. my bad. i was rushing things.
the attached version version has been properly tested
and appears to be working correctly (for me, that is).
i still need to add tabulated tests to my regtest library.

axel.

pair_hybrid.cpp.gz (5.65 KB)

Don't worry. I actually just released a patch (31Jan) which
enables pair hybrid to use the same pair style (as a sub-style)
multiple times. This changed the code for parsing
the pair style args, so it should now work for all
cases w/out the special checks for non-numeric args.

Steve