NCAR / micm

A model-independent chemistry module for atmosphere models
https://ncar.github.io/micm/
Apache License 2.0
6 stars 4 forks source link

Add error check for all the CUDA APIs #550

Closed sjsprecious closed 1 month ago

sjsprecious commented 1 month ago

We have implemented the error checking functions for CUDA (https://github.com/NCAR/micm/blob/main/include/micm/util/cuda_matrix.cuh#L53) and CUBLAS (https://github.com/NCAR/micm/blob/main/include/micm/util/cuda_matrix.cuh#L60) APIs.

However, there are many CUDA APIs in the MICM CUDA code (https://github.com/NCAR/micm/blob/main/src/solver/rosenbrock.cu#L51), where we do not check the returned values and this could lead to a malfunctioning CUDA kernel later.

Describe the solution you'd like Add the existing error check functions to all the CUDA APIs in MICM.