CUDA GPU acceleration fails with large number of materials

22 views
Skip to first unread message

xiang li

unread,
May 26, 2026, 4:06:44 AM (10 days ago) May 26
to gprMax-users

Dear gprMax Development Team,

Hello,

I am currently using the CUDA GPU acceleration functionality of gprMax for relatively large-scale GPR numerical simulations.

The geometry and material distributions in my model are not directly defined in the .in file, but are imported from external TXT and HDF5 files (approximately 8000 materials). The CPU version runs correctly, but when GPU acceleration is enabled, the following error occurs:

ptxas error : File uses too much global constant data

Based on the error message, it seems that the large number of material coefficients causes the CUDA kernel constant memory to exceed the 64 KB limit.

The current model has the following characteristics:

      1.Geometry and material distributions are imported from external TXT/HDF5 files;

      2.The model size is relatively large;

      3.The number of material regions/material coefficients is high;

Therefore, I would like to ask a few questions:

       1.Are there any recommended approaches for handling models with a large number of materials when using GPU acceleration?

        2.Are there any recommended GPU settings or alternative backend solutions for this type of model?

        3.Without significantly changing the physical characteristics of the model, is there a more suitable way to address this issue?

Thank you very much for developing and maintaining gprMax, and I sincerely appreciate your help.

Best regards

Antonis Giannopoulos

unread,
May 27, 2026, 4:14:57 AM (9 days ago) May 27
to gprMax-users
This is a limitation that requires reprogramming the GPU kernels and how they handle update coefficients. I am not sure it will be changed soon although it will be nice to remove this limitation especially if it does not affect performance.

However, It is also important to consider why you really need so many materials. If you are using a stochastic distribution of materials it makes sense to bin the ranges of permittivity and conductivity so you have a smaller number of materials. Having materials varying at the 2nd or 3rd decimal point in their permittivity it should not be important in most of GPR modelling.

Best

Antonis
Reply all
Reply to author
Forward
0 new messages