Is there better documentation for the Fortran API? #630
Replies: 2 comments
-
Hi @rhdtownsend, unfortunately I don't have much more Fortran-specific documentation for Caliper aside from the Fortran support chapter and the example apps. However much of the general annotation API documentation also applies to Fortran, which simply wraps the C functions. To answer your specific questions, the To annotate nested loops you can simply add another loop region with a name like "inner loop" inside the main loop and create another iteration attribute for this loop. This should do it:
Results will depend on the Caliper measurement recipe. If you record a trace you will see two iteration attributes for inner-loop regions, Note that the loop annotations are intended for high-level loops, I wouldn't recommend annotating tight inner loops as that could cause some overhead. Hope this helps! Feel free to reach out if you have any further questions. |
Beta Was this translation helpful? Give feedback.
-
Thanks for this detailed reply, David -- and thanks also for your work on Caliper! Rich |
Beta Was this translation helpful? Give feedback.
-
I'm keen to use Caliper to instrument my Fortran codes; however, I'm having trouble finding the information I need in the main documentation site (https://software.llnl.gov/Caliper/index.html).
For instance, the Fortran demonstration given at https://software.llnl.gov/Caliper/FortranSupport.html shows how to annotate a loop:
However, the pair of functions, cali_find_attribute() and cali_make_loop_iteration_attribute(), are not documented anywhere else. What does the 'mainloop' argument to the latter function do? Changing it to other values seems to have no effect to this code, and I therefore can't see how Caliper knows that iter_attribute 'belongs' to loop_attribute (in that iter_attribute counts the iterations of loop_attribute).
Also, how would one go about annotating a nested pair of loops? Do I need two separate loop and iter attributes? How do I avoid ending up with the same loop attribute when I call cali_find_attribute('loop') twice?
Beta Was this translation helpful? Give feedback.
All reactions