First time here? Checkout the FAQ!
0 votes
by (550 points)

Please forgive my ignorance. This question might have been already answered somewhere, directly or indirectly.

Could openCARP be ran on a GPU? I've tried changing my settings to run on my GPU i.e., CARP_EXE_DIR:

    GPU: /home/kardia/openCARP/_build/bin


BUILD:         GPU        # choose default CARP build (CPU, GPU)

But it doesn't seem to work as I've seen on my GPU activity and no changes on the ETA of a sim (CPU vs. GPU).

I've also been trying to figure out how to adapt some of my scripts with the numba package but it seems that there are functions deep within the source code that is not supported by numba.

Has anyone tried and successfully send openCARP jobs to their GPU(s)? How did you do it?

2 Answers

+2 votes
by (550 points)
Although this isn't a modification specific to openCARP, I was able to use my NVIDIA GPU to speed up my simulations by adjusting my PETSc configurations.

For anyone interested, I modified my PETSc configuration to include CUDA and openmpi instead of mpich. This is based on an available example configuration in the PETSc folder combined with suggested installation configuration for openCARP.

./configure     --download-fblaslapack     --download-metis     --download-parmetis     --download-hypre     --with-debugging=0     COPTFLAGS='-g -O'     CXXOPTFLAGS='-g -O'     FOPTFLAGS='-g -O' --with-make-test-np=2 --download-openmpi --download-hwloc --with-64-bit-indices=1 CUDAC --with-precision=double --with-clanguage=c CUDAFLAGS=-ccbin pgc++

All of these are, of course, under the assumption that you have the CUDA compilers/toolkits and a compatible GPU.
by (7.8k points)
Thank you for the hint! I checked the PETSc websize and it seems CUDA support finally arrived in PETSc.
+1 vote
by (7.8k points)

There currently is no GPU support for openCARP, but there will be GPU support added in the future through custom GPU ODE solvers and Ginko as solver backends.

Best, Aurel
by (1.2k points)
Hi Aurel,

Curious if there has been an update on this. Now that PETSC supports CUDA, are there any plans for official GPU support of openCARP at this time? Perhaps a roadmap?

I've been looking into constructing a robust compute environment for openCARP. If GPU support is will arrive within this year, all my plans could change. For the better of course.
by (550 points)
Commenting for updates.

I hope this topic will be discussed in the upcoming user meeting.

Please let us know your future plans for GPU support!
Welcome to openCARP Q&A. Ask questions and receive answers from other members of the community. For best support, please use appropriate TAGS!
architecture, carputils, documentation, experiments, installation-containers-packages, limpet, slimfem, website, governance