USER-CUDA: setting CUDA_MAX_TYPES_PLUS_ONE equal to 99 causes compilation overflow error

Hi,

I am trying to run a GPU input script with USER-CUDA package enabled.
LAMMPS is carping that CUDA_MAX_TYPES_PLUS_ONE is set inappropriately
and I should set to 99 and recompile. Indeed I modified
lib/cuda/cuda_common.h to 99 (the default value is 12), and attempted
to recompile the library. However, I got the compilation error "Error:
Const space overflowed."

I just wonder if this is a serious issue and I cannot easily run
USER-CUDA LAMMPS on this particular input or it can be somehow easily
fixed. Below are the outputs of execution of LAMMPS, recompilation and
the content of the input script.

Just to mention, this particular script executes correctly on my
STANDARD-GPU LAMMPS.

Execution of USER-CUDA LAMMPS

Hi Magda

how many atom types do you have in your problem?
You should be fine with setting the variable to number of atom types +2.
Hopefully that will not overflow the constant space.

If it does, there is in principal the possibility to forgo constant cache usage, but that requires a small source code change.

Christian

-------- Original-Nachricht --------

Hi Chris,

I have 100 types of atoms ...

31226312 atoms
100 atom types
-360 360 xlo xhi
-360 360 ylo yhi
-360 360 zlo zhi

~~ Magda
== What doesn't kill you, makes you stronger ==

Hi Chris,

I have 100 types of atoms ...

31226312 atoms
100 atom types
-360 360 xlo xhi
-360 360 ylo yhi
Magda

Why do you need 100 atom types?

Steve

Sorry for not checking the answer.

I know that it sounds weird but I do not know why. I have got the
input script and I wanted to run it. Just couldn't with USER-CUDA
because of mentioned errors. The script runs perfectly well with GPU
package. My prime interest in studying the GPU workloads, not input
scripts per se or devising new materials.

Anyway the problem was solved by reducing the number of atom types to 1.

Thanks,
Magda