I have checked communication using args and global variables.
Non of them works for transmitting data from a  GPU process to main(), when I use DDP.
Usually, the arguments hold pointers to variables, and main() and called functions can share the same variables. But, when the processes are spawned in DDP, it seems that args are deep-copied and there is no common variables having the same ids between main() and the processes.
A global variable can be declared in the process, but it’s not shared with main().
Does everybody using DDP plot the loss charts in a spawned process on GPU?
I have no idea how to send the loss list from the process to main().
Please advise.