Search found 261 matches

by brentl
Mon Nov 18, 2019 9:32 pm
Forum: General Programming
Topic: Fortran Formatting Oddity
Replies: 3
Views: 28

Re: Fortran Formatting Oddity

The compiler/language/hw doesn't know you are printing pi. For any 52 bits of mantissa, there is an exact decimal representation of those bits. For instance, the last bit might represent 2**-51 which is this exact number: 4.440892098500626161694526672363281250e-16. That's more than 15 digits, but th...
by brentl
Thu Nov 14, 2019 10:46 am
Forum: General Programming
Topic: intrinsic bitwise function PGI fortran
Replies: 4
Views: 88

Re: intrinsic bitwise function PGI fortran

A work-around is to compile with -Mcuda=nonvvm. I am not certain yet why this isn't working with the nvvm back-end.
by brentl
Wed Nov 06, 2019 12:46 pm
Forum: General Programming
Topic: cudamemcpy3d error
Replies: 3
Views: 32

Re: cudamemcpy3d error

So, cudamemcpy3D is very particular about the leading dimension (the pitch) and we usually recommend you not use it for general Fortran arrays. Here's two ways to do it. In recent PGI compilers, 2D slicing makes efficient use of cudaMemcpy2D (which does not have the same restrictions on the pitch) a...
by brentl
Tue Nov 05, 2019 1:53 pm
Forum: General Programming
Topic: cudamemcpy3d error
Replies: 3
Views: 32

Re: cudamemcpy3d error

Well, we don't get many users of cudaMemcpy3D() anymore. But, I think you want to do this: CUDA3DPARMS%srcPtr%ptr = c_loc(UXVEL1(0,0,0)) CUDA3DPARMS%dstPtr%ptr = c_devloc(UTXVELD1(0,0,0)) Or something like that. It is probably much more readable to use slice notation in your array assignment. Is thi...
by brentl
Tue Oct 29, 2019 1:06 pm
Forum: General Programming
Topic: How to override pgcc's optimization flag?
Replies: 5
Views: 584

Re: How to override pgcc's optimization flag?

Hi Victor,

We haven't found a solution for you yet. Do you get the proper optimization when you do
% pgcc -O2 -Mnovect hello.c?