-Compiler failed to translate accelerator region (see -Minfo messages): Unexpected Data Type in Deep Copy

Dear Khokhar,

I checked your code and found that you are using character(len=30) type of variables in your Ptr_HEADER module. I think it is not allowed to use such kind of data type on device, hence the error. After I removed given lines, the code managed to compile and run without any problem. The logs are below:

siarhei@: nvfortran -fast -acc -gpu=cc86,deepcopy -cpp -Mlarge_arrays -Minfo -o=Ptr_tester Ptr_MATERIAL_H.f90 Ptr_GLOBAL.f90 Ptr_INITALIZE.f90 Ptr_executor.f90 
Ptr_MATERIAL_H.f90:
copy_material_from:
     67, Loop not fused: different loop trip count
         Loop not fused: no successor loop
         Loop not vectorized: unprofitable for target
     72, Loop unrolled 3 times (completely unrolled)
     76, Loop not fused: no successor loop
         Loop not vectorized: data dependency
allocate_material:
    126, Loop not fused: different loop trip count
         Loop not vectorized: unprofitable for target
    127, Loop not fused: function call before adjacent loop
         Loop not vectorized: unprofitable for target
    137, Loop unrolled 3 times (completely unrolled)
Ptr_GLOBAL.f90:
INITIALIZE.f90:
initializer:
     12, Loop not vectorized/parallelized: contains structure move
         Loop unrolled 4 times
     13, Loop not vectorized/parallelized: contains structure move
         Loop unrolled 4 times
     15, Loop not vectorized/parallelized: contains structure move
     26, Loop unrolled 4 times (completely unrolled)
     28, Loop unrolled 2 times (completely unrolled)
Ptr_executor.f90:
executor:
     15, Generating enter data create(pm)
     16, Generating copy(pm%mgxs) [if not already present]
     17, Generating NVIDIA GPU code
         18, !$acc loop gang, vector(128) ! blockidx%x threadidx%x
             Generating reduction(+:beta0)
     17, Generating implicit copy(beta0,pm) [if not already present]
     18, Loop not fused: no successor loop
         Loop not vectorized: unprofitable for target
     23, Generating exit data delete(pm)
siarhei@: ./Ptr_tester
 All the initialization is successful
 Normal Ending of the executor program ...
Segmentation fault
siarhei@:

My system is: Windows 11 Pro, WSL 2, Ubuntu 20.04.3, HPC SDK 22.1, nVidia RTX 3090.

Not sure about the reason of Segmentation fault, though, but it appears at the very end of the program runtime and does not break any operation.

I understand that sometimes it is crucial to have character variables but maybe you could work around this issue by using numerical data types instead and encoding/decoding them on the host side.

Best Regards,
Siarhei

1 Like