Return the UUID for this run
Generated when first called, guaranteed not to change during the simulation. Communicates when first called to broadcast the UUID to all processors
function simulation_run_uuid()
use mp, only : proc0, broadcast
use uuid_mod, only : generate_uuid, uuid_len
character(len=uuid_len) :: simulation_run_uuid
character(len=uuid_len), save :: run_uuid
logical, save :: first_run = .true.
if (first_run) then
if (proc0) then
run_uuid = generate_uuid()
end if
call broadcast(run_uuid)
first_run = .false.
end if
simulation_run_uuid = run_uuid
end function simulation_run_uuid