Error sampling interior of geometry from .stl file

Hi,
I have a .stl file and i want to use it for sample the interior of geometry. From the example STL Geometry: Blood Flow in Intracranial Aneurysm i understand that if i use a geometry to sample it only on the boundary i can write:

inlet = Tessellation.from_stl(
     "my_inlet.stl", airtight=False
)

Indeed if i want to print this geometry i can use:

sample = inlet.sample_boundary(1000)
var_to_polyvtk(sample, "inlet")

And i have this warning (even if i use the file contained in aneurysm example):

/modulus/modulus/geometry/tessellation.py:90: RuntimeWarning: divide by zero encountered in true_divide
  np.full(x.shape, triangle_areas[index] / x.shape[0])

But the problems begin when i want to use a geometry for sampling points on the interior (and for example adding constraint to them). In fact from the link i learn that in this case you must set airtight=True, and have a .stl file with a watertight geometry.
So i created a .stl file with this characteristic and try to do like the boundary geometry:

interior = Tessellation.from_stl(
     "interior.stl", airtight=True
)
sample = interior.sample_interior(1000)
var_to_polyvtk(sample, "interior")

Running this piece of code results in the following error (even if i use the file aneurysm_closed.stl from the directory of aneurysm example):

terminate called after throwing an instance of 'std::runtime_error'
  what():  the provided PTX was compiled with an unsupported toolchain.
Aborted (core dumped)

If this can help in finding the solution running aneurysm.py results in the same errors just explained.

Ps. i’m not worried about the warning received when i use the sample_boundary method because this warning doesn’t causes the program to fail, but i’m worried about the interior of the geometry that is extremely necessary in my case and the error causes the program to fail.

Thanks for your help.

Hi @tom_02

This is likely an error between the compiled toolchain used for building PySDF versus the driver that is installed on your system. Remind me, are you using the docker container and what is your driver version (use nvidia-smi)?

This version of Modulus/PySDF was built on 515 drivers. If you’re using a much older driver / cuda version than that, this could likely be the issue.

Hi @ngeneva,
i’m using the docker container and this is the output of nvidia-smi command:

NVIDIA-SMI 465.19.01    Driver Version: 465.19.01    CUDA Version: 11.3

So it is necessary to update the driver to a newer version?

Thanks.

Hi @tom_02

That’s what I would try first if you have the ability to, particularly for PySDF. I have also personally tested Modulus on 510 drivers (CUDA 11.6).

As a disclaimer, we do not currently test Modulus/PySDF on older CUDA versions such as 11.3, so I cannot confirm this is the source of the error. We are actively working on increasing our testing range including older drivers.

1 Like