Hi Samuel, lstopo has obviously some logic how to sort the data inserted by hwloc_topology_insert_misc_object_by_cpuset. Could be data displayed in the same order as inserted?
While parsing 245 0 0 0 0 0 1 1 3 0 0 246 1 1 1 1 1 2 2 3 1 1 I'm trying to display the data in lstopo in format time: PID However, data are inserted in the different order. See attached png. I have called hwloc_topology_insert_misc_object_by_cpuset in this chronological order: 1: 245 1: 246 2: 245 2: 246 3: 245 3: 246 4: 245 4: 246 5: 245 5: 246 6: 245 6: 246 7: 245 7: 246 8: 245 8: 246 9: 245 9: 246 10: 245 10: 246 Thanks Jirka On Thu, Jun 20, 2013 at 9:33 PM, Jiri Hladky <hladky.j...@gmail.com> wrote: > > > On Tue, Jun 18, 2013 at 5:32 PM, Samuel Thibault <samuel.thiba...@inria.fr > > wrote: > >> Hello, >> >> Jiri Hladky, le Tue 18 Jun 2013 17:18:15 +0200, a écrit : >> > I would like to check the possibilities to visualize the results to the >> output >> > similar to lstopo --top (see the attachment). I would like to write a >> simple >> > utility which will >> > * parse the above file >> > * foreach timestep create an output similar to lstopo --top output >> showing, >> > where each job was running >> >> It should be easy to do: create a program which >> >> - detects the topology as usual >> - for each of these lines: >> PID #CPU #CPU #CPU #CPU >> PID #CPU #CPU #CPU >> call hwloc_topology_insert_misc_object_by_cpuset(topology, cpuset, PID) >> - export the topology as xml file. >> >> and then for each job output, run it and run lstopo on the generated xml >> file. >> >> Samuel >> _______________________________________________ >> hwloc-devel mailing list >> hwloc-de...@open-mpi.org >> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel >> > > Hi Samuel, > > thanks for the advice, I got it working! :-) It's a little bit overhead > with a XML file but the C program is really short and easy. > > Now comes a hard question - can the background color of the created box in > lstopo output be easily changed? The idea is to have time axes color coded. > So for the format > > PID #CPU #CPU #CPU #CPU > PID #CPU #CPU #CPU > > For time=1 use color red > For time=2 use color blue > > and so on. The idea is to display the file above in one PNG picture so > that you can easily see if more jobs were running on the same CPU > simultaneously. > > Thanks > Jirka >
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE topology SYSTEM "hwloc.dtd"> <topology> <object type="Machine" os_index="0" cpuset="0x0000000f" complete_cpuset="0x0000000f" online_cpuset="0x0000000f" allowed_cpuset="0x0000000f" local_memory="16537890816"> <page_type size="4096" count="4037571"/> <page_type size="2097152" count="0"/> <info name="DMIProductName" value="2429BP3"/> <info name="DMIProductVersion" value="ThinkPad T530"/> <info name="DMIBoardVendor" value="LENOVO"/> <info name="DMIBoardName" value="2429BP3"/> <info name="DMIBoardVersion" value="Not Available"/> <info name="DMIBoardAssetTag" value="Not Available"/> <info name="DMIChassisVendor" value="LENOVO"/> <info name="DMIChassisType" value="10"/> <info name="DMIChassisVersion" value="Not Available"/> <info name="DMIChassisAssetTag" value="RH0004408"/> <info name="DMIBIOSVendor" value="LENOVO"/> <info name="DMIBIOSVersion" value="G4ET37WW (1.12 )"/> <info name="DMIBIOSDate" value="05/29/2012"/> <info name="DMISysVendor" value="LENOVO"/> <info name="Backend" value="Linux"/> <info name="LinuxCgroup" value="/"/> <info name="OSName" value="Linux"/> <info name="OSRelease" value="3.9.5-201.fc18.x86_64"/> <info name="OSVersion" value="#1 SMP Tue Jun 11 19:40:51 UTC 2013"/> <info name="HostName" value="localhost.localdomain"/> <info name="Architecture" value="x86_64"/> <object type="Socket" os_index="0" cpuset="0x0000000f" complete_cpuset="0x0000000f" online_cpuset="0x0000000f" allowed_cpuset="0x0000000f"> <info name="CPUModel" value="Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz"/> <info name="CPUType" value="x86_64"/> <object type="Cache" cpuset="0x0000000f" complete_cpuset="0x0000000f" online_cpuset="0x0000000f" allowed_cpuset="0x0000000f" cache_size="4194304" depth="3" cache_linesize="64" cache_associativity="16"> <object type="Cache" cpuset="0x00000003" complete_cpuset="0x00000003" online_cpuset="0x00000003" allowed_cpuset="0x00000003" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8"> <object type="Cache" cpuset="0x00000003" complete_cpuset="0x00000003" online_cpuset="0x00000003" allowed_cpuset="0x00000003" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8"> <object type="Core" os_index="0" cpuset="0x00000003" complete_cpuset="0x00000003" online_cpuset="0x00000003" allowed_cpuset="0x00000003"> <object type="PU" os_index="0" cpuset="0x00000001" complete_cpuset="0x00000001" online_cpuset="0x00000001" allowed_cpuset="0x00000001"> <object type="Misc" cpuset="0x00000001" complete_cpuset="0x00000001" online_cpuset="0x00000001" allowed_cpuset="0x00000001" name="9: 245"> <object type="Misc" cpuset="0x00000001" complete_cpuset="0x00000001" online_cpuset="0x00000001" allowed_cpuset="0x00000001" name="5: 245"> <object type="Misc" cpuset="0x00000001" complete_cpuset="0x00000001" online_cpuset="0x00000001" allowed_cpuset="0x00000001" name="4: 245"> <object type="Misc" cpuset="0x00000001" complete_cpuset="0x00000001" online_cpuset="0x00000001" allowed_cpuset="0x00000001" name="3: 245"> <object type="Misc" cpuset="0x00000001" complete_cpuset="0x00000001" online_cpuset="0x00000001" allowed_cpuset="0x00000001" name="2: 245"> <object type="Misc" cpuset="0x00000001" complete_cpuset="0x00000001" online_cpuset="0x00000001" allowed_cpuset="0x00000001" name="1: 245"> <object type="Misc" cpuset="0x00000001" complete_cpuset="0x00000001" online_cpuset="0x00000001" allowed_cpuset="0x00000001" name="10: 245"/> </object> </object> </object> </object> </object> </object> </object> <object type="PU" os_index="1" cpuset="0x00000002" complete_cpuset="0x00000002" online_cpuset="0x00000002" allowed_cpuset="0x00000002"> <object type="Misc" cpuset="0x00000002" complete_cpuset="0x00000002" online_cpuset="0x00000002" allowed_cpuset="0x00000002" name="9: 246"> <object type="Misc" cpuset="0x00000002" complete_cpuset="0x00000002" online_cpuset="0x00000002" allowed_cpuset="0x00000002" name="7: 245"> <object type="Misc" cpuset="0x00000002" complete_cpuset="0x00000002" online_cpuset="0x00000002" allowed_cpuset="0x00000002" name="6: 245"> <object type="Misc" cpuset="0x00000002" complete_cpuset="0x00000002" online_cpuset="0x00000002" allowed_cpuset="0x00000002" name="5: 246"> <object type="Misc" cpuset="0x00000002" complete_cpuset="0x00000002" online_cpuset="0x00000002" allowed_cpuset="0x00000002" name="4: 246"> <object type="Misc" cpuset="0x00000002" complete_cpuset="0x00000002" online_cpuset="0x00000002" allowed_cpuset="0x00000002" name="3: 246"> <object type="Misc" cpuset="0x00000002" complete_cpuset="0x00000002" online_cpuset="0x00000002" allowed_cpuset="0x00000002" name="2: 246"> <object type="Misc" cpuset="0x00000002" complete_cpuset="0x00000002" online_cpuset="0x00000002" allowed_cpuset="0x00000002" name="1: 246"> <object type="Misc" cpuset="0x00000002" complete_cpuset="0x00000002" online_cpuset="0x00000002" allowed_cpuset="0x00000002" name="10: 246"/> </object> </object> </object> </object> </object> </object> </object> </object> </object> </object> </object> </object> <object type="Cache" cpuset="0x0000000c" complete_cpuset="0x0000000c" online_cpuset="0x0000000c" allowed_cpuset="0x0000000c" cache_size="262144" depth="2" cache_linesize="64" cache_associativity="8"> <object type="Cache" cpuset="0x0000000c" complete_cpuset="0x0000000c" online_cpuset="0x0000000c" allowed_cpuset="0x0000000c" cache_size="32768" depth="1" cache_linesize="64" cache_associativity="8"> <object type="Core" os_index="1" cpuset="0x0000000c" complete_cpuset="0x0000000c" online_cpuset="0x0000000c" allowed_cpuset="0x0000000c"> <object type="PU" os_index="2" cpuset="0x00000004" complete_cpuset="0x00000004" online_cpuset="0x00000004" allowed_cpuset="0x00000004"> <object type="Misc" cpuset="0x00000004" complete_cpuset="0x00000004" online_cpuset="0x00000004" allowed_cpuset="0x00000004" name="7: 246"> <object type="Misc" cpuset="0x00000004" complete_cpuset="0x00000004" online_cpuset="0x00000004" allowed_cpuset="0x00000004" name="6: 246"/> </object> </object> <object type="PU" os_index="3" cpuset="0x00000008" complete_cpuset="0x00000008" online_cpuset="0x00000008" allowed_cpuset="0x00000008"> <object type="Misc" cpuset="0x00000008" complete_cpuset="0x00000008" online_cpuset="0x00000008" allowed_cpuset="0x00000008" name="8: 246"> <object type="Misc" cpuset="0x00000008" complete_cpuset="0x00000008" online_cpuset="0x00000008" allowed_cpuset="0x00000008" name="8: 245"/> </object> </object> </object> </object> </object> </object> </object> </object> </topology>