[petsc-users] Did CUDA break again?
Mark Adams
mfadams at lbl.gov
Wed May 26 20:56:01 CDT 2021
On Wed, May 26, 2021 at 7:13 PM Barry Smith <bsmith at petsc.dev> wrote:
>
> What is HOST=cori09 Does it have GPUs?
>
That is the login node that I got the interactive compute node from. This
is my node:
SLURM_JOB_NODELIST=cgpu02
>
>
> https://docs.nvidia.com/cuda/cuda-runtime-api/structcudaDeviceProp.html#structcudaDeviceProp_164490976c8e07e028a8f1ce1f5cd42d6
>
> Seems to clearly state
>
> int cudaDeviceProp
> <https://docs.nvidia.com/cuda/cuda-runtime-api/structcudaDeviceProp.html#structcudaDeviceProp>
> ::major
> <https://docs.nvidia.com/cuda/cuda-runtime-api/structcudaDeviceProp.html#structcudaDeviceProp_164490976c8e07e028a8f1ce1f5cd42d6>
> [inherited]
>
> Major compute capability
>
>
> Mark, please compile and run this program on the machine you are running
> configure on
>
> #include <stdio.h>
> #include <cuda.h>
> #include <cuda_runtime.h>
> #include <cuda_runtime_api.h>
> #include <cuda_device_runtime_api.h>
> int main(int arg,char **args)
> {
> struct cudaDeviceProp dp;
> cudaGetDeviceProperties(&dp, 0);
> printf("%d\n",10*dp.major+dp.minor);
>
> int major,minor;
> cuDeviceGetAttribute(&major, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR,
> 0);
> cuDeviceGetAttribute(&minor, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR,
> 0);
> printf("%d\n",10*major+minor);
> return(0);
> }
>
> This is what I get
>
> $ nvcc mytest.c -lcuda
> ~/petsc* (main=)* arch-main
> $ ./a.out
> 70
> 70
>
> This compiled and ran fine, but the output is wrong:
18:04 cgpu02 ~/petsc_install$ ./a.out
1120
-1431545180
It looks to me like there was a regression. I am running git bisect now. 7
more steps.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210526/663465d2/attachment.html>
More information about the petsc-users
mailing list