What type of system are you running on? Usually when you use managed memory and get a bus error, it means the host and device is accessing managed memory at the same time.
Brent’s intuition is correct. For older cards such as a K80, if managed memory is accessed from both the host and device at the same time, you’ll get a bus error. The same issue does not occur on new P100 or V100 devices.
Here, the problem line is “cm_list(i)%fine=10” since you’re accessing managed memory on the host via “cm_list(i)”, but also accessing it on the device when assigning to device array "fine.
The simple solution is to make the “device” arrays “managed”. This will have the effect of updating the array on the host, but have them accessible on the device.