{"id":19867704,"url":"https://github.com/cwsmith/fc_tau_helloworld","last_synced_at":"2025-08-16T15:11:21.126Z","repository":{"id":93888993,"uuid":"186874476","full_name":"cwsmith/fc_tau_helloworld","owner":"cwsmith","description":"fortran-C tau helloworld example","archived":false,"fork":false,"pushed_at":"2019-05-19T23:02:19.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-01T00:39:14.394Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cwsmith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-15T17:33:31.000Z","updated_at":"2019-05-19T23:02:20.000Z","dependencies_parsed_at":"2023-04-26T15:01:57.080Z","dependency_job_id":null,"html_url":"https://github.com/cwsmith/fc_tau_helloworld","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cwsmith/fc_tau_helloworld","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwsmith%2Ffc_tau_helloworld","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwsmith%2Ffc_tau_helloworld/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwsmith%2Ffc_tau_helloworld/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwsmith%2Ffc_tau_helloworld/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cwsmith","download_url":"https://codeload.github.com/cwsmith/fc_tau_helloworld/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwsmith%2Ffc_tau_helloworld/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270728346,"owners_count":24635195,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T15:30:03.913Z","updated_at":"2025-08-16T15:11:21.099Z","avatar_url":"https://github.com/cwsmith.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Install Tau on Cori\n\n- Download the TAUv2.28.1 from tau.uoregon.edu/tau.tgz\n- Unpack in your home\n- Configure and install with\n\n```bash\nmodule unload darshan\n./configure -arch=craycnl  -bfd=download -dwarf=download  -iowrapper -unwind=download -mpi; make install\n```\n\n- Create an environment script for using Tau, `envTau.sh`, with the following\n  contents (adjust the path to tau bin dir):\n\n```bash\nmodule unload darshan\nexport PATH=/path/to/tau-2.28.1/craycnl/bin:$PATH \n```\n\n## Build, Run, and Profile a C++ Example\n\n```bash\nCC -g -dynamic zdravo.cc -o zdravo\nsalloc -N 1 -q debug -C knl -t 00:10:00\nsrun -n 1 tau_exec -ebs ./zdravo\n```\n\nThis produces `profile.0.0.0`.\n\n## Build, Run, and Profile Fortran/C Example\n\n```bash\nmake clean\nmake\nsalloc -N 1 -q debug -C knl -t 00:10:00\nsrun -n 5 tau_exec -ebs ./fc_simple \n```\n\nThis produces profile files one for each rank.\n\n## Viewing/generating various profiles\n\n- For non-GUI viewing see `pprof --help` and `paraprof --help` for most up to date options. To view detailed location information for merged profiles sorted by time of exclusive functions (ones that can't be further subdivided):\n```bash\nparaprof --pack profile.ppk\npprof -am profile.ppk\n```\n\n- For GUI, open a `.ppk` or `profile.` file in paraprof GUI application.\n\n## Profiling options with `tau_exec`\n\n- To see just the MPI profile (only MPI functions): `srun -n 5 tau_exec ./fc_simple`\n\nFor 5 ranks here it gives something like:\n\n```\nFUNCTION SUMMARY (mean):\n---------------------------------------------------------------------------------------\n%Time    Exclusive    Inclusive       #Call      #Subrs  Inclusive Name\n              msec   total msec                          usec/call \n---------------------------------------------------------------------------------------\n100.0       28,019       28,160           1         105   28160572 .TAU application\n  0.3           77           77           1           0      77646 MPI_Finalize() \n  0.2           57           57           1           0      57283 MPI_Init() \n  0.0            6            6         100           0         66 MPI_Allreduce() \n  0.0       0.0206       0.0206           3           0          7 MPI_Comm_rank() \n```\nWhere we can assume that `.TAY application` refers to the whole code.\n\n- To see functions: `srun -n 5 tau_exec -ebs -ebs_resolution=function ./fc_simple`\n\n```\nFUNCTION SUMMARY (mean):\n---------------------------------------------------------------------------------------\n%Time    Exclusive    Inclusive       #Call      #Subrs  Inclusive Name\n              msec   total msec                          usec/call\n---------------------------------------------------------------------------------------\n100.0       27,977       33,508           1         105   33508939 .TAU application\n 64.8       21,720       21,720       434.4           0      50000 .TAU application =\u003e [CONTEXT] .TAU application =\u003e [SAMPLE] pass_by_val [{/global/u2/a/agntt/source_code/fc_tau_helloworld/capi.cc} {10}]\n 64.8       21,720       21,720       434.4           0      50000 [SAMPLE] pass_by_val [{/global/u2/a/agntt/source_code/fc_tau_helloworld/capi.cc} {10}]\n 16.3        5,466        5,466           1           0    5466531 MPI_Finalize()\n 12.4        4,170        4,170        83.4           0      50000 .TAU application =\u003e [CONTEXT] .TAU application =\u003e [SAMPLE] std::_Rb_tree_increment(std::_Rb_tree_node_base*) [clone .localalias.2] [{/b/tmp/peint/build-cray-gcc-20180126.202237.011353000/cray-gcc/BUILD/snos_objdir/x86_64-suse-linux/libstdc++-v3/src/c++98/../../../../../cray-gcc-7.3.0-201801270210.d61239fc6000b/libstdc++-v3/src/c++98/tree.cc} {0}]\n 12.4        4,170        4,170        83.4           0      50000 [SAMPLE] std::_Rb_tree_increment(std::_Rb_tree_node_base*) [clone .localalias.2] [{/b/tmp/peint/build-cray-gcc-20180126.202237.011353000/cray-gcc/BUILD/snos_objdir/x86_64-suse-linux/libstdc++-v3/src/c++98/../../../../../cray-gcc-7.3.0-201801270210.d61239fc6000b/libstdc++-v3/src/c++98/tree.cc} {0}]\n  4.1        1,370        1,370        27.4           0      50000 .TAU application =\u003e [CONTEXT] .TAU application =\u003e [SAMPLE] multimap_stats [{/global/u2/a/agntt/source_code/fc_tau_helloworld/capi.cc} {59}]\n```\nFor some reason some functions are listed twice. This shows the line in the faile where the functions starts. `MPI_Finalize` is a bit odd due to above results. \n\n- To see lines: `srun -n 5 tau_exec -ebs -ebs_resolution=lines ./fc_simple`\n\n```\nFUNCTION SUMMARY (mean):\n---------------------------------------------------------------------------------------\n%Time    Exclusive    Inclusive       #Call      #Subrs  Inclusive Name\n              msec   total msec                          usec/call\n---------------------------------------------------------------------------------------\n100.0       27,870       28,028           1         105   28028792 .TAU application\n 68.7       19,259       19,259       385.2           0      50000 .TAU application =\u003e [CONTEXT] .TAU application =\u003e [SAMPLE] pass_by_val [{/global/u2/a/agntt/source_code/fc_tau_helloworld/capi.cc} {43}]\n 68.7       19,259       19,259       385.2           0      50000 [SAMPLE] pass_by_val [{/global/u2/a/agntt/source_code/fc_tau_helloworld/capi.cc} {43}]\n 10.7        3,000        3,000          60           0      50000 .TAU application =\u003e [CONTEXT] .TAU application =\u003e [SAMPLE] std::_Rb_tree_increment(std::_Rb_tree_node_base*) [clone .localalias.2] [{/b/tmp/peint/build-cray-gcc-20180126.202237.011353000/cray-gcc/BUILD/snos_objdir/x86_64-suse-linux/libstdc++-v3/src/c++98/../../../../../cray-gcc-7.3.0-201801270210.d61239fc6000b/libstdc++-v3/src/c++98/tree.cc} {65}]\n 10.7        3,000        3,000          60           0      50000 [SAMPLE] std::_Rb_tree_increment(std::_Rb_tree_node_base*) [clone .localalias.2] [{/b/tmp/peint/build-cray-gcc-20180126.202237.011353000/cray-gcc/BUILD/snos_objdir/x86_64-suse-linux/libstdc++-v3/src/c++98/../../../../../cray-gcc-7.3.0-201801270210.d61239fc6000b/libstdc++-v3/src/c++98/tree.cc} {65}]\n  8.4        2,350        2,350          47           0      50000 .TAU application =\u003e [CONTEXT] .TAU application =\u003e [SAMPLE] pass_by_val [{/global/u2/a/agntt/source_code/fc_tau_helloworld/capi.cc} {42}]\n  8.4        2,350        2,350          47           0      50000 [SAMPLE] pass_by_val [{/global/u2/a/agntt/source_code/fc_tau_helloworld/capi.cc} {42}]\n  5.1        1,420        1,420        28.4           0      50000 .TAU application =\u003e [CONTEXT] .TAU application =\u003e [SAMPLE] multimap_stats [{/global/u2/a/agntt/source_code/fc_tau_helloworld/capi.cc} {79}]\n  5.1        1,420        1,420        28.4           0      50000 [SAMPLE] multimap_stats [{/global/u2/a/agntt/source_code/fc_tau_helloworld/capi.cc} {79}]\n  1.9          529          529        10.6           0      50000 .TAU application =\u003e [CONTEXT] .TAU application =\u003e [SAMPLE] std::_Rb_tree_increment(std::_Rb_tree_node_base*) [clone .localalias.2] [{/b/tmp/peint/build-cray-gcc-20180126.202237.011353000/cray-gcc/BUILD/snos_objdir/x86_64-suse-linux/libstdc++-v3/src/c++98/../../../../../cray-gcc-7.3.0-201801270210.d61239fc6000b/libstdc++-v3/src/c++98/tree.cc} {71}]\n  1.9          529          529        10.6           0      50000 [SAMPLE] std::_Rb_tree_increment(std::_Rb_tree_node_base*) [clone .localalias.2] [{/b/tmp/peint/build-cray-gcc-20180126.202237.011353000/cray-gcc/BUILD/snos_objdir/x86_64-suse-linux/libstdc++-v3/src/c++98/../../../../../cray-gcc-7.3.0-201801270210.d61239fc6000b/libstdc++-v3/src/c++98/tree.cc} {71}]\n```\n\n- `TAU_CALLPATH` is an option to view the function chain that called a particular function, chain length is adjusted with `TAU_CALLPATH_DEPTH`. It worked with instrumentation but doesn't seem to with `tau_exec`.\n\n- `EBS_UNWIND` - unwinds the callstack; just the profile is not more informative but seems that call graph in the GUI is.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcwsmith%2Ffc_tau_helloworld","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcwsmith%2Ffc_tau_helloworld","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcwsmith%2Ffc_tau_helloworld/lists"}