MPI based C code Can I use CUDA to compile a previous code that depended on an MPI libr

I am currently using CitcomCU ( to model the Earth’s mantle. It is written in C and relies heavily on MPI to run parallelized. I don’t really know much about the code itself but was wondering if it would be possible to compile it with CUDA and still take advantage of the parallelization that is already written into the code. I’ve never used CUDA before so sorry if this is an obvious question. Thanks so much for any and all help.

Not directly, no. There are different parallel programming models, of which MPI supports many. CUDA is specifically oriented toward data-parallel programming, where the same instruction sequence is applied to many data elements in parallel. You can’t automatically convert an MPI program to a CUDA program. However, someone familiar with this program and the CUDA programming model could potentially port it over.