@@ -831,6 +831,9 @@ write_otf2(const output_config& cfg,
831831 OTF2_CHECK (OTF2_GlobalDefWriter_WriteSystemTreeNode (
832832 global_def_writer, 0 , _exe_hash, _node_hash, OTF2_UNDEFINED_SYSTEM_TREE_NODE));
833833
834+ OTF2_CHECK (OTF2_GlobalDefWriter_WriteSystemTreeNode (
835+ global_def_writer, 0 , OTF2_SYSTEM_TREE_DOMAIN_SHARED_MEMORY ));
836+
834837 // Process
835838 OTF2_CHECK (OTF2_GlobalDefWriter_WriteLocationGroup (global_def_writer,
836839 0 ,
@@ -846,12 +849,23 @@ write_otf2(const output_config& cfg,
846849 auto _hash = get_hash_id (_name);
847850
848851 add_write_string (_hash, _name);
852+
853+ /* the device */
854+ OTF2_CHECK (OTF2_GlobalDefWriter_WriteSystemTreeNode (
855+ global_def_writer, agent_v.id .handle , _hash, 0 , 0 ));
856+
857+ /* the device is an accelerator */
858+ OTF2_CHECK (OTF2_GlobalDefWriter_WriteSystemTreeNode (
859+ global_def_writer, agent_v.id .handle , OTF2_SYSTEM_TREE_DOMAIN_ACCELERATOR_DEVICE ));
860+
861+ /* the context */
849862 OTF2_CHECK (OTF2_GlobalDefWriter_WriteLocationGroup (global_def_writer,
850863 agent_v.id .handle ,
851864 _hash,
852865 OTF2_LOCATION_GROUP_TYPE_ACCELERATOR,
853- 0 ,
854- OTF2_UNDEFINED_LOCATION_GROUP));
866+ agent_v.id .handle , // system tree node (aka the device)
867+ 0 // creating/controlling process
868+ ));
855869 }
856870
857871 // Thread Events
0 commit comments