FATAL ERROR: data in PRESENT clause was not found on device 1:

Hi,

I am trying to run my code on A100s and I get this error

FATAL ERROR: data in PRESENT clause was not found on device 1:

I don’t have this error previously when I was running on V100s (or even on A100). I am using nvhpc_23.7.

Is there are a generic fix for this issue? Becasue when do

!$acc data create(primitive)

!$acc end data

for every variable I have this error for then it worked. But, I have a lot of variables to check. Let me know.

Thanks,

FFLAG = -acc -fast -mcmodel=medium -ta=tesla:managed

I removed the “-ta=tesla:managed” is the error because that?

thanks.

This error means that one or more of your compute constructs (parallel or kernels), you either have “present(vars…)” clause or a “default(present)”. When the compute construct is encountered, the runtime check to ensure that there is a device version of the variable that was created in an earlier data region. If the variable is not present, then this error is given.

Without the “present”, the runtime would implicitly copy the data but this can cause performance issues due to excessive data movement. Hence, I’ll often use “present” to ensure I’m handling the data management.

Why it worked before is unclear. My best guess is that you were using managed memory (-gpu=managed or -stdpar) where allocated data uses a unified address that can be accessed on both the host and device and would pass the present check.

Hi,

Thanks for your reply. It helped me. I was using managed memory before (-gpu=managed) in the compiler flag.

Will there be any perfromace difference in using managed memory and explicitly writing

!$acc data create(primitive)

!$acc end data

Thanks.