Strange Linker Warning

Hi

We are using PGI/OpenACC/Fortran on Windows.

Since we switched from Version 15.7-32Bit to Version 18.4-64Bit our program crashes for still unknown reasons.

The linker gives a warning I don’t understand. Maybe this warning can give any hints:

Creating library hydro_as-1step.lib and object hydro_as-1step.exp
./hydro_as-1step.exf: warning: unknown section "_RDATA" found, executable not
stripped.  Use the linker's /merge option to merge this section
with another.  Example: "/merge:_RDATA=.data"

What does this warning mean? Is it a warning which can hint to serious problem?


Benedikt

Hi Benedikt,

While I’m not 100% positive, I believe the RDATA section is where we put the device code. So the warning is that the linker doesn’t know what this section is for and doesn’t attempt to strip the symbols. It should be benign.

Since we switched from Version 15.7-32Bit to Version 18.4-64Bit our program crashes for still unknown reasons.

Can you describe the error? It’s been awhile since I’ve dealt with 32 to 64-bit porting issues, but maybe with more detail it will jog my memory on what to look for.

Is this a pure Fortran code or are there any C routines or calls to the MS run time? In general, Fortran has few problems when porting to 64-bits. I mostly remember issues when there was C mixed in.

Though, it may be a compiler version issue as well. Can you try building with the 64-bit 15.7? That will narrow it down to see if it’s 32-bit vs 64-bit or a compiler version difference.

-Mat

Indeed the switch from 32Bit/15.7 to 64Bit/18.4 is a very big problem for us!

Serveral kinds of crashes:

  • After some time following error-message:
Failing in Thread:1
call to cuStreamSynchronize returned error 719: Launch failed (often invalid pointer dereference)
Failing in Thread:1
call to cuMemFreeHost returned error 719: Launch failed (often invalid pointer dereference)
  • “after some time” means: Code is executed in a loop and runs successfully many times. The crash occurs for no comprehensible reason

  • 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?

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.

-Mat

Are you using ISO_C_BINDING

OK - I was not aware I should …

First I’ll try to eliminate calls to all C-functions for test-purposes. If this succeeds I’ll rewrite to ISO_C_BINDING. But at least one lib is quite big :-(

Again, if you can install the 15.7 64-bit compilers …

OK … Needs some time to set it up because of the involved C-Code.

Benedikt