There is indeed C-code involved. Compiler: Microsoft Visual Studio 14.0 x64. In the crashing examples this code is not called. Is there anything we should obey?
Are you using ISO_C_BINDING? If not, you should consider adding it since F2003 added it standardize the interfaces from Fortran to C, including making sure pointers are the same size.
Otherwise, you need to double check that all the data types match between Fortran and C. For example if you’re passing a Fortran array to C, in 32-bits the C side would be expecting this to be an unsigned int but in 64-bits it’s an unsigned long.
call to cuStreamSynchronize returned error 719: Launch failed (often invalid pointer dereference)
This is a generic message which could be any number of issues. The most likely are writing off the end of an array or a bad pointer.
Is there anything different between the successful and the failing execution? Is the failing case passing in a different array? If not, then the array could be being corrupted elsewhere so the error may not be with the kernel itself, but someplace else.
Unfortunately, you’ll need to do a bit of debugging to figure out what’s wrong.
Again, if you can install the 15.7 64-bit compilers you can determine if it is indeed a 32 to 64-bit porting issue or if it’s a difference between the compiler versions.