BRL-CAD implements support for rendering of NURBS representation geometry. If you import a solid 3DM or STEP format model into BRL-CAD, it will import as BREP/NURBS geometry. Opening that geometry in BRL-CAD's MGED editor will tell you what objects are available and our 'rt' tool will raytrace it. When geometry is ray traced, it first goes through a ''prep'' phase and then it starts shooting rays. Our prep phase is entirely unoptimized so we'd like to know where all the time is presently being spent during prep..
This task involves importing some NURBS geometry into BRL-CAD and ray tracing that geometry with a profiler watching our prep performance. Any profiler will do, including gprof, but a performance monitor like oprofile or the Mac ''Instruments'' application (or Shark) are preferred.
Learning how to use a profiler is beyond the scope of this task, so it make take you considerably longer to provide us with useful information if you've never run a profiler before.
To capture prep performance, you will need to import some fairly complex geometry. You should be able to search google with ''filetype:3dm'' or ''filetype:step'' or find something on grabcad.com to import
Running ''tops'' within mged will tell you what geometry is available for rendering.
Running ''rt -o file.png -s32'' on the system command line (not inside mged) should minimize the ray overhead or you can specifically isolate the prep phase we care about. Prep is the time between when rt is run where it opens a window until the first pixels are fired and pixels start filling in.
File name/URL | File size | Date submitted | |
---|---|---|---|
perf.data-normal | 5.3 MB | December 18 2014 02:40 UTC | |
perf.data-callgraph.gz | 3.8 MB | December 18 2014 02:41 UTC | |
brlcad-rt-prep-callgraph.svg | 224.3 KB | December 18 2014 02:41 UTC | |
rt_prep.c | 282 bytes | December 18 2014 02:42 UTC | |
nurbs_tests.g | 3.2 MB | December 18 2014 02:43 UTC |
I would like to work on this task.
This task has been assigned to Andromeda Galaxy. You have 100 hours to complete this task, good luck!
The work on this task is ready to be reviewed.
I compiled rt_prep.c and used the resultant executable to (mostly) isolate the prep phase. I used nurbs_tests.g as the test database: since I had trouble finding good complex NURBS geometry, I used these basic ones that d_rossberg pointed me at, cloned a number of times to increase the runtime of prep, and, therefore, the amount of data collected by the statistical profiler.
For profiling, I used the linux `perf' tool --- somewhat similar to oprofile for this use case --- and generated one ``basic'' perf data file that just shows the total amount of time spent in each function by itself (perf.data-normal) as well as one that includes a call graph (perf.data-callgraph.gz, gzipped because otherwise it wouldn't fit in Melange's file size limit). Finally, brlcad-rt-prep-callgraph.svg is a rendering of the call graph prepared by the gprof2dot tool.
Congratulations, this task has been completed successfully.
Very comprehensive, nicely done! Thanks for going above and beyond too, providing the gprof2dot tool -- very useful visualization.