├── LICENSE ├── README ├── bfdprof ├── README ├── annotate_objdump.c ├── bfdprof.c ├── configure └── makefile.in ├── counters ├── knl_core.h ├── knl_uncore.h ├── power8_core.h ├── power9_core.h ├── skylake_core.h ├── skylake_uncore.h ├── thunderx2_core.h └── zen2_core.h ├── ctx ├── README ├── configure ├── fortran_wrappers.c ├── hpm.c ├── init_part1.c ├── init_part2.c ├── makefile.in ├── mpitrace.c ├── mpitrace.h ├── mpitrace_common.c ├── mpitrace_ids.h └── mpitrace_sortx.c ├── hpmprof ├── README ├── configure ├── fortran_wrappers.c ├── hpmprof.c ├── init_part1.c ├── init_part2.c ├── makefile.in ├── mpitrace.c ├── mpitrace.h ├── mpitrace_common.c ├── mpitrace_ids.h └── mpitrace_sortx.c ├── mpi_examples ├── README ├── hello.c ├── hi.f90 ├── makefile ├── mixed.c └── sub.f90 ├── nvtx ├── README ├── add_nvtx.c ├── configure ├── fortran_wrappers.c ├── init_part1.c ├── init_part2.c ├── makefile.in ├── mpitrace.c ├── mpitrace.h ├── mpitrace_common.c ├── mpitrace_ids.h ├── mpitrace_sortx.c ├── ref_fortran_wrappers.c └── ref_mpitrace.c ├── roctx ├── README ├── add_roctx.c ├── configure ├── fortran_wrappers.c ├── init_part1.c ├── init_part2.c ├── makefile ├── makefile.in ├── mpitrace.c ├── mpitrace.h ├── mpitrace_common.c ├── mpitrace_ids.h ├── mpitrace_sortx.c ├── ref_fortran_wrappers.c └── ref_mpitrace.c ├── serial_hpm ├── README ├── check_event_list.c ├── configure ├── hpm.c ├── makefile.in └── simple.c ├── serial_hpmprof ├── README ├── configure ├── hpmprof.c ├── main.c ├── makefile.in └── sub.c ├── src ├── HardwareCounters.txt ├── README ├── configure ├── env_variables.txt ├── fortran_wrappers.c ├── hpm.c ├── init_part1.c ├── init_part2.c ├── makefile.in ├── mpitrace.c ├── mpitrace.h ├── mpitrace_common.c ├── mpitrace_ids.h └── mpitrace_sortx.c ├── traceview ├── README ├── chop_by_rank.c ├── chop_by_time.c ├── glui-2.36 │ ├── src │ │ ├── LICENSE.txt │ │ ├── algebra3.cpp │ │ ├── algebra3.h │ │ ├── arcball.cpp │ │ ├── arcball.h │ │ ├── doc │ │ │ ├── doxygen.cfg │ │ │ ├── glui_manual.doc │ │ │ └── glui_manual.pdf │ │ ├── example │ │ │ ├── example1.cpp │ │ │ ├── example2.cpp │ │ │ ├── example3.cpp │ │ │ ├── example4.cpp │ │ │ ├── example5.cpp │ │ │ └── example6.cpp │ │ ├── glui.cpp │ │ ├── glui_add_controls.cpp │ │ ├── glui_bitmap_img_data.cpp │ │ ├── glui_bitmaps.cpp │ │ ├── glui_button.cpp │ │ ├── glui_checkbox.cpp │ │ ├── glui_column.cpp │ │ ├── glui_commandline.cpp │ │ ├── glui_control.cpp │ │ ├── glui_edittext.cpp │ │ ├── glui_filebrowser.cpp │ │ ├── glui_img_checkbox_0.c │ │ ├── glui_img_checkbox_0_dis.c │ │ ├── glui_img_checkbox_1.c │ │ ├── glui_img_checkbox_1_dis.c │ │ ├── glui_img_downarrow.c │ │ ├── glui_img_leftarrow.c │ │ ├── glui_img_listbox_down.c │ │ ├── glui_img_listbox_down.ppm │ │ ├── glui_img_listbox_up.c │ │ ├── glui_img_listbox_up.ppm │ │ ├── glui_img_listbox_up_dis.c │ │ ├── glui_img_listbox_up_dis.ppm │ │ ├── glui_img_radiobutton_0.c │ │ ├── glui_img_radiobutton_0_dis.c │ │ ├── glui_img_radiobutton_1.c │ │ ├── glui_img_radiobutton_1_dis.c │ │ ├── glui_img_rightarrow.c │ │ ├── glui_img_spindown_0.c │ │ ├── glui_img_spindown_1.c │ │ ├── glui_img_spindown_dis.c │ │ ├── glui_img_spinup_0.c │ │ ├── glui_img_spinup_1.c │ │ ├── glui_img_spinup_dis.c │ │ ├── glui_img_uparrow.c │ │ ├── glui_internal.h │ │ ├── glui_internal_control.h │ │ ├── glui_list.cpp │ │ ├── glui_listbox.cpp │ │ ├── glui_mouse_iaction.cpp │ │ ├── glui_node.cpp │ │ ├── glui_panel.cpp │ │ ├── glui_radio.cpp │ │ ├── glui_rollout.cpp │ │ ├── glui_rotation.cpp │ │ ├── glui_scrollbar.cpp │ │ ├── glui_separator.cpp │ │ ├── glui_spinner.cpp │ │ ├── glui_statictext.cpp │ │ ├── glui_string.cpp │ │ ├── glui_textbox.cpp │ │ ├── glui_translation.cpp │ │ ├── glui_tree.cpp │ │ ├── glui_treepanel.cpp │ │ ├── glui_window.cpp │ │ ├── include │ │ │ └── GL │ │ │ │ └── glui.h │ │ ├── makefile │ │ ├── quaternion.cpp │ │ ├── quaternion.h │ │ ├── readme.txt │ │ ├── tools │ │ │ ├── ppm.cpp │ │ │ ├── ppm.h │ │ │ └── ppm2array.cpp │ │ ├── viewmodel.cpp │ │ └── viewmodel.h │ └── www │ │ ├── image1.png │ │ ├── index.html │ │ ├── screen2.png │ │ ├── screen3.png │ │ ├── screen4.png │ │ ├── title.jpg │ │ └── valid-html401.png ├── laghos.trc ├── makefile ├── makefile.mac ├── makefile.power9 ├── mpitrace_ids.h ├── mpitrace_sortx.c └── traceview.cpp ├── util ├── README ├── makefile ├── readsparse.c └── translate.py └── vprof ├── README ├── vprof_bfd.c └── vprof_static.c /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 International Business Machines 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /bfdprof/README: -------------------------------------------------------------------------------- 1 | This directory has utilities to analyze program sampling data : 2 | 3 | bfdprof your.exe hpm_histogram.jobid.rank >source_profile.txt 4 | provides statement-level annotation and function-level summaries 5 | 6 | annotate_objdump your.exe hpm_histogram.jobid.rank >asm_profile.txt 7 | provides annotation at the assembly level : hits per instruction address 8 | 9 | Your executable file should be built with options that include "-g" so the 10 | tools can translate from instruction address to source file and line number. 11 | 12 | Both tools work with program-sampling histograms produced by either of two 13 | mechanisms : (1) hardware-counter interrupts generated via libhpmprof.so, 14 | or (2) interrupts generated by the profil() routine, which can be enabled 15 | with libmpitrace.so when it is built with the -DVPROF option. The hardware 16 | counter method is preferred, in which case the profiler outputs have names : 17 | hpm_histogram.jobid.rank. The interrupt handler for the hardware counter 18 | method has more capability, for example it can collect data on shared 19 | libraries. The profil() mechanism produces files with names : 20 | vmon.out.jobid.rank. Analysis is the same, using vmon.out.jobid.rank in 21 | place of hpm_histogram.jobid.rank in the examples above. The profil() routine 22 | uses unsigned short integers to hold the profile data, and so there can be 23 | buffer overflow if the number of hits exceeds 65536 at any instruction address. 24 | The hardware-counter method does not have that limitation. 25 | 26 | =============================================================================== 27 | Building / Installing 28 | 29 | To build bfdprof, you need GNU binutils development files. It is recommended 30 | to build these from source at ftp.gnu.org following directions in a section 31 | below. After ensuring that you have binutils installed, the following steps 32 | should build bfdprof and annotate_objdump : 33 | 34 | (1) ./configure --with-binutils=/path/to/binutils 35 | (2) edit makefile and ensure that the include and library paths are correct 36 | (3) make 37 | 38 | You can copy or move the bfdprof and annotate_objdump executables to a location 39 | in your PATH. 40 | 41 | =============================================================================== 42 | Building GNU binutils 43 | 44 | (1) get the latest GNU binutils from ftp.gnu.org 45 | (2) export CC=gcc; export CFLAGS="-g -O2 -fPIC" 46 | export CXX=g++; export CXXFLAGS="-g -O2 -fPIC" 47 | (3) configure --prefix=/path/to/binutils 48 | (4) make 49 | (5) edit libiberty/Makefile; set target_header_dir = ${prefix}/include 50 | (6) make install 51 | (7) cp bfd/config.h /path/to/binutils/include 52 | 53 | Note that steps (5) and (7) are required to get all components in place. 54 | 55 | =============================================================================== 56 | Note on interpretation of profile data 57 | 58 | The basic program-sampling data is a histogram with the count of profiler hits 59 | at each instruction address. The "annotate_objdump" utility displays this 60 | information directly. It is not always easy to associate an instruction 61 | address with a unique source-file and line number. The "bfdprof" utility 62 | uses methods from GNU binutils to do this; bfd_find_nearest_line() and 63 | bfd_find_inliner_info(). Interpretation can be quite challenging particularly 64 | for C++ codes that rely extensively on inlining of functions defined in header 65 | files. For a list of options try "bfdprof -h". By default the tool will 66 | attempt to unwind inlining, but you can control that for example : 67 | 68 | bfdprof -i 0 your.exe hpm_histogram.jobid.rank >source_profile.txt 69 | 70 | will disable unwinding of inlined functions. Also, a processor typically 71 | has many instructions in flight, possibly from multiple source lines, and 72 | so there is always some uncertainty when it comes to interpreting profiler 73 | outputs. It is recommended to profile for a time that is sufficient to 74 | collect enough samples to provide a useful snapshot of performance. One 75 | should not expect perfect line-by-line association of the profiler hits, 76 | but the source-level view is frequently quite useful in any case. 77 | 78 | -------------------------------------------------------------------------------- /bfdprof/configure: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | #parse command arguments 4 | config_args=$(/usr/bin/getopt -n $0 -l "help,with-binutils:" -o "hb:" -- "$@") 5 | eval set -- "$config_args" 6 | 7 | binutils_flag=0 8 | 9 | while true 10 | do 11 | case "$1" in 12 | -h|--help) 13 | echo "configure options :" 14 | echo "--help (prints this help message)" 15 | echo "--with-binutils=/path/to/binutils (required and must have sub-directories : lib,lib64,include)" 16 | exit;; 17 | 18 | -b|--with-binutils) 19 | binutils_flag=1 20 | binutils_path="$2" 21 | echo using binutils_path=$binutils_path 22 | shift 2;; 23 | 24 | --) 25 | shift 26 | break;; 27 | esac 28 | done 29 | 30 | if [ $binutils_flag == 0 ]; then 31 | echo GNU binutils is required : ./configure --with-binutils=/path/to/binutils 32 | exit 33 | fi 34 | 35 | cp makefile.in makefile 36 | 37 | if [ $binutils_flag == 1 ]; then 38 | # check for gnu binutils bfd components 39 | if [[ ! -z $binutils_path ]]; then 40 | echo -n testing for libbdf.a... 41 | if [ -f $binutils_path/lib/libbfd.a ]; then 42 | echo found 43 | else 44 | echo libbfd.a not found ... check your binutils path ... exiting 45 | exit 46 | fi 47 | 48 | echo -n testing for libiberty.a... 49 | if [ -f $binutils_path/lib64/libiberty.a ]; then 50 | echo found 51 | elif [ -f $binutils_path/lib/libiberty.a ]; then 52 | echo found 53 | else 54 | echo libiberty.a not found ... check your binutils path ... exiting 55 | exit 56 | fi 57 | 58 | echo -n testing for bfd.h... 59 | if [ -f $binutils_path/include/bfd.h ]; then 60 | echo found 61 | else 62 | echo bfd.h not found ... check your binutils path ... exiting 63 | exit 64 | fi 65 | 66 | echo -n testing for binutils config.h... 67 | if [ -f $binutils_path/include/config.h ]; then 68 | echo found 69 | else 70 | echo binutils config.h not found ... check your binutils path ... exiting 71 | exit 72 | fi 73 | 74 | x_binutils_path="$(echo $binutils_path | sed 's/\//\\\//g')" 75 | 76 | sed -i "s/#VPROF = -DVPROF/ VPROF = -DVPROF/g" makefile 77 | sed -i "s/BINUTILS_INSTALL_PATH/$x_binutils_path/g" makefile 78 | 79 | else 80 | 81 | echo "error : the configure option --with-binutils is required for vprof support" 82 | echo "example : ./configure --with-vprof --with-binutils=/path/to/binutils" 83 | exit 84 | 85 | fi 86 | 87 | fi 88 | 89 | echo "" 90 | echo "Edit \"makefile\" and ensure that the path for GNU binutils is set correctly" 91 | echo "To build bfdprof and annotate_objdump, type : make" 92 | echo "" 93 | 94 | -------------------------------------------------------------------------------- /bfdprof/makefile.in: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------ 2 | # set the path to your gnu binutils install 3 | #------------------------------------------------------------------------------ 4 | INC = -I BINUTILS_INSTALL_PATH/include 5 | LIB = -L BINUTILS_INSTALL_PATH/lib -lbfd -lsframe -L BINUTILS_INSTALL_PATH/lib64 -liberty -lz -ldl 6 | # ----------------------------------------------------------------------------- 7 | 8 | all: bfdprof annotate_objdump 9 | 10 | bfdprof : bfdprof.c 11 | gcc $(INC) -g -O3 bfdprof.c -o bfdprof $(LIB) 12 | 13 | annotate_objdump : annotate_objdump.c 14 | gcc $(INC) -g -O3 annotate_objdump.c -o annotate_objdump $(LIB) 15 | 16 | clean : 17 | rm -f *.o bfdprof annotate_objdump 18 | 19 | distclean : 20 | rm -f *.o bfdprof annotate_objdump makefile 21 | -------------------------------------------------------------------------------- /counters/knl_core.h: -------------------------------------------------------------------------------- 1 | 2 | // KNL core has 3 fixed counters and 2 programmable counters 3 | 4 | #define NUM_COUNTERS 5 5 | #define MAX_GROUPS 5 6 | 7 | struct eventStruct { 8 | char * name; 9 | char * label; 10 | }; 11 | 12 | struct groupStruct { 13 | struct eventStruct event[NUM_COUNTERS]; 14 | }; 15 | 16 | 17 | struct groupStruct CounterGroup[] = 18 | { 19 | // group 0: 20 | { 21 | "perf::cycles", "processor cycles", 22 | "perf::ref-cycles", "cycles at the reference frequency", 23 | "perf::instructions", "instructions completed", 24 | "UOPS_RETIRED:SCALAR_SIMD", "counts scalar SSE, AVX, AVX2, AVX-512 micro-ops", 25 | "UOPS_RETIRED:PACKED_SIMD", "counts packed SSE, AVX, AVX2, AVX-512 micro-ops" 26 | }, 27 | // group 1: 28 | { 29 | "perf::cycles", "processor cycles", 30 | "perf::ref-cycles", "cycles at the reference frequency", 31 | "perf::instructions", "instructions completed", 32 | "MEM_UOPS_RETIRED:ALL_LOADS", "counts all the load micro-ops retired", 33 | "MEM_UOPS_RETIRED:ALL_STORES", "counts all the store micro-ops retired" 34 | }, 35 | // group 2: 36 | { 37 | "perf::cycles", "processor cycles", 38 | "perf::ref-cycles", "cycles at the reference frequency", 39 | "perf::instructions", "instructions completed", 40 | "MEM_UOPS_RETIRED:L1_MISS_LOADS", "counts load micro-ops that missed in L1", 41 | "MEM_UOPS_RETIRED:L2_MISS_LOADS", "counts load micro-ops that missed in L2" 42 | }, 43 | // group 3: 44 | { 45 | "perf::cycles", "processor cycles", 46 | "perf::ref-cycles", "cycles at the reference frequency", 47 | "perf::instructions", "instructions completed", 48 | "perf::branch-instructions", "branch instructions", 49 | "perf::branch-misses", "branch instructions that were mis-predicted" 50 | }, 51 | // group 4: 52 | { 53 | "perf::cycles", "processor cycles", 54 | "perf::ref-cycles", "cycles at the reference frequency", 55 | "perf::instructions", "instructions completed", 56 | "perf::l1-icache-loads", "all instruction fetches", 57 | "perf::l1-icache-load-misses", "instruction fetches that missed the I-cache" 58 | } 59 | }; 60 | -------------------------------------------------------------------------------- /counters/knl_uncore.h: -------------------------------------------------------------------------------- 1 | #define NUM_COUNTERS 6 2 | #define MAX_GROUPS 3 3 | 4 | struct eventStruct { 5 | char * name; 6 | char * label; 7 | }; 8 | 9 | struct groupStruct { 10 | struct eventStruct event[NUM_COUNTERS]; 11 | }; 12 | 13 | 14 | struct groupStruct CounterGroup[] = 15 | { 16 | // group 0: 17 | { 18 | "knl_unc_imc0::UNC_M_CAS_COUNT:RD:cpu=0", "reads from imc0 cpu=0", 19 | "knl_unc_imc1::UNC_M_CAS_COUNT:RD:cpu=0", "reads from imc1 cpu=0", 20 | "knl_unc_imc2::UNC_M_CAS_COUNT:RD:cpu=0", "reads from imc2 cpu=0", 21 | "knl_unc_imc3::UNC_M_CAS_COUNT:RD:cpu=0", "reads from imc3 cpu=0", 22 | "knl_unc_imc4::UNC_M_CAS_COUNT:RD:cpu=0", "reads from imc4 cpu=0", 23 | "knl_unc_imc5::UNC_M_CAS_COUNT:RD:cpu=0", "reads from imc5 cpu=0" 24 | }, 25 | // group 1 26 | { 27 | "knl_unc_imc0::UNC_M_CAS_COUNT:WR:cpu=0", "writes to imc0 cpu=0", 28 | "knl_unc_imc1::UNC_M_CAS_COUNT:WR:cpu=0", "writes to imc1 cpu=0", 29 | "knl_unc_imc2::UNC_M_CAS_COUNT:WR:cpu=0", "writes to imc2 cpu=0", 30 | "knl_unc_imc3::UNC_M_CAS_COUNT:WR:cpu=0", "writes to imc3 cpu=0", 31 | "knl_unc_imc4::UNC_M_CAS_COUNT:WR:cpu=0", "writes to imc4 cpu=0", 32 | "knl_unc_imc5::UNC_M_CAS_COUNT:WR:cpu=0", "writes to imc5 cpu=0" 33 | }, 34 | // group 2 35 | { 36 | "knl_unc_imc0::UNC_M_CAS_COUNT:RD:cpu=0", "reads from imc0 cpu=0", 37 | "knl_unc_imc1::UNC_M_CAS_COUNT:WR:cpu=0", "writes to imc1 cpu=0", 38 | "knl_unc_imc2::UNC_M_CAS_COUNT:RD:cpu=0", "reads from imc2 cpu=0", 39 | "knl_unc_imc3::UNC_M_CAS_COUNT:WR:cpu=0", "writes to imc3 cpu=0", 40 | "knl_unc_imc4::UNC_M_CAS_COUNT:RD:cpu=0", "reads from imc4 cpu=0", 41 | "knl_unc_imc5::UNC_M_CAS_COUNT:WR:cpu=0", "writes to imc5 cpu=0" 42 | } 43 | }; 44 | -------------------------------------------------------------------------------- /counters/power9_core.h: -------------------------------------------------------------------------------- 1 | #define NUM_COUNTERS 6 2 | #define MAX_GROUPS 10 3 | 4 | struct eventStruct { 5 | char * name; 6 | char * label; 7 | }; 8 | 9 | struct groupStruct { 10 | struct eventStruct event[NUM_COUNTERS]; 11 | }; 12 | 13 | 14 | struct groupStruct CounterGroup[] = 15 | { 16 | // group 0 17 | { 18 | "PM_FLOP_CMPL", "Floating Point instructions completed", 19 | "PM_ST_FIN", "Store instructions finished", 20 | "PM_LSU_FIN", "LSU instructions finished", 21 | "PM_CMPLU_STALL", "Completion stall cycles", 22 | "PM_RUN_INST_CMPL", "Run instructions completed", 23 | "PM_RUN_CYC", "Run cycles" 24 | }, 25 | 26 | // group 1 27 | { 28 | "PM_CMPLU_STALL_LSU", "Completion stall by LSU instruction", 29 | "PM_CMPLU_STALL_THRD", "Completion stall due to thread conflict", 30 | "PM_CMPLU_STALL_BRU", "Completion stall due to a Branch Unit", 31 | "PM_LD_MISS_L1", "Load missed L1", 32 | "PM_RUN_INST_CMPL", "Run instructions completed", 33 | "PM_RUN_CYC", "Run cycles" 34 | }, 35 | 36 | // group 2 37 | { 38 | "PM_ICT_NOSLOT_CYC", "Number of cycles the ICT has no itags assigned to this thread", 39 | "PM_BR_CMPL", "Branch instructions completed", 40 | "PM_LSU_FIN", "LSU instructions finished", 41 | "PM_CMPLU_STALL_EXEC_UNIT", "Completion stall due to execution units FXU/VSU/CRU", 42 | "PM_RUN_INST_CMPL", "Run instructions completed", 43 | "PM_RUN_CYC", "Run cycles" 44 | }, 45 | 46 | // group 3 47 | { 48 | "PM_INST_DISP", "Instructions dispatched", 49 | "PM_CMPLU_STALL", "Completion stall cycles", 50 | "PM_CMPLU_STALL_NTC_DISP_FIN", "Finish stall because the NTF instruction was one that must finish at dispatch", 51 | "PM_NTC_ALL_FIN", "Cycles after all instructions have finished to group completed", 52 | "PM_RUN_INST_CMPL", "Run instructions completed", 53 | "PM_RUN_CYC", "Run cycles" 54 | }, 55 | 56 | // group 4 57 | { 58 | "PM_NTC_FIN", "Cycles in which the oldest instruction in the pipeline finishes", 59 | "PM_CMPLU_STALL_OTHER_CMPL", "Instructions the core completed while this thread was stalled", 60 | "PM_1FLOP_CMPL", "VSU one-flop instructions completed", 61 | "PM_DATA_FROM_L2", "The data cache was reloaded from the local L2 due to a demand load", 62 | "PM_RUN_INST_CMPL", "Run instructions completed", 63 | "PM_RUN_CYC", "Run cycles" 64 | }, 65 | 66 | // group 5 67 | { 68 | "PM_DATA_FROM_L2", "The data cache was reloaded from the local L2 due to a demand load", 69 | "PM_DATA_FROM_L2MISS", "Demand load that missed in L2", 70 | "PM_DATA_FROM_L3MISS", "Demand load that missed in both L2 and L3", 71 | "PM_DATA_FROM_L3", "The data cache was reloaded from L3 due to a demand load", 72 | "PM_RUN_INST_CMPL", "Run instructions completed", 73 | "PM_RUN_CYC", "Run cycles" 74 | }, 75 | 76 | // group 6 77 | { 78 | "PM_LSU_FIN", "LSU instructions finished", 79 | "PM_VSU_FIN", "VSU instructions finished", 80 | "PM_FXU_FIN", "FXU instructions finished", 81 | "PM_BRU_FIN", "Branch instructions finished", 82 | "PM_RUN_INST_CMPL", "Run instructions completed", 83 | "PM_RUN_CYC", "Run cycles" 84 | }, 85 | 86 | // group 7 87 | { 88 | "PM_MEM_READ", "Reads from memory from this thread", 89 | "PM_MEM_PREF", "Prefetches from memory for this thread", 90 | "PM_MEM_RWITM", "Reads from memory with intent to modify from this thread", 91 | "PM_2FLOP_CMPL", "VSU two-flop instructions completed", 92 | "PM_RUN_INST_CMPL", "Run instructions completed", 93 | "PM_RUN_CYC", "Run cycles" 94 | }, 95 | 96 | // group 8 97 | { 98 | "PM_4FLOP_CMPL", "VSU four-flop instructions completed", 99 | "PM_L1_ICACHE_MISS", "L1 I-cache misses", 100 | "PM_LD_REF_L1", "L1 D-cache load references counted at finish, gated by reject", 101 | "PM_LD_MISS_L1", "Load missed L1", 102 | "PM_RUN_INST_CMPL", "Run instructions completed", 103 | "PM_RUN_CYC", "Run cycles" 104 | }, 105 | 106 | // group 9 107 | { 108 | "PM_8FLOP_CMPL", "VSU eight-flop instructions completed", 109 | "PM_ST_CMPL", "Stores completed", 110 | "PM_L3_LD_PREF", "L3 load prefetch from a hardware or software stream", 111 | "PM_L3_SW_PREF", "L3 load prefetch from a software stream", 112 | "PM_RUN_INST_CMPL", "Run instructions completed", 113 | "PM_RUN_CYC", "Run cycles" 114 | } 115 | 116 | }; 117 | -------------------------------------------------------------------------------- /counters/skylake_core.h: -------------------------------------------------------------------------------- 1 | #define NUM_COUNTERS 6 2 | #define MAX_GROUPS 5 3 | 4 | struct eventStruct { 5 | char * name; 6 | char * label; 7 | }; 8 | 9 | struct groupStruct { 10 | struct eventStruct event[NUM_COUNTERS]; 11 | }; 12 | 13 | 14 | struct groupStruct CounterGroup[] = 15 | { 16 | // group 0: 17 | { 18 | "perf::cycles", "processor cycles", 19 | "perf::ref-cycles", "cycles at the reference frequency", 20 | "perf::instructions", "instructions completed", 21 | "perf::branch-instructions", "branch instructions", 22 | "MEM_INST_RETIRED:ALL_LOADS", "load instructions retired", 23 | "MEM_INST_RETIRED:ALL_STORES", "store instructions retired" 24 | }, 25 | // group 1: 26 | { 27 | "perf::ref-cycles", "cycles at the reference frequency", 28 | "perf::instructions", "instructions completed", 29 | "FP_ARITH:SCALAR_SINGLE", "scalar 32-bit floating point instructions", 30 | "FP_ARITH:SCALAR_DOUBLE", "scalar 64-bit floating point instructions", 31 | "FP_ARITH:256B_PACKED_SINGLE", "simd instructions using eight floats", 32 | "FP_ARITH:256B_PACKED_DOUBLE", "simd instructions using four doubles" 33 | }, 34 | // group 2: 35 | { 36 | "perf::ref-cycles", "cycles at the reference frequency", 37 | "perf::instructions", "instructions completed", 38 | "FP_ARITH:128B_PACKED_SINGLE", "simd instructions using four floats", 39 | "FP_ARITH:128B_PACKED_DOUBLE", "simd instructions using two doubles", 40 | "FP_ARITH:512B_PACKED_SINGLE", "simd instructions using 16 floats", 41 | "FP_ARITH:512B_PACKED_DOUBLE", "simd instructions using 8 doubles" 42 | }, 43 | // group 3: 44 | { 45 | "perf::ref-cycles", "cycles at the reference frequency", 46 | "perf::instructions", "instructions completed", 47 | "perf::l1-dcache-loads", "load instructions", 48 | "perf::l1-dcache-stores", "store instructions", 49 | "perf::l1-dcache-load-misses", "loads that missed the L1 data cache", 50 | "ARITH:DIVIDER_ACTIVE", "cycles doing division and square roots" 51 | }, 52 | // group 4: 53 | { 54 | "CYCLE_ACTIVITY:STALLS_TOTAL", "total execution stalls", 55 | "CYCLE_ACTIVITY:STALLS_L1D_MISS", "stalls waiting for L1 cache miss demand load", 56 | "CYCLE_ACTIVITY:STALLS_L2_MISS", "stalls waiting for L2 cache miss demand load", 57 | "CYCLE_ACTIVITY:STALLS_L3_MISS", "stalls waiting for L3 cache miss demand load", 58 | "INSTRUCTIONS_RETIRED", "instructions retired", 59 | "UNHALTED_REFERENCE_CYCLES", "cycles at the reference frequency" 60 | } 61 | }; 62 | -------------------------------------------------------------------------------- /counters/skylake_uncore.h: -------------------------------------------------------------------------------- 1 | #define NUM_COUNTERS 6 2 | #define MAX_GROUPS 6 3 | 4 | struct eventStruct { 5 | char * name; 6 | char * label; 7 | }; 8 | 9 | struct groupStruct { 10 | struct eventStruct event[NUM_COUNTERS]; 11 | }; 12 | 13 | 14 | struct groupStruct CounterGroup[] = 15 | { 16 | // group 0: 17 | { 18 | "skx_unc_imc0::UNC_M_CAS_COUNT:RD:cpu=0", "reads from imc0 cpu=0", 19 | "skx_unc_imc1::UNC_M_CAS_COUNT:RD:cpu=0", "reads from imc1 cpu=0", 20 | "skx_unc_imc2::UNC_M_CAS_COUNT:RD:cpu=0", "reads from imc2 cpu=0", 21 | "skx_unc_imc3::UNC_M_CAS_COUNT:RD:cpu=0", "reads from imc3 cpu=0", 22 | "skx_unc_imc4::UNC_M_CAS_COUNT:RD:cpu=0", "reads from imc4 cpu=0", 23 | "skx_unc_imc5::UNC_M_CAS_COUNT:RD:cpu=0", "reads from imc5 cpu=0" 24 | }, 25 | // group 1: 26 | { 27 | "skx_unc_imc0::UNC_M_CAS_COUNT:RD:cpu=1", "reads from imc0 cpu=1", 28 | "skx_unc_imc1::UNC_M_CAS_COUNT:RD:cpu=1", "reads from imc1 cpu=1", 29 | "skx_unc_imc2::UNC_M_CAS_COUNT:RD:cpu=1", "reads from imc2 cpu=1", 30 | "skx_unc_imc3::UNC_M_CAS_COUNT:RD:cpu=1", "reads from imc3 cpu=1", 31 | "skx_unc_imc4::UNC_M_CAS_COUNT:RD:cpu=1", "reads from imc4 cpu=1", 32 | "skx_unc_imc5::UNC_M_CAS_COUNT:RD:cpu=1", "reads from imc5 cpu=1" 33 | }, 34 | // group 2: 35 | { 36 | "skx_unc_imc0::UNC_M_CAS_COUNT:WR:cpu=0", "writes to imc0 cpu=0", 37 | "skx_unc_imc1::UNC_M_CAS_COUNT:WR:cpu=0", "writes to imc1 cpu=0", 38 | "skx_unc_imc2::UNC_M_CAS_COUNT:WR:cpu=0", "writes to imc2 cpu=0", 39 | "skx_unc_imc3::UNC_M_CAS_COUNT:WR:cpu=0", "writes to imc3 cpu=0", 40 | "skx_unc_imc4::UNC_M_CAS_COUNT:WR:cpu=0", "writes to imc4 cpu=0", 41 | "skx_unc_imc5::UNC_M_CAS_COUNT:WR:cpu=0", "writes to imc5 cpu=0", 42 | }, 43 | // group 3: 44 | { 45 | "skx_unc_imc0::UNC_M_CAS_COUNT:WR:cpu=1", "writes to imc0 cpu=1", 46 | "skx_unc_imc1::UNC_M_CAS_COUNT:WR:cpu=1", "writes to imc1 cpu=1", 47 | "skx_unc_imc2::UNC_M_CAS_COUNT:WR:cpu=1", "writes to imc2 cpu=1", 48 | "skx_unc_imc3::UNC_M_CAS_COUNT:WR:cpu=1", "writes to imc3 cpu=1", 49 | "skx_unc_imc4::UNC_M_CAS_COUNT:WR:cpu=1", "writes to imc4 cpu=1", 50 | "skx_unc_imc5::UNC_M_CAS_COUNT:WR:cpu=1", "writes to imc5 cpu=1" 51 | }, 52 | // group 4: 53 | { 54 | "skx_unc_imc0::UNC_M_CAS_COUNT:RD:cpu=0", "reads from imc0 cpu=0", 55 | "skx_unc_imc1::UNC_M_CAS_COUNT:WR:cpu=0", "writes to imc1 cpu=0", 56 | "skx_unc_imc2::UNC_M_CAS_COUNT:RD:cpu=0", "reads from imc2 cpu=0", 57 | "skx_unc_imc3::UNC_M_CAS_COUNT:WR:cpu=0", "writes to imc3 cpu=0", 58 | "skx_unc_imc4::UNC_M_CAS_COUNT:RD:cpu=0", "reads from imc4 cpu=0", 59 | "skx_unc_imc5::UNC_M_CAS_COUNT:WR:cpu=0", "writes to imc5 cpu=0" 60 | }, 61 | // group 5: 62 | { 63 | "skx_unc_imc0::UNC_M_CAS_COUNT:RD:cpu=1", "reads from imc0 cpu=1", 64 | "skx_unc_imc1::UNC_M_CAS_COUNT:WR:cpu=1", "writes to imc1 cpu=1", 65 | "skx_unc_imc2::UNC_M_CAS_COUNT:RD:cpu=1", "reads from imc2 cpu=1", 66 | "skx_unc_imc3::UNC_M_CAS_COUNT:WR:cpu=1", "writes to imc3 cpu=1", 67 | "skx_unc_imc4::UNC_M_CAS_COUNT:RD:cpu=1", "reads from imc4 cpu=1", 68 | "skx_unc_imc5::UNC_M_CAS_COUNT:WR:cpu=1", "writes to imc5 cpu=1" 69 | } 70 | }; 71 | -------------------------------------------------------------------------------- /counters/thunderx2_core.h: -------------------------------------------------------------------------------- 1 | #define NUM_COUNTERS 5 2 | #define MAX_GROUPS 1 3 | 4 | struct eventStruct { 5 | char * name; 6 | char * label; 7 | }; 8 | 9 | struct groupStruct { 10 | struct eventStruct event[NUM_COUNTERS]; 11 | }; 12 | 13 | 14 | struct groupStruct CounterGroup[] = 15 | { 16 | // group 0: 17 | { 18 | "CPU_CYCLES", "processor cycles", 19 | "INST_RETIRED", "instructions retired", 20 | "MEM_ACCESS_RD", "load instructions", 21 | "MEM_ACCESS_WR", "store instructions", 22 | "BR_RETIRED", "branch instructions", 23 | } 24 | }; 25 | -------------------------------------------------------------------------------- /counters/zen2_core.h: -------------------------------------------------------------------------------- 1 | #define NUM_COUNTERS 4 2 | #define MAX_GROUPS 3 3 | 4 | struct eventStruct { 5 | char * name; 6 | char * label; 7 | }; 8 | 9 | struct groupStruct { 10 | struct eventStruct event[NUM_COUNTERS]; 11 | }; 12 | 13 | struct groupStruct CounterGroup[] = 14 | { 15 | // group 0: 16 | { 17 | "perf::cycles", "processor cycles", 18 | "perf::instructions", "instructions retired", 19 | "LS_DISPATCH:LD_DISPATCH", "load uops dispatched to load/store unit", 20 | "RETIRED_SSE_AVX_FLOPS:ANY", "weighted floating-point op count" 21 | }, 22 | // group 1: 23 | { 24 | "perf::cycles", "processor cycles", 25 | "perf::instructions", "instructions retired", 26 | "LS_DISPATCH:LD_DISPATCH", "load uops dispatched to load/store unit", 27 | "LS_DISPATCH:STORE_DISPATCH", "store uops dispatched to load/store unit" 28 | }, 29 | // group 2: 30 | { 31 | "perf::cycles", "processor cycles", 32 | "perf::instructions", "instructions retired", 33 | "perf::branches", "branch instructions retired", 34 | "perf::branch-misses", "mispredicted branch instructions retired", 35 | } 36 | }; 37 | -------------------------------------------------------------------------------- /ctx/README: -------------------------------------------------------------------------------- 1 | This directory has a version of the MPI wrappers that support profiling 2 | named disjoint code sections. This requires instrumenting the code : 3 | 4 | C/C++ : (use the extern "C" qualifier for declarations in C++ codes) 5 | extern "C" void mpitrace_Context_start(const char *); 6 | extern "C" void mpitrace_Context_stop(const char *); 7 | 8 | mpitrace_Context_start("phase1"); 9 | ... 10 | mpitrace_Context_stop("phase1"); 11 | etc. 12 | 13 | Fortran : 14 | call mpitrace_context_start('phase1') 15 | ... 16 | call mpitrace_context_stop('phase1') 17 | etc. 18 | 19 | The resulting mpi_profile files will contain MPI timing data specific to 20 | each named code section, in addition to an overall inclusive summary. 21 | 22 | The optional features that are included with this alternate version of 23 | libmpitrace.so are the same as those described the the README file located 24 | in the src directory. Please refer to that README for additional 25 | information. 26 | 27 | =============================================================================== 28 | Build Instructions 29 | 30 | Ensure that you have mpicc in your PATH and that the underlying compiler 31 | is gcc. This may require setting environment variables such as OMPI_CC=gcc 32 | or MPICH_CC=gcc. 33 | 34 | (1) ./configure 35 | (2) make 36 | 37 | This should build a version of libmpitrace.so that supports separate reports 38 | of MPI timing data in specific code blocks marked by the user. 39 | 40 | =============================================================================== 41 | Normal use 42 | 43 | Just add one line to your job script to pre-load libmpitrace.so. 44 | 45 | (1) export LD_PRELOAD=/path/to/libmpitrace.so 46 | (2) mpirun -np 1024 your.exe 47 | 48 | For more information please refer to the README in the src directory. 49 | -------------------------------------------------------------------------------- /ctx/configure: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #parse command arguments 4 | config_args=$(/usr/bin/getopt -n $0 -l "help,with-mpicc:,with-fortran:" -o "hw:f:" -- "$@") 5 | 6 | if [ $? -ne 0 ]; then 7 | echo check arguments : ./configure --help 8 | exit 9 | fi 10 | 11 | eval set -- "$config_args" 12 | 13 | mpicc_flag=0 14 | fortran_flag=1 15 | 16 | while true 17 | do 18 | case "$1" in 19 | -h|--help) 20 | echo "configure options :" 21 | echo "--help (prints this help message)" 22 | echo "--with-mpicc=your_mpi_compiler (needed only if your MPI compiler is not mpicc or Cray cc)" 23 | echo "--with-fortran=[yes|no] (default is \"yes\", specify \"no\" to wrap only the C interfaces to MPI)" 24 | echo "normal syntax : ./configure " 25 | exit;; 26 | 27 | -w|--with-mpicc) 28 | mpi_compiler="$2" 29 | shift 2;; 30 | 31 | -f|--with-fortran) 32 | fortran_option="$2" 33 | if [ ${fortran_option} != "no" ] && [ ${fortran_option} != "yes" ]; then 34 | echo error : specify --with-fortran=yes or --with-fortran=no ... exiting 35 | exit 36 | fi 37 | if [ $fortran_option == "no" ]; then 38 | fortran_flag=0; 39 | fi 40 | shift 2;; 41 | 42 | --) 43 | shift 44 | break;; 45 | esac 46 | done 47 | 48 | # if the user specifies --with-mpicc=mpi_compiler, use it, else use mpicc or Cray cc 49 | if [ $mpicc_flag == 1 ]; then 50 | MPICC=$( command -v $mpi_compiler ) 51 | if [ -z "$MPICC" ]; then 52 | echo ensure that $mpi_compiler is in your PATH and re-run the configure script ... exiting 53 | exit 54 | else 55 | if [ -x $MPICC ]; then 56 | MPI_BINDIR=`dirname $MPICC` 57 | echo found MPI C compiler = $MPICC 58 | compiler=`$mpi_compiler --version | head -n 1 | cut -b 1-3` 59 | if [ "$compiler" != "gcc" ]; then 60 | echo please set $mpi_compiler to use gcc as the C compiler and re-run the configure script ... exiting 61 | exit 62 | else 63 | cp makefile.in makefile 64 | sed -i "s/CC = mpicc/CC = $mpi_compiler/g" makefile 65 | fi 66 | else 67 | echo ensure that $mpi_compiler is in your PATH and re-run the configure script ... exiting 68 | exit 69 | fi 70 | fi 71 | else 72 | if [ -z ${CRAYPE_VERSION} ]; then 73 | MPICC=$( command -v mpicc ) 74 | if [ -z "$MPICC" ]; then 75 | echo ensure that mpicc is in your PATH and re-run the configure script ... exiting 76 | exit 77 | elif [ -x $MPICC ]; then 78 | MPI_BINDIR=`dirname $MPICC` 79 | echo found mpicc = $MPICC 80 | compiler=$(mpicc --version | head -n 1 | cut -b 1-3) 81 | if [ "$compiler" != "gcc" ]; then 82 | echo please set the mpicc command to use gcc as the C compiler and re-run the configure script 83 | echo example: "export OMPI_CC=gcc; or export MPICH_CC=gcc" ... exiting 84 | exit 85 | else 86 | cp makefile.in makefile 87 | fi 88 | fi 89 | else 90 | CRAYCC=$( command -v cc ) 91 | if [ -x $CRAYCC ]; then 92 | MPI_BINDIR=`dirname $CRAYCC` 93 | echo found cc = $CRAYCC 94 | compiler=$(cc --version | head -n 1 | cut -b 1-3) 95 | if [ "$compiler" != "gcc" ]; then 96 | echo please set the cc command to use gcc as the C compiler and re-run the configure script ... exiting 97 | exit 98 | else 99 | cp makefile.in makefile 100 | sed -i "s/CC = mpicc/CC = cc/g" makefile 101 | fi 102 | else 103 | echo ensure that cc is in your PATH and re-run the configure script ... exiting 104 | exit 105 | fi 106 | fi 107 | fi 108 | 109 | #check for inclusion of Fortran MPI profiling entry points 110 | MPICH_CMD=$MPI_BINDIR/mpichversion 111 | INTELMPI_CMD=$MPI_BINDIR/impi_info 112 | if [ ! -z "$MPICH_CMD" ] && [ -x $MPICH_CMD ]; then 113 | fortran_flag=0; 114 | fi 115 | if [ ! -z "$INTELMPI_CMD" ] && [ -x $INTELMPI_CMD ]; then 116 | fortran_flag=0; 117 | fi 118 | if [ $fortran_flag == "0" ]; then 119 | sed -i "s/ FNAME = / FNAME = -DSKIP_FORTRAN/g" makefile 120 | fi 121 | 122 | echo "To build the libmpitrace.so library, type : make libmpitrace.so" 123 | 124 | -------------------------------------------------------------------------------- /ctx/hpm.c: -------------------------------------------------------------------------------- 1 | ../src/hpm.c -------------------------------------------------------------------------------- /ctx/makefile.in: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------- 2 | # to build with vprof support, un-comment the -DVPROF option 3 | #------------------------------------------------------------- 4 | #VPROF = -DVPROF 5 | 6 | ifeq ($(VPROF),-DVPROF) 7 | VPROF_STATIC_OBJ = vprof_static.o 8 | VPROF_DYNAMIC_OBJ = vprof_bfd.o 9 | BFD_LIB = -L BINUTILS_INSTALL_PATH/lib -lbfd -L BINUTILS_INSTALL_PATH/lib64 -liberty -lz 10 | else 11 | VPROF_OBJ = 12 | BFD_LIB = 13 | endif 14 | 15 | #------------------------------------------------------------- 16 | # optionally add an underscore to all Fortran entry points 17 | #------------------------------------------------------------- 18 | FNAME = 19 | #FNAME = -DADD_UNDERSCORE 20 | 21 | #------------------------------------------------------------- 22 | # optionally use PAPI for hardware-counter interfaces 23 | #------------------------------------------------------------- 24 | PAPI_INC = -I PAPI_INSTALL_PATH/include 25 | PAPI_OBJ = PAPI_INSTALL_PATH/lib/libpapi.a 26 | 27 | #----------------------------------------------------------------------- 28 | # turn off -DHAS_INIT_THREAD if your MPI does not have MPI_Init_thread() 29 | #----------------------------------------------------------------------- 30 | CC = mpicc 31 | CFLAGS = -g -O -fPIC $(VPROF) -I. $(MPI_INC) $(FNAME) -DHAS_INIT_THREAD 32 | 33 | #------------------------------------------ 34 | # targets 35 | #------------------------------------------ 36 | default: shared #static 37 | 38 | static : libmpitrace.a #libmpihpm.a 39 | 40 | shared : libmpitrace.so #libmpihpm.so 41 | 42 | clean : 43 | rm -f *.a *.o *.so *.lst 44 | 45 | distclean : 46 | rm -f *.a *.o *.so *.lst makefile 47 | 48 | #------------------------------------------------------------------ 49 | # rules for the wrapper libraries - add support for vprof profiling 50 | #------------------------------------------------------------------ 51 | libmpitrace.a : mpitrace.o mpitrace_sortx.o $(VPROF_STATIC_OBJ) 52 | ar crv $@ mpitrace.o mpitrace_sortx.o $(VPROF_STATIC_OBJ) 53 | 54 | libmpihpm.a : mpihpm.o mpitrace_sortx.o hpm.o $(VPROF_STATIC_OBJ) 55 | ar crv $@ mpihpm.o mpitrace_sortx.o hpm.o $(VPROF_STATIC_OBJ) $(PAPI_OBJ) 56 | 57 | libmpitrace.so : mpitrace.o mpitrace_sortx.o $(VPROF_DYNAMIC_OBJ) 58 | $(CC) -o libmpitrace.so -shared mpitrace.o mpitrace_sortx.o $(VPROF_DYNAMIC_OBJ) $(BFD_LIB) 59 | 60 | libmpihpm.so : mpihpm.o mpitrace_sortx.o hpm.o $(VPROF_DYNAMIC_OBJ) 61 | $(CC) -o libmpihpm.so -shared mpihpm.o mpitrace_sortx.o hpm.o $(PAPI_OBJ) $(VPROF_DYNAMIC_OBJ) $(FLIB) $(BFD_LIB) 62 | 63 | #------------------------------------------ 64 | # rules for .o files 65 | #------------------------------------------ 66 | mpitrace.o : mpitrace.c mpitrace_common.c init_part1.c init_part2.c \ 67 | fortran_wrappers.c mpitrace.h 68 | $(CC) -c $(CFLAGS) mpitrace.c -o $@ 69 | 70 | mpihpm.o : mpitrace.c mpitrace_common.c init_part1.c init_part2.c \ 71 | fortran_wrappers.c mpitrace.h 72 | $(CC) -c -DHPM $(CFLAGS) mpitrace.c -o $@ 73 | 74 | mpitrace_sortx.o : mpitrace_sortx.c 75 | $(CC) -c $(CFLAGS) mpitrace_sortx.c -o $@ 76 | 77 | hpm.o : hpm.c 78 | $(CC) -c $(CFLAGS) -DUSE_MPI $(PAPI_INC) hpm.c -o $@ 79 | 80 | vprof_static.o : ../vprof/vprof_static.c 81 | $(CC) -c $(CFLAGS) -I BINUTILS_INSTALL_PATH/include ../vprof/vprof_static.c -o $@ 82 | 83 | vprof_bfd.o : ../vprof/vprof_bfd.c 84 | $(CC) -c $(CFLAGS) -I BINUTILS_INSTALL_PATH/include ../vprof/vprof_bfd.c -o $@ 85 | 86 | -------------------------------------------------------------------------------- /ctx/mpitrace_sortx.c: -------------------------------------------------------------------------------- 1 | ../src/mpitrace_sortx.c -------------------------------------------------------------------------------- /hpmprof/fortran_wrappers.c: -------------------------------------------------------------------------------- 1 | ../src/fortran_wrappers.c -------------------------------------------------------------------------------- /hpmprof/init_part1.c: -------------------------------------------------------------------------------- 1 | ../src/init_part1.c -------------------------------------------------------------------------------- /hpmprof/init_part2.c: -------------------------------------------------------------------------------- 1 | ../src/init_part2.c -------------------------------------------------------------------------------- /hpmprof/makefile.in: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------ 2 | # set include and library paths for papi and gnu binutils 3 | #------------------------------------------------------------------------------ 4 | 5 | HPM = -DHPMPROF -I PAPI_INSTALL_PATH/include -I BINUTILS_INSTALL_PATH/include 6 | PAPI_OBJ = PAPI_INSTALL_PATH/lib/libpapi.a 7 | BFD_LIB = -L BINUTILS_INSTALL_PATH/lib -lbfd -L BINUTILS_INSTALL_PATH/lib64 -liberty -lz 8 | 9 | #------------------------------------------------------------------------------ 10 | # use gcc to build the wrapper libraries 11 | # uncomment -DHAS_INIT_THREAD if your MPI does not support MPI_Init_thread() 12 | #------------------------------------------------------------------------------ 13 | SET_FREQ = -DCPU_MHZ=3000 # optionally set the CPU freq at compile time 14 | CC = mpicc 15 | CFLAGS = -g -O -fPIC $(VPROF) $(HPM) $(SET_FREQ) -I. $(MPI_INC) -DHAS_INIT_THREAD 16 | 17 | #------------------------------------------ 18 | # targets 19 | #------------------------------------------ 20 | default: shared # static 21 | 22 | static : libhpmprof.a 23 | 24 | shared : libhpmprof.so 25 | 26 | clean : 27 | rm -f *.a *.o *.so *.lst 28 | 29 | distclean : 30 | rm -f *.a *.o *.so *.lst makefile 31 | 32 | #------------------------------------------------------------------ 33 | # rules for the wrapper libraries 34 | #------------------------------------------------------------------ 35 | 36 | libhpmprof.a : mpitrace.o mpitrace_sortx.o hpmprof.o 37 | ar crv $@ mpitrace.o mpitrace_sortx.o hpmprof.o $(PAPI_OBJ) $(BFD_LIB) 38 | 39 | libhpmprof.so : mpitrace.o mpitrace_sortx.o hpmprof.o 40 | $(CC) -o libhpmprof.so -shared mpitrace.o mpitrace_sortx.o hpmprof.o $(BFD_LIB) $(PAPI_OBJ) 41 | 42 | #------------------------------------------ 43 | # rules for .o files 44 | #------------------------------------------ 45 | mpitrace.o : mpitrace.c mpitrace_common.c init_part1.c init_part2.c \ 46 | fortran_wrappers.c mpitrace.h 47 | $(CC) -c $(CFLAGS) $(F2C) mpitrace.c -o $@ 48 | 49 | mpitrace_sortx.o : mpitrace_sortx.c 50 | $(CC) -c $(CFLAGS) mpitrace_sortx.c -o $@ 51 | 52 | hpmprof.o : hpmprof.c 53 | $(CC) -c $(CFLAGS) $(F2C) hpmprof.c -o $@ 54 | 55 | -------------------------------------------------------------------------------- /hpmprof/mpitrace.c: -------------------------------------------------------------------------------- 1 | ../src/mpitrace.c -------------------------------------------------------------------------------- /hpmprof/mpitrace.h: -------------------------------------------------------------------------------- 1 | ../src/mpitrace.h -------------------------------------------------------------------------------- /hpmprof/mpitrace_common.c: -------------------------------------------------------------------------------- 1 | ../src/mpitrace_common.c -------------------------------------------------------------------------------- /hpmprof/mpitrace_ids.h: -------------------------------------------------------------------------------- 1 | ../src/mpitrace_ids.h -------------------------------------------------------------------------------- /hpmprof/mpitrace_sortx.c: -------------------------------------------------------------------------------- 1 | ../src/mpitrace_sortx.c -------------------------------------------------------------------------------- /mpi_examples/README: -------------------------------------------------------------------------------- 1 | You can use these simple examples to test the MPI wrappers. 2 | 3 | Requirements : mpicc and mpif90 from the same MPI distribution used to 4 | build ../src/libmpitrace.so . 5 | 6 | to build, type "make" 7 | 8 | to test : 9 | on most systems : export LD_PRELOAD=../src/libmpitrace.so 10 | for IBM Spectrum MPI : export OMPI_LD_PRELOAD_POSTPEND=../src/libmpitrace.so 11 | mpirun -np 4 ./hi 12 | mpirun -np 4 ./hello 13 | mpirun -np 4 ./mixed 14 | unset LD_PRELOAD (or unset OMPI_LD_PRELOAD_POSTPEND) 15 | 16 | Examine the mpi_profile output files and the sample codes, and ensure that 17 | the call counts for each MPI call are correct. In particular, MPI profile 18 | outputs for "mpirun -np 4 ./mixed" should look like this : 19 | 20 | Data for MPI rank 0 of 4: 21 | Times from MPI_Init() to MPI_Finalize(). 22 | ----------------------------------------------------------------------- 23 | MPI Routine #calls avg. bytes time(sec) 24 | ----------------------------------------------------------------------- 25 | MPI_Comm_rank 2 0.0 0.000 26 | MPI_Bcast 1 4.0 0.000 27 | ----------------------------------------------------------------- 28 | ... 29 | -------------------------------------------------------------------------------- /mpi_examples/hello.c: -------------------------------------------------------------------------------- 1 | /* Copyright IBM Corporation, 2019 2 | * author : Bob Walkup 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | int main(int argc, char * argv[]) 9 | { 10 | int myrank; 11 | MPI_Init(&argc, &argv); 12 | MPI_Comm_rank(MPI_COMM_WORLD, &myrank); 13 | printf("hello from rank %d\n", myrank); 14 | MPI_Finalize(); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /mpi_examples/hi.f90: -------------------------------------------------------------------------------- 1 | ! Copyright IBM Corporation, 2019 2 | ! author : Bob Walkup 3 | ! 4 | 5 | program main 6 | implicit none 7 | include 'mpif.h' 8 | integer myrank, info 9 | call mpi_init(info) 10 | call mpi_comm_rank(mpi_comm_world, myrank, info) 11 | print *, 'hi from rank ', myrank 12 | call mpi_finalize(info) 13 | end 14 | -------------------------------------------------------------------------------- /mpi_examples/makefile: -------------------------------------------------------------------------------- 1 | all : hi hello mixed 2 | 3 | clean : 4 | rm -f *.o hi hello mixed 5 | 6 | hi : hi.f90 7 | mpif90 -g hi.f90 -o hi 8 | 9 | hello : hello.c 10 | mpicc -g hello.c -o hello 11 | 12 | mixed : mixed.c sub.f90 13 | mpicc -c -g mixed.c 14 | mpif90 -c -g sub.f90 15 | mpif90 -g mixed.o sub.o -o mixed 16 | -------------------------------------------------------------------------------- /mpi_examples/mixed.c: -------------------------------------------------------------------------------- 1 | /* Copyright IBM Corporation, 2019 2 | * author : Bob Walkup 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | void sub_(void); 9 | 10 | int main(int argc, char * argv[]) 11 | { 12 | int myrank; 13 | MPI_Init(&argc, &argv); 14 | MPI_Comm_rank(MPI_COMM_WORLD, &myrank); 15 | printf("hello from rank %d\n", myrank); 16 | sub_(); 17 | MPI_Finalize(); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /mpi_examples/sub.f90: -------------------------------------------------------------------------------- 1 | ! Copyright IBM Corporation, 2019 2 | ! author : Bob Walkup 3 | ! 4 | 5 | subroutine sub() 6 | implicit none 7 | include 'mpif.h' 8 | integer myrank, val, info 9 | call mpi_comm_rank(mpi_comm_world, myrank, info) 10 | if (myrank == 0) then 11 | val = 1 12 | else 13 | val = -1 14 | end if 15 | call mpi_bcast(val, 1, mpi_integer, 0, mpi_comm_world, info) 16 | end 17 | -------------------------------------------------------------------------------- /nvtx/README: -------------------------------------------------------------------------------- 1 | This directory has MPI wrappers that are instrumented with nvtx 2 | markers. The idea is to preload the wrapper library for use with 3 | NVIDIA's profiling tools, thus making MPI calls visible in NVIDIA's 4 | tools for visual timeline analysis. The MPI wrappers also provide 5 | controls for cudaProfilerStart()/cudaProfilerStop(), including support 6 | for time-window profiling. This makes it possible to selectively 7 | profile a time-window without instrumenting the code. 8 | 9 | Requirements : CUDA, mpicc with gcc as the underlying compiler 10 | 11 | =============================================================================== 12 | Build/Install : 13 | 14 | (1) ./configure --with-cuda=/path/to/cuda 15 | (2) make libmpitrace.so 16 | 17 | =============================================================================== 18 | Typical use : 19 | 20 | (1) export LD_PRELOAD=/path/to/libmpitrace.so 21 | (2) mpirun -np 1024 ./helper.sh your.exe ... 22 | where the helper.sh script turns on nvprof for a selected rank 23 | (3) unset LD_PRELOAD 24 | 25 | NVIDIA's nvprof is a very powerful tool for analysis of GPU performance, 26 | but it can be invasive in the context of tightly-coupled MPI parallel 27 | applications. Instead of launching one instance of nvprof for every 28 | MPI rank, there will be less disruption if nvprof is used selectively 29 | for one specified rank, and a helper script can be used for that. An 30 | example of a helper script is shown below for openmpi : 31 | 32 | #!/bin/bash 33 | if [ $OMPI_COMM_WORLD_RANK = 31 ]; then 34 | if [ -f nvp.dat ]; then 35 | mv nvp.dat nvp.dat.bak 36 | fi 37 | /usr/local/cuda/bin/nvprof --export-profile nvp.dat "$@" 38 | else 39 | exec "$@" 40 | fi 41 | 42 | In this example, nvprof is turned on for MPI rank 31, and profile data 43 | is saved in a file "nvp.dat", with a backup made for any pre-existing 44 | "nvp.dat" file. One could be more specific about naming the nvprof 45 | output, using for example a timestamp or a jobid. 46 | 47 | With nvprof it can be advantageous to limit profiling to a specific code 48 | block using cudaProfilerStart()/cudaProfilerStop() or to a specified time 49 | window. The following illustrates the time-window profiling method, 50 | where the intent is to capture nvprof data for MPI rank 31 with a start 51 | time of 40 seconds after MPI_Init() and a stop time of 45 seconds after 52 | MPI_Init() : 53 | 54 | Job script : 55 | export PROFILE_BEGIN_TIME=40 56 | export PROFILE_END_TIME=45 57 | export PROFILE_RANK=31 58 | export SAVE_LIST=$PROFILE_RANK 59 | export LD_PRELOAD=/path/to/nvtx/libmpitrace.so 60 | mpirun -np 128 ./helper.sh your.exe [args] 61 | 62 | Helper script : 63 | #!/bin/bash 64 | if [ $OMPI_COMM_WORLD_RANK = $PROFILE_RANK ]; then 65 | if [ -f nvp.dat ]; then 66 | mv nvp.dat nvp.dat.bak 67 | fi 68 | /usr/local/cuda/bin/nvprof --profile-from-start off --export-profile nvp.dat "$@" 69 | else 70 | exec "$@" 71 | fi 72 | 73 | With the time-window profiling method, it is not necessary to instrument 74 | the code with calls to cudaProfilerStart()/cudaProfilerStop(), and in 75 | in fact source code access is not required at all. The libmpitrace.so 76 | library can track the time that has elapsed after MPI_Init() when every 77 | MPI function is called, and start and stop CUDA profiling as directed 78 | via environment variables. 79 | 80 | To add nvtx annotations, do the following steps : 81 | grep Log ref_mpitrace.c | awk -F"(" '{print $2}' | awk -F"," '{print $1}' >cids.txt 82 | grep Log ref_fortran_wrappers.c | awk -F"(" '{print $2}' | awk -F"," '{print $1}' >fids.txt 83 | gcc -g add_nvtx.c -o add_nvtx 84 | ./add_nvtx 85 | -------------------------------------------------------------------------------- /nvtx/add_nvtx.c: -------------------------------------------------------------------------------- 1 | /* Copyright IBM Corporation, 2019 2 | * author : Bob Walkup 3 | */ 4 | 5 | // utility to parse my standard MPI wrappers 6 | // and add nvtx labeled ranges for all 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | int main(int argc, char * argv[]) 13 | { 14 | char * str, line[256]; 15 | FILE * srcfile; 16 | FILE * idfile; 17 | FILE * ofile; 18 | const int npts = 146; 19 | int i, j; 20 | char idname[npts][80]; 21 | char addline[256]; 22 | char * ptr = NULL, * tvp = NULL, * logp = NULL; 23 | 24 | // instrument C wrappers 25 | idfile = fopen("cids.txt", "r"); 26 | if (idfile == NULL) { 27 | printf("can't open cids.txt ... exiting\n"); 28 | exit(0); 29 | } 30 | 31 | for (i=0; i helper2.sh << EOF 48 | export TRACE_ALL_EVENTS=yes 49 | LD_PRELOAD=/path/to/libmpitrace.so "$@" 50 | EOF 51 | chmod +x helper2.sh 52 | 53 | if [ $OMPI_COMM_WORLD_RANK = 31 ]; then 54 | 55 | for i in \ 56 | results.copy_stats.csv \ 57 | results.db \ 58 | results.hip_stats.csv \ 59 | results.json \ 60 | results.stats.csv \ 61 | results.sysinfo.txt \ 62 | ; do 63 | 64 | if [ -f $i ]; then 65 | mv $i $i.bak 66 | fi 67 | done 68 | 69 | rocprof --roctx-trace ./helper2.sh 70 | else 71 | ./helper2.sh 72 | fi 73 | 74 | In this example, rocprof is turned on for MPI rank 31, and profile data 75 | is saved in a file "results.json" a backup made for any pre-existing 76 | "results.json" file. One could be more specific about naming the rocprof 77 | output, using for example a timestamp or a jobid. 78 | 79 | With rocporf it can be advantageous to limit profiling to a specific code 80 | block using roctracer_start()/roctracer_stop() or to a specified time 81 | window. The following illustrates the time-window profiling method, 82 | where the intent is to capture rocprof data for MPI rank 31 with a start 83 | time of 40 seconds after MPI_Init() and a stop time of 45 seconds after 84 | MPI_Init() : 85 | 86 | Job script : 87 | export PROFILE_BEGIN_TIME=40 88 | export PROFILE_END_TIME=45 89 | export PROFILE_RANK=31 90 | export SAVE_LIST=$PROFILE_RANK 91 | export LD_PRELOAD=/path/to/roctx/libmpitrace.so 92 | mpirun -np 128 ./helper.sh your.exe [args] 93 | 94 | Helper script : 95 | #!/bin/bash 96 | 97 | cat > helper2.sh << EOF 98 | export TRACE_ALL_EVENTS=yes 99 | LD_PRELOAD=/path/to/libmpitrace.so "$@" 100 | EOF 101 | chmod +x helper2.sh 102 | 103 | if [ $OMPI_COMM_WORLD_RANK = $PROFILE_RANK ]; then 104 | for i in \ 105 | results.copy_stats.csv \ 106 | results.db \ 107 | results.hip_stats.csv \ 108 | results.json \ 109 | results.stats.csv \ 110 | results.sysinfo.txt \ 111 | ; do 112 | 113 | if [ -f $i ]; then 114 | mv $i $i.bak 115 | fi 116 | done 117 | 118 | rocprof --roctx-trace -o test.csv --trace-start off ./helper2.sh 119 | else 120 | ./helper2.sh 121 | fi 122 | 123 | With the time-window profiling method, it is not necessary to instrument 124 | the code with calls to roctracer_start()/roctracer_stop(), and in 125 | in fact source code access is not required at all. The libmpitrace.so 126 | library can track the time that has elapsed after MPI_Init() when every 127 | MPI function is called, and start and stop ROCm profiling as directed 128 | via environment variables. 129 | 130 | To add roctx annotations, do the following steps : 131 | grep Log ref_mpitrace.c | awk -F"(" '{print $2}' | awk -F"," '{print $1}' >cids.txt 132 | grep Log ref_fortran_wrappers.c | awk -F"(" '{print $2}' | awk -F"," '{print $1}' >fids.txt 133 | gcc -g add_roctx.c -o add_roctx 134 | ./add_roctx 135 | -------------------------------------------------------------------------------- /roctx/add_roctx.c: -------------------------------------------------------------------------------- 1 | /* Copyright IBM Corporation, 2019 2 | * author : Bob Walkup 3 | */ 4 | 5 | // utility to parse my standard MPI wrappers 6 | // and add roctx labeled ranges for all 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | int main(int argc, char * argv[]) 13 | { 14 | char * str, line[256]; 15 | FILE * srcfile; 16 | FILE * idfile; 17 | FILE * ofile; 18 | const int npts = 146; 19 | int i, j; 20 | char idname[npts][80]; 21 | char addline[256]; 22 | char * ptr = NULL, * tvp = NULL, * logp = NULL; 23 | 24 | // instrument C wrappers 25 | idfile = fopen("cids.txt", "r"); 26 | if (idfile == NULL) { 27 | printf("can't open cids.txt ... exiting\n"); 28 | exit(0); 29 | } 30 | 31 | for (i=0; i 6 | #include 7 | #include 8 | #include 9 | 10 | #define NUM_COUNTERS 6 11 | 12 | static int eventHandle = PAPI_NULL; 13 | 14 | static int use_event_list = 1; 15 | static char envname[NUM_COUNTERS][128]; 16 | 17 | 18 | int main(int argc, char * argv[]) 19 | { 20 | int j, numcounters, group, nranks, rc, ic; 21 | char * ptr = NULL; 22 | char * list_ptr; 23 | char delimiters[] = {" ,"}; 24 | char counter_name[128]; 25 | 26 | list_ptr = getenv("HPM_EVENT_LIST"); 27 | if (list_ptr != NULL) { 28 | use_event_list = 1; 29 | ptr = strtok(list_ptr, delimiters); 30 | j = 0; 31 | while(ptr != NULL) { 32 | strcpy(envname[j], ptr); 33 | ptr = strtok(NULL, delimiters); 34 | j++; 35 | if (j == NUM_COUNTERS) break; 36 | } 37 | numcounters = j; 38 | group = 1000; 39 | } 40 | else { 41 | printf("you must set env variable HPM_EVENT_LIST=event1,event2,etc. ... exiting\n"); 42 | return 0; 43 | } 44 | 45 | printf("checking event list : "); 46 | for (ic=0; ic 6 | #include 7 | 8 | // add extern "C" for C++ codes 9 | void HPM_Init(void); 10 | void HPM_Start(char *); 11 | void HPM_Stop(char *); 12 | void HPM_Print(void); 13 | 14 | int main(int argc, char * argv[]) 15 | { 16 | double sum, * x, * y; 17 | int i, n; 18 | 19 | n = 100000000; 20 | x = (double *) malloc(n*sizeof(double)); 21 | y = (double *) malloc(n*sizeof(double)); 22 | 23 | #pragma omp parallel for 24 | for (i=0; i should build a serial libhpmprof.so 14 | 15 | (4) make test => should build main.x executable file and run it 16 | 17 | (5) analyze output : bfdprof main.x hpm_histogram.jobid.rank >profile.txt 18 | annotate_objdump main.x hpm_histogram.jobid.rank >asm.txt 19 | 20 | Source for the bfdprof utility is in the bfdprof directory. Please check 21 | the README file in the hpmprof directory for additional information. 22 | 23 | For the serial version of libhpmprof.so, you must add calls to initialize 24 | the library, start and stop profiling, and write profiler output. These 25 | functions are handled automatically in the MPI version of libhpmprof.so. 26 | 27 | C/C++ syntax : (the extern "C" qualifier is needed only for C++) 28 | extern "C" void HPM_Prof_init(void); 29 | extern "C" void HPM_Prof_start(void); 30 | extern "C" void HPM_Prof_stop(void); 31 | extern "C" void HPM_Prof_write(void); 32 | 33 | Fortran syntax : 34 | call hpm_prof_init() 35 | call hpm_prof_start() 36 | call hpm_prof_stop() 37 | call hpm_prof_write() 38 | -------------------------------------------------------------------------------- /serial_hpmprof/configure: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #parse command arguments 3 | config_args=$(/usr/bin/getopt -n $0 -l "help,with-binutils:,with-papi:" -o "hb:p:" -- "$@") 4 | eval set -- "$config_args" 5 | 6 | help_flag=0 7 | binutils_flag=0 8 | papi_flag=0 9 | 10 | while true 11 | do 12 | case "$1" in 13 | -h|--help) 14 | echo "configure options :" 15 | echo "--help (prints this help message)" 16 | echo "--with-binutils=/path/to/binutils (required and must have sub-directories : lib,lib64,include)" 17 | echo "--with-papi=/path/to/papi (required and must have sub-directories : lib,include)" 18 | exit;; 19 | 20 | -b|--with-binutils) 21 | binutils_flag=1 22 | binutils_path="$2" 23 | if [ ${binutils_path:0:2} == -- ]; then 24 | echo error : specify --with-binutils=/path/to/binutils ... exiting 25 | exit 26 | fi 27 | echo using binutils_path=$binutils_path 28 | shift 2;; 29 | 30 | -p|--with-papi) 31 | papi_flag=1 32 | papi_path="$2" 33 | if [ ${papi_path:0:2} == -- ]; then 34 | echo error : specify --with-papi=/path/to/papi ... exiting 35 | exit 36 | fi 37 | echo using papi_path=$papi_path 38 | shift 2;; 39 | 40 | --) 41 | shift 42 | break;; 43 | esac 44 | done 45 | 46 | cp makefile.in makefile 47 | 48 | if [ $binutils_flag == 0 ]; then 49 | echo GNU binutils is required : ./configure --with-binutils=/path/to/binutils --with-papi=/path/to/papi 50 | exit 51 | fi 52 | 53 | if [ $papi_flag == 0 ]; then 54 | echo PAPI is required : ./configure --with-binutils=/path/to/binutils --with-papi=/path/to/papi 55 | exit 56 | fi 57 | 58 | if [ $binutils_flag == 1 ]; then 59 | # check for gnu binutils bfd components 60 | if [[ ! -z $binutils_path ]]; then 61 | echo -n testing for libbdf.a... 62 | if [ -f $binutils_path/lib/libbfd.a ]; then 63 | echo found 64 | else 65 | echo libbfd.a not found ... check your binutils path ... exiting 66 | exit 67 | fi 68 | 69 | echo -n testing for libiberty.a... 70 | if [ -f $binutils_path/lib64/libiberty.a ]; then 71 | echo found 72 | elif [ -f $binutils_path/lib/libiberty.a ]; then 73 | echo found 74 | else 75 | echo libiberty.a not found ... check your binutils path ... exiting 76 | exit 77 | fi 78 | 79 | echo -n testing for bfd.h... 80 | if [ -f $binutils_path/include/bfd.h ]; then 81 | echo found 82 | else 83 | echo bfd.h not found ... check your binutils path ... exiting 84 | exit 85 | fi 86 | 87 | echo -n testing for binutils config.h... 88 | if [ -f $binutils_path/include/config.h ]; then 89 | echo found 90 | else 91 | echo binutils config.h not found ... check your binutils path ... exiting 92 | exit 93 | fi 94 | 95 | x_binutils_path="$(echo $binutils_path | sed 's/\//\\\//g')" 96 | 97 | sed -i "s/#VPROF = -DVPROF/ VPROF = -DVPROF/g" makefile 98 | sed -i "s/BINUTILS_INSTALL_PATH/$x_binutils_path/g" makefile 99 | 100 | else 101 | 102 | echo "error : the configure option --with-binutils is required for vprof support" 103 | echo "example : ./configure --with-vprof --with-binutils=/path/to/binutils" 104 | exit 105 | 106 | fi 107 | 108 | fi 109 | 110 | if [ $papi_flag == 1 ]; then 111 | # check for papi components 112 | if [[ ! -z $papi_path ]]; then 113 | echo -n testing for libpapi.a... 114 | if [ -f $papi_path/lib/libpapi.a ]; then 115 | echo found 116 | else 117 | echo libpapi.a not found ... check your papi path ... exiting 118 | exit 119 | fi 120 | 121 | echo -n testing for papi.h... 122 | if [ -f $papi_path/include/papi.h ]; then 123 | echo found 124 | else 125 | echo papi.h not found ... check your papi path ... exiting 126 | exit 127 | fi 128 | 129 | x_papi_path="$(echo $papi_path | sed 's/\//\\\//g')" 130 | 131 | sed -i "s/PAPI_INSTALL_PATH/$x_papi_path/g" makefile 132 | 133 | else 134 | 135 | echo "error : the configure option --with-papi is required" 136 | echo "example : ./configure --with-binutils=/path/to/binutils --with-papi=/path/to/papi" 137 | exit 138 | 139 | fi 140 | 141 | echo "" 142 | echo "Edit \"makefile\" and ensure that paths for gnu binutils and papi are set correctly" 143 | echo "Set the nominal CPU frequency in units of MHz on the line : SET_FREQ = -DCPU_MHZ=3000" 144 | echo "To build the serial libhpmprof.so library, type : make" 145 | echo "" 146 | fi 147 | 148 | -------------------------------------------------------------------------------- /serial_hpmprof/hpmprof.c: -------------------------------------------------------------------------------- 1 | ../hpmprof/hpmprof.c -------------------------------------------------------------------------------- /serial_hpmprof/main.c: -------------------------------------------------------------------------------- 1 | /* Copyright IBM Corporation, 2019 2 | * author : Bob Walkup 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | void HPM_Prof_init(void); 9 | void HPM_Prof_start(void); 10 | void HPM_Prof_stop(void); 11 | void HPM_Prof_write(void); 12 | 13 | double sub(double); 14 | 15 | int main(int argc, char * argv[]) 16 | { 17 | double x, val; 18 | 19 | HPM_Prof_init(); 20 | HPM_Prof_start(); 21 | 22 | x = 3.14159; 23 | val = sub(x); 24 | 25 | HPM_Prof_stop(); 26 | HPM_Prof_write(); 27 | 28 | printf("got val = %.4le\n", val); 29 | 30 | return 0; 31 | } 32 | -------------------------------------------------------------------------------- /serial_hpmprof/makefile.in: -------------------------------------------------------------------------------- 1 | BFD_LIB = -L BINUTILS_INSTALL_PATH/lib -lbfd -L BINUTILS_INSTALL_PATH/lib64 -liberty -lz 2 | 3 | HPMINC = -I PAPI_INSTALL_PATH/include -I BINUTILS_INSTALL_PATH/include 4 | PAPI_OBJ = PAPI_INSTALL_PATH/lib/libpapi.a 5 | 6 | #------------------------------------------------------------- 7 | CC = gcc 8 | CFLAGS = -g -O -DSERIAL_VERSION -DCPU_MHZ=3000 -fPIC $(HPMINC) -I. 9 | 10 | #------------------------------------------ 11 | # targets 12 | #------------------------------------------ 13 | default: shared # static 14 | 15 | static : libhpmprof.a 16 | 17 | shared : libhpmprof.so 18 | 19 | test : main.x 20 | ./main.x 21 | 22 | clean : 23 | rm -f *.a *.o *.so *.lst main.x 24 | 25 | distclean : 26 | rm -f *.a *.o *.so *.lst main.x hpm_histogram* makefile 27 | 28 | #------------------------------------------------------------------ 29 | # rules for the wrapper libraries 30 | #------------------------------------------------------------------ 31 | 32 | libhpmprof.a : hpmprof.o 33 | ar crv $@ hpmprof.o $(PAPI_OBJ) 34 | 35 | libhpmprof.so : hpmprof.o 36 | $(CC) -o libhpmprof.so -shared hpmprof.o $(BFD_LIB) $(PAPI_OBJ) 37 | 38 | #------------------------------------------ 39 | # rules for .o files 40 | #------------------------------------------ 41 | hpmprof.o : hpmprof.c 42 | $(CC) -c $(CFLAGS) hpmprof.c -o $@ 43 | 44 | main.x : main.c sub.o 45 | gcc -g -O2 main.c sub.o -o main.x ./libhpmprof.so -ldl 46 | 47 | sub.o : sub.c 48 | gcc -c -g -O2 sub.c 49 | 50 | 51 | -------------------------------------------------------------------------------- /serial_hpmprof/sub.c: -------------------------------------------------------------------------------- 1 | /* Copyright IBM Corporation, 2019 2 | * author : Bob Walkup 3 | */ 4 | 5 | double sub(double x) 6 | { 7 | int iter, maxiter; 8 | int i, npts; 9 | double val = 0.0; 10 | 11 | npts = 1000000; 12 | maxiter = 1000; 13 | 14 | for (iter=0; iter n) break; 28 | numinc++; 29 | inc[numinc] = h; 30 | pwr2 *= 2; 31 | pwr4 *= 4; 32 | } 33 | 34 | for (i=0; i 0) { // sort in increasing order 37 | for (; numinc >= 0; numinc--) { 38 | h = inc[numinc]; 39 | for (i = h; i < n; i++) { 40 | val = arr[i]; 41 | k = ind[i]; 42 | 43 | j = i; 44 | 45 | while ( (j >= h) && (arr[j-h] > val) ) { 46 | arr[j] = arr[j-h]; 47 | ind[j] = ind[j-h]; 48 | j = j - h; 49 | } 50 | 51 | arr[j] = val; 52 | ind[j] = k; 53 | } 54 | } 55 | } 56 | else { // sort in decreasing order 57 | for (; numinc >= 0; numinc--) { 58 | h = inc[numinc]; 59 | for (i = h; i < n; i++) { 60 | val = arr[i]; 61 | k = ind[i]; 62 | 63 | j = i; 64 | 65 | while ( (j >= h) && (arr[j-h] < val) ) { 66 | arr[j] = arr[j-h]; 67 | ind[j] = ind[j-h]; 68 | j = j - h; 69 | } 70 | 71 | arr[j] = val; 72 | ind[j] = k; 73 | } 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /traceview/README: -------------------------------------------------------------------------------- 1 | The traceview utility uses OpenGL to draw rectangles for each MPI 2 | event, using a display format where the x-axis is time, and the 3 | y-axis is MPI rank. To get fast response times, it is best if 4 | traceview is built to run locally on your workstation or laptop. 5 | It is also possible to build it as an X-windows application that 6 | runs on a remote server, but then you would need an X-server with 7 | OpenGL support, and the graphics will be much slower than a local 8 | executable. The viewer basically needs to be able to hold the 9 | entire trace file in memory, so it is best to limit the size of 10 | the trace files so that you can handle them on your system. 11 | 12 | To build the "traceview" viewer, you need "glut" and the GL user 13 | interface library "glui". Many operating systems provide an 14 | implementation of "glut", and you can build the "glui" library from 15 | source available at: 16 | 17 | https://sourceforge.net/projects/glui/ 18 | 19 | After ensuring that you have "glut" and "glui" development files, you 20 | can modify the makefile to set the proper include paths and libraries. 21 | A sample tracefile (laghos.trc) is included. Different systems tend 22 | to organize the include files differently, and you may need to adjust 23 | the code in traceview.cpp to ensure that the compiler can find : 24 | 25 | #include 26 | #include // adjust the path as needed 27 | 28 | After building the traceview executable, you can test it using the 29 | command : 30 | 31 | traceview sample.trc [enter] 32 | 33 | Hit the "help" button for a brief description of the "hot" keys. 34 | It is highly recommended to use "hot" keys for navigation in the 35 | trace file, instead of the buttons on the small gui window. The 36 | other quite useful feature is to select a region to zoom into by 37 | holding the right mouse button down while dragging the mouse to 38 | the right, then release. 39 | 40 | 41 | Note: The tracefile format is just a binary stream of event records, 42 | 48 bytes per event. The current version of the viewer will 43 | detect the byte-order and automatically swap bytes if there is 44 | a need to do that, so the tool should work with any endian order 45 | used either for trace generation or trace visualization. 46 | 47 | -------------------------------------------------------------------------------- /traceview/chop_by_rank.c: -------------------------------------------------------------------------------- 1 | /* Copyright IBM Corporation, 2019 2 | * author : Bob Walkup 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | struct intPair { int src; int dest; }; 11 | 12 | typedef union { long offset; struct intPair ranks; } unType; 13 | 14 | struct eventstruct { 15 | double tbeg; 16 | double tend; 17 | int taskid; 18 | int eventid; 19 | unType UN; 20 | int bytes; 21 | int parent; 22 | int grandparent; 23 | int ioflag; 24 | }; 25 | 26 | struct eventstruct event; 27 | 28 | #define EVENT_SIZE 48 29 | 30 | int main(int argc, char * argv[]) 31 | { 32 | int minrank, maxrank; 33 | FILE * fh1, * fh2; 34 | char outfile[80]; 35 | 36 | if (argc != 2) { 37 | printf("Syntax: chop_by_rank infile\n"); 38 | exit(0); 39 | } 40 | 41 | printf("enter minrank maxrank : "); 42 | scanf("%d %d", &minrank, &maxrank); 43 | 44 | fh1 = fopen(argv[1], "r"); 45 | 46 | if (fh1 == NULL) { 47 | printf("failed to open input file %s ... exiting\n", argv[1]); 48 | exit(0); 49 | } 50 | 51 | if (maxrank == minrank) sprintf(outfile, "mpirank_%d.trc", minrank); 52 | else sprintf(outfile, "mpirank_%d_to_%d.trc", minrank, maxrank); 53 | 54 | fh2 = fopen(outfile, "w"); 55 | 56 | fread(&event, EVENT_SIZE, 1, fh1); 57 | 58 | while (event.taskid < minrank) fread(&event, EVENT_SIZE, 1, fh1); 59 | 60 | while (event.taskid <= maxrank) { 61 | fwrite(&event, EVENT_SIZE, 1, fh2); 62 | fread(&event, EVENT_SIZE, 1, fh1); 63 | } 64 | 65 | fclose(fh1); 66 | fclose(fh2); 67 | 68 | printf("wrote file %s\n", outfile); 69 | 70 | return 0; 71 | } 72 | -------------------------------------------------------------------------------- /traceview/chop_by_time.c: -------------------------------------------------------------------------------- 1 | /* Copyright IBM Corporation, 2019 2 | * author : Bob Walkup 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | struct intPair { int src; int dest; }; 11 | 12 | typedef union { long offset; struct intPair ranks; } unType; 13 | 14 | struct eventstruct { 15 | double tbeg; 16 | double tend; 17 | int taskid; 18 | int eventid; 19 | unType UN; 20 | int bytes; 21 | int parent; 22 | int grandparent; 23 | int ioflag; 24 | }; 25 | 26 | struct eventstruct event; 27 | 28 | #define EVENT_SIZE 48 29 | 30 | int main(int argc, char * argv[]) 31 | { 32 | double tmin, tmax; 33 | FILE * fh1, * fh2; 34 | char outfile[80]; 35 | 36 | if (argc != 2) { 37 | printf("Syntax: chop_by_time infile\n"); 38 | exit(0); 39 | } 40 | 41 | printf("enter tmin tmax : "); 42 | scanf("%lf %lf", &tmin, &tmax); 43 | 44 | fh1 = fopen(argv[1], "r"); 45 | 46 | if (fh1 == NULL) { 47 | printf("failed to open input file %s ... exiting\n", argv[1]); 48 | exit(0); 49 | } 50 | 51 | sprintf(outfile, "chopped.trc"); 52 | 53 | fh2 = fopen(outfile, "w"); 54 | 55 | fread(&event, EVENT_SIZE, 1, fh1); 56 | 57 | while (1 == fread(&event, EVENT_SIZE, 1, fh1)) { 58 | if (event.tbeg > tmin && event.tend < tmax) fwrite(&event, EVENT_SIZE, 1, fh2); 59 | } 60 | 61 | 62 | fclose(fh1); 63 | fclose(fh2); 64 | 65 | printf("wrote file %s\n", outfile); 66 | 67 | return 0; 68 | } 69 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/LICENSE.txt: -------------------------------------------------------------------------------- 1 | GLUI User Interface Toolkit 2 | --------------------------- 3 | 4 | (The ZLIB License) 5 | 6 | This software is provided 'as-is', without any express or implied 7 | warranty. In no event will the authors be held liable for any damages 8 | arising from the use of this software. 9 | 10 | Permission is granted to anyone to use this software for any purpose, 11 | including commercial applications, and to alter it and redistribute it 12 | freely, subject to the following restrictions: 13 | 14 | 1. The origin of this software must not be misrepresented; you must not 15 | claim that you wrote the original software. If you use this software 16 | in a product, an acknowledgment in the product documentation would be 17 | appreciated but is not required. 18 | 2. Altered source versions must be plainly marked as such, and must not be 19 | misrepresented as being the original software. 20 | 3. This notice may not be removed or altered from any source distribution. 21 | 22 | 23 | History of GLUI's License: 24 | -------------------------- 25 | Originally, GLUI was licensed under LGPL because Paul Rademacher 26 | just wanted something that was very permissive, and LGPL was the 27 | thing he had heard of. I discussed the license with Paul at 28 | SIGGRAPH 2006, where he told me the above, and also told me he was 29 | supportive of changing the license to one of the less restrictive 30 | open source licenses. So after contacting all the authors to get 31 | their OK, GLUI is now under the ZLIB license. 32 | 33 | Bill Baxter -- November 2007 34 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/arcball.h: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | 3 | arcball.h 4 | 5 | GLUI User Interface Toolkit 6 | Copyright (c) 1998 Paul Rademacher 7 | Feb 1998, Paul Rademacher (rademach@cs.unc.edu) 8 | Oct 2003, Nigel Stewart - GLUI Code Cleaning 9 | 10 | 11 | WWW: http://sourceforge.net/projects/glui/ 12 | Forums: http://sourceforge.net/forum/?group_id=92496 13 | 14 | This software is provided 'as-is', without any express or implied 15 | warranty. In no event will the authors be held liable for any damages 16 | arising from the use of this software. 17 | 18 | Permission is granted to anyone to use this software for any purpose, 19 | including commercial applications, and to alter it and redistribute it 20 | freely, subject to the following restrictions: 21 | 22 | 1. The origin of this software must not be misrepresented; you must not 23 | claim that you wrote the original software. If you use this software 24 | in a product, an acknowledgment in the product documentation would be 25 | appreciated but is not required. 26 | 2. Altered source versions must be plainly marked as such, and must not be 27 | misrepresented as being the original software. 28 | 3. This notice may not be removed or altered from any source distribution. 29 | 30 | --------------------------------------------------------------------- 31 | 32 | A C++ class that implements the Arcball, as described by Ken 33 | Shoemake in Graphics Gems IV. 34 | This class takes as input mouse events (mouse down, mouse drag, 35 | mouse up), and creates the appropriate quaternions and 4x4 matrices 36 | to represent the rotation given by the mouse. 37 | 38 | This class is used as follows: 39 | - initialize [either in the constructor or with set_params()], the 40 | center position (x,y) of the arcball on the screen, and the radius 41 | - on mouse down, call mouse_down(x,y) with the mouse position 42 | - as the mouse is dragged, repeatedly call mouse_motion() with the 43 | current x and y positions. One can optionally pass in the current 44 | state of the SHIFT, ALT, and CONTROL keys (passing zero if keys 45 | are not pressed, non-zero otherwise), which constrains 46 | the rotation to certain axes (X for CONTROL, Y for ALT). 47 | - when the mouse button is released, call mouse_up() 48 | 49 | Axis constraints can also be explicitly set with the 50 | set_constraints() function. 51 | 52 | The current rotation is stored in the 4x4 float matrix 'rot'. 53 | It is also stored in the quaternion 'q_now'. 54 | 55 | **********************************************************************/ 56 | 57 | #ifndef GLUI_ARCBALL_H 58 | #define GLUI_ARCBALL_H 59 | 60 | #include "glui_internal.h" 61 | #include "algebra3.h" 62 | #include "quaternion.h" 63 | 64 | class Arcball 65 | { 66 | public: 67 | Arcball(); 68 | Arcball(mat4 *mtx); 69 | Arcball(const vec2 ¢er, float radius); 70 | 71 | void set_damping(float d); 72 | void idle(); 73 | void mouse_down(int x, int y); 74 | void mouse_up(); 75 | void mouse_motion(int x, int y, int shift, int ctrl, int alt); 76 | void mouse_motion(int x, int y); 77 | void set_constraints(bool constrain_x, bool constrain_y); 78 | void set_params(const vec2 ¢er, float radius); 79 | void reset_mouse(); 80 | void init(); 81 | 82 | vec3 constrain_vector(const vec3 &vector, const vec3 &axis); 83 | vec3 mouse_to_sphere(const vec2 &p); 84 | 85 | //public: 86 | int is_mouse_down; /* true for down, false for up */ 87 | int is_spinning; 88 | quat q_now, q_down, q_drag, q_increment; 89 | vec2 down_pt; 90 | mat4 rot, rot_increment; 91 | mat4 *rot_ptr; 92 | 93 | bool constraint_x, constraint_y; 94 | vec2 center; 95 | float radius, damp_factor; 96 | int zero_increment; 97 | }; 98 | 99 | #endif 100 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/doc/glui_manual.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/mpitrace/1c168af279b37e08d662c125735d30db25eb2777/traceview/glui-2.36/src/doc/glui_manual.doc -------------------------------------------------------------------------------- /traceview/glui-2.36/src/doc/glui_manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/mpitrace/1c168af279b37e08d662c125735d30db25eb2777/traceview/glui-2.36/src/doc/glui_manual.pdf -------------------------------------------------------------------------------- /traceview/glui-2.36/src/example/example1.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | 3 | A simple GLUT program using the GLUI User Interface Library 4 | 5 | This program sets up a checkbox and a spinner, both with live variables. 6 | No callbacks are used. 7 | 8 | ----------------------------------------------------------------------- 9 | 10 | 9/9/98 Paul Rademacher (rademach@cs.unc.edu) 11 | 12 | ****************************************************************************/ 13 | 14 | #include 15 | #include 16 | 17 | /** These are the live variables passed into GLUI ***/ 18 | int wireframe = 0; 19 | int segments = 8; 20 | int main_window; 21 | 22 | 23 | /***************************************** myGlutIdle() ***********/ 24 | 25 | void myGlutIdle( void ) 26 | { 27 | /* According to the GLUT specification, the current window is 28 | undefined during an idle callback. So we need to explicitly change 29 | it if necessary */ 30 | if ( glutGetWindow() != main_window ) 31 | glutSetWindow(main_window); 32 | 33 | glutPostRedisplay(); 34 | } 35 | 36 | 37 | /**************************************** myGlutReshape() *************/ 38 | 39 | void myGlutReshape( int x, int y ) 40 | { 41 | float xy_aspect; 42 | 43 | xy_aspect = (float)x / (float)y; 44 | glViewport( 0, 0, x, y ); 45 | 46 | glMatrixMode( GL_PROJECTION ); 47 | glLoadIdentity(); 48 | glFrustum( -xy_aspect*.08, xy_aspect*.08, -.08, .08, .1, 15.0 ); 49 | 50 | glutPostRedisplay(); 51 | } 52 | 53 | /***************************************** myGlutDisplay() *****************/ 54 | 55 | void myGlutDisplay( void ) 56 | { 57 | static float rotationX = 0.0, rotationY = 0.0; 58 | 59 | glClearColor( .9f, .9f, .9f, 1.0f ); 60 | glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); 61 | 62 | /*** Rotate the object ***/ 63 | rotationX += 3.3f; 64 | rotationY += 4.7f; 65 | 66 | glMatrixMode( GL_MODELVIEW ); 67 | glLoadIdentity(); 68 | glTranslatef( 0.0, 0.0, -1.0 ); 69 | glRotatef( rotationY, 0.0, 1.0, 0.0 ); 70 | glRotatef( rotationX, 1.0, 0.0, 0.0 ); 71 | 72 | /*** Now we render object, using the variables 'segments' and 73 | 'wireframe'. These are _live_ variables, which are transparently 74 | updated by GLUI ***/ 75 | 76 | if ( wireframe ) 77 | glutWireTorus( .2,.5,16,segments ); 78 | else 79 | glutSolidTorus( .2,.5,16,segments ); 80 | 81 | glutSwapBuffers(); 82 | } 83 | 84 | 85 | /**************************************** main() ********************/ 86 | 87 | int main(int argc, char* argv[]) 88 | { 89 | /****************************************/ 90 | /* Initialize GLUT and create window */ 91 | /****************************************/ 92 | 93 | glutInit(&argc, argv); 94 | glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); 95 | glutInitWindowPosition( 50, 50 ); 96 | glutInitWindowSize( 300, 300 ); 97 | 98 | main_window = glutCreateWindow( "GLUI Example 1" ); 99 | glutDisplayFunc( myGlutDisplay ); 100 | glutReshapeFunc( myGlutReshape ); 101 | 102 | /****************************************/ 103 | /* Set up OpenGL lights */ 104 | /****************************************/ 105 | 106 | GLfloat light0_ambient[] = {0.1f, 0.1f, 0.3f, 1.0f}; 107 | GLfloat light0_diffuse[] = {.6f, .6f, 1.0f, 1.0f}; 108 | GLfloat light0_position[] = {1.0f, 1.0f, 1.0f, 0.0f}; 109 | 110 | glEnable(GL_LIGHTING); 111 | glEnable(GL_LIGHT0); 112 | glLightfv(GL_LIGHT0, GL_AMBIENT, light0_ambient); 113 | glLightfv(GL_LIGHT0, GL_DIFFUSE, light0_diffuse); 114 | glLightfv(GL_LIGHT0, GL_POSITION, light0_position); 115 | 116 | /****************************************/ 117 | /* Enable z-buferring */ 118 | /****************************************/ 119 | 120 | glEnable(GL_DEPTH_TEST); 121 | 122 | 123 | /****************************************/ 124 | /* Here's the GLUI code */ 125 | /****************************************/ 126 | 127 | GLUI *glui = GLUI_Master.create_glui( "GLUI" ); 128 | new GLUI_Checkbox( glui, "Wireframe", &wireframe ); 129 | (new GLUI_Spinner( glui, "Segments:", &segments )) 130 | ->set_int_limits( 3, 60 ); 131 | 132 | glui->set_main_gfx_window( main_window ); 133 | 134 | /* We register the idle callback with GLUI, *not* with GLUT */ 135 | GLUI_Master.set_glutIdleFunc( myGlutIdle ); 136 | 137 | glutMainLoop(); 138 | 139 | return EXIT_SUCCESS; 140 | } 141 | 142 | 143 | 144 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_column.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | GLUI User Interface Toolkit 3 | --------------------------- 4 | 5 | glui_column.cpp - GLUI_Column control class 6 | 7 | 8 | -------------------------------------------------- 9 | 10 | Copyright (c) 1998 Paul Rademacher 11 | 12 | WWW: http://sourceforge.net/projects/glui/ 13 | Forums: http://sourceforge.net/forum/?group_id=92496 14 | 15 | This software is provided 'as-is', without any express or implied 16 | warranty. In no event will the authors be held liable for any damages 17 | arising from the use of this software. 18 | 19 | Permission is granted to anyone to use this software for any purpose, 20 | including commercial applications, and to alter it and redistribute it 21 | freely, subject to the following restrictions: 22 | 23 | 1. The origin of this software must not be misrepresented; you must not 24 | claim that you wrote the original software. If you use this software 25 | in a product, an acknowledgment in the product documentation would be 26 | appreciated but is not required. 27 | 2. Altered source versions must be plainly marked as such, and must not be 28 | misrepresented as being the original software. 29 | 3. This notice may not be removed or altered from any source distribution. 30 | 31 | *****************************************************************************/ 32 | 33 | #include "glui_internal_control.h" 34 | 35 | /******************************** GLUI_Column::GLUI_Column() ************/ 36 | 37 | GLUI_Column::GLUI_Column( GLUI_Node *parent, int draw_bar ) 38 | { 39 | common_init(); 40 | int_val = draw_bar; /* Whether to draw vertical bar or not */ 41 | 42 | parent->add_control( this ); 43 | } 44 | 45 | /**************************************** GLUI_Column::draw() ************/ 46 | 47 | void GLUI_Column::draw( int x, int y ) 48 | { 49 | int panel_x, panel_y, panel_w, panel_h, panel_x_off, panel_y_off; 50 | int y_diff; 51 | 52 | if ( int_val == 1 ) { /* Draw a vertical bar */ 53 | GLUI_DRAWINGSENTINAL_IDIOM 54 | if ( parent() != NULL ) { 55 | get_this_column_dims(&panel_x, &panel_y, &panel_w, &panel_h, 56 | &panel_x_off, &panel_y_off); 57 | 58 | y_diff = y_abs - panel_y; 59 | 60 | if ( 0 ) { 61 | glLineWidth(1.0); 62 | glBegin( GL_LINES ); 63 | glColor3f( .5, .5, .5 ); 64 | glVertex2i( -GLUI_XOFF+1, -y_diff + GLUI_SEPARATOR_HEIGHT/2 ); 65 | glVertex2i( -GLUI_XOFF+1, -y_diff + panel_h - GLUI_SEPARATOR_HEIGHT/2); 66 | 67 | glColor3f( 1.0, 1.0, 1.0 ); 68 | glVertex2i( -GLUI_XOFF+2, -y_diff + GLUI_SEPARATOR_HEIGHT/2 ); 69 | glVertex2i( -GLUI_XOFF+2, -y_diff + panel_h - GLUI_SEPARATOR_HEIGHT/2); 70 | glEnd(); 71 | } 72 | else { 73 | glLineWidth(1.0); 74 | glBegin( GL_LINES ); 75 | glColor3f( .5, .5, .5 ); 76 | glVertex2i( -2, 0 ); 77 | glVertex2i( -2, h ); 78 | /*glVertex2i( 0, -y_diff + GLUI_SEPARATOR_HEIGHT/2 ); */ 79 | /*glVertex2i( 0, -y_diff + panel_h - GLUI_SEPARATOR_HEIGHT/2); */ 80 | 81 | glColor3f( 1.0, 1.0, 1.0 ); 82 | glVertex2i( -1, 0 ); 83 | glVertex2i( -1, h ); 84 | /*glVertex2i( 1, -y_diff + GLUI_SEPARATOR_HEIGHT/2 ); */ 85 | /*glVertex2i( 1, -y_diff + panel_h - GLUI_SEPARATOR_HEIGHT/2); */ 86 | glEnd(); 87 | } 88 | } 89 | } 90 | } 91 | 92 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_checkbox_0.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int glui_img_checkbox_0[] = { 13, 13, /* width, height */ 4 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 5 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 6 | 255,255,255, 255,255,255, 255,255,255, 128,128,128, 192,192,192, 7 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 8 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 9 | 255,255,255, 128,128,128, 0, 0, 0, 255,255,255, 255,255,255, 10 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 11 | 255,255,255, 255,255,255, 192,192,192, 255,255,255, 128,128,128, 12 | 0, 0, 0, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 13 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 14 | 192,192,192, 255,255,255, 128,128,128, 0, 0, 0, 255,255,255, 15 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 16 | 255,255,255, 255,255,255, 255,255,255, 192,192,192, 255,255,255, 17 | 128,128,128, 0, 0, 0, 255,255,255, 255,255,255, 255,255,255, 18 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 19 | 255,255,255, 192,192,192, 255,255,255, 128,128,128, 0, 0, 0, 20 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 21 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 192,192,192, 22 | 255,255,255, 128,128,128, 0, 0, 0, 255,255,255, 255,255,255, 23 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 24 | 255,255,255, 255,255,255, 192,192,192, 255,255,255, 128,128,128, 25 | 0, 0, 0, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 26 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 27 | 192,192,192, 255,255,255, 128,128,128, 0, 0, 0, 255,255,255, 28 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 29 | 255,255,255, 255,255,255, 255,255,255, 192,192,192, 255,255,255, 30 | 128,128,128, 0, 0, 0, 255,255,255, 255,255,255, 255,255,255, 31 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 32 | 255,255,255, 192,192,192, 255,255,255, 128,128,128, 0, 0, 0, 33 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192,192,192, 35 | 255,255,255, 128,128,128, 128,128,128, 128,128,128, 128,128,128, 36 | 128,128,128, 128,128,128, 128,128,128, 128,128,128, 128,128,128, 37 | 128,128,128, 128,128,128, 128,128,128, 255,255,255, 38 | }; 39 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_checkbox_0_dis.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int glui_img_checkbox_0_dis[] = { 13, 13, /* width, height */ 4 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 5 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 6 | 255,255,255, 255,255,255, 255,255,255, 128,128,128, 192,192,192, 7 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 8 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 9 | 255,255,255, 128,128,128, 64, 64, 64, 192,192,192, 192,192,192, 10 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 11 | 192,192,192, 192,192,192, 192,192,192, 255,255,255, 128,128,128, 12 | 64, 64, 64, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 13 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 14 | 192,192,192, 255,255,255, 128,128,128, 64, 64, 64, 192,192,192, 15 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 16 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 255,255,255, 17 | 128,128,128, 64, 64, 64, 192,192,192, 192,192,192, 192,192,192, 18 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 19 | 192,192,192, 192,192,192, 255,255,255, 128,128,128, 64, 64, 64, 20 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 21 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 22 | 255,255,255, 128,128,128, 64, 64, 64, 192,192,192, 192,192,192, 23 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 24 | 192,192,192, 192,192,192, 192,192,192, 255,255,255, 128,128,128, 25 | 64, 64, 64, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 26 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 27 | 192,192,192, 255,255,255, 128,128,128, 64, 64, 64, 192,192,192, 28 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 29 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 255,255,255, 30 | 128,128,128, 64, 64, 64, 192,192,192, 192,192,192, 192,192,192, 31 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 32 | 192,192,192, 192,192,192, 255,255,255, 128,128,128, 64, 64, 64, 33 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 34 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 192,192,192, 35 | 255,255,255, 128,128,128, 128,128,128, 128,128,128, 128,128,128, 36 | 128,128,128, 128,128,128, 128,128,128, 128,128,128, 128,128,128, 37 | 128,128,128, 128,128,128, 128,128,128, 255,255,255, 38 | }; 39 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_checkbox_1.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int glui_img_checkbox_1[] = { 13, 13, /* width, height */ 4 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 5 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 6 | 255,255,255, 255,255,255, 255,255,255, 128,128,128, 192,192,192, 7 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 8 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 9 | 255,255,255, 128,128,128, 0, 0, 0, 255,255,255, 255,255,255, 10 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 11 | 255,255,255, 255,255,255, 192,192,192, 255,255,255, 128,128,128, 12 | 0, 0, 0, 255,255,255, 255,255,255, 255,255,255, 0, 0, 0, 13 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 14 | 192,192,192, 255,255,255, 128,128,128, 0, 0, 0, 255,255,255, 15 | 255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255,255,255, 16 | 255,255,255, 255,255,255, 255,255,255, 192,192,192, 255,255,255, 17 | 128,128,128, 0, 0, 0, 255,255,255, 0, 0, 0, 0, 0, 0, 18 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 255,255,255, 255,255,255, 19 | 255,255,255, 192,192,192, 255,255,255, 128,128,128, 0, 0, 0, 20 | 255,255,255, 0, 0, 0, 0, 0, 0, 255,255,255, 0, 0, 0, 21 | 0, 0, 0, 0, 0, 0, 255,255,255, 255,255,255, 192,192,192, 22 | 255,255,255, 128,128,128, 0, 0, 0, 255,255,255, 0, 0, 0, 23 | 255,255,255, 255,255,255, 255,255,255, 0, 0, 0, 0, 0, 0, 24 | 0, 0, 0, 255,255,255, 192,192,192, 255,255,255, 128,128,128, 25 | 0, 0, 0, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 26 | 255,255,255, 255,255,255, 0, 0, 0, 0, 0, 0, 255,255,255, 27 | 192,192,192, 255,255,255, 128,128,128, 0, 0, 0, 255,255,255, 28 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 29 | 255,255,255, 0, 0, 0, 255,255,255, 192,192,192, 255,255,255, 30 | 128,128,128, 0, 0, 0, 255,255,255, 255,255,255, 255,255,255, 31 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 32 | 255,255,255, 192,192,192, 255,255,255, 128,128,128, 0, 0, 0, 33 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192,192,192, 35 | 255,255,255, 128,128,128, 128,128,128, 128,128,128, 128,128,128, 36 | 128,128,128, 128,128,128, 128,128,128, 128,128,128, 128,128,128, 37 | 128,128,128, 128,128,128, 128,128,128, 255,255,255, 38 | }; 39 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_checkbox_1_dis.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int glui_img_checkbox_1_dis[] = { 13, 13, /* width, height */ 4 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 5 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 6 | 255,255,255, 255,255,255, 255,255,255, 128,128,128, 192,192,192, 7 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 8 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 9 | 255,255,255, 128,128,128, 64, 64, 64, 192,192,192, 192,192,192, 10 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 11 | 192,192,192, 192,192,192, 192,192,192, 255,255,255, 128,128,128, 12 | 64, 64, 64, 192,192,192, 192,192,192, 192,192,192, 64, 64, 64, 13 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 14 | 192,192,192, 255,255,255, 128,128,128, 64, 64, 64, 192,192,192, 15 | 192,192,192, 64, 64, 64, 64, 64, 64, 64, 64, 64, 192,192,192, 16 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 255,255,255, 17 | 128,128,128, 64, 64, 64, 192,192,192, 64, 64, 64, 64, 64, 64, 18 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 192,192,192, 192,192,192, 19 | 192,192,192, 192,192,192, 255,255,255, 128,128,128, 64, 64, 64, 20 | 192,192,192, 64, 64, 64, 64, 64, 64, 192,192,192, 64, 64, 64, 21 | 64, 64, 64, 64, 64, 64, 192,192,192, 192,192,192, 192,192,192, 22 | 255,255,255, 128,128,128, 64, 64, 64, 192,192,192, 64, 64, 64, 23 | 192,192,192, 192,192,192, 192,192,192, 64, 64, 64, 64, 64, 64, 24 | 64, 64, 64, 192,192,192, 192,192,192, 255,255,255, 128,128,128, 25 | 64, 64, 64, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 26 | 192,192,192, 192,192,192, 64, 64, 64, 64, 64, 64, 192,192,192, 27 | 192,192,192, 255,255,255, 128,128,128, 64, 64, 64, 192,192,192, 28 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 29 | 192,192,192, 64, 64, 64, 192,192,192, 192,192,192, 255,255,255, 30 | 128,128,128, 64, 64, 64, 192,192,192, 192,192,192, 192,192,192, 31 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 32 | 192,192,192, 192,192,192, 255,255,255, 128,128,128, 64, 64, 64, 33 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 34 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 192,192,192, 35 | 255,255,255, 128,128,128, 128,128,128, 128,128,128, 128,128,128, 36 | 128,128,128, 128,128,128, 128,128,128, 128,128,128, 128,128,128, 37 | 128,128,128, 128,128,128, 128,128,128, 255,255,255, 38 | }; 39 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_downarrow.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int glui_img_downarrow[] = { 16, 16, /* width, height */ 4 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7 | 0, 0, 0, 192,192,192, 128,128,128, 128,128,128, 128,128,128, 8 | 128,128,128, 128,128,128, 128,128,128, 128,128,128, 128,128,128, 9 | 128,128,128, 128,128,128, 128,128,128, 128,128,128, 128,128,128, 10 | 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 192,192,192, 11 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 12 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 13 | 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 14 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 15 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 16 | 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 17 | 255,255,255, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 18 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 19 | 192,192,192, 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 20 | 192,192,192, 255,255,255, 192,192,192, 192,192,192, 192,192,192, 21 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 22 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 128,128,128, 23 | 0, 0, 0, 192,192,192, 255,255,255, 192,192,192, 192,192,192, 24 | 192,192,192, 192,192,192, 192,192,192, 0, 0, 0, 192,192,192, 25 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 26 | 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 192,192,192, 27 | 192,192,192, 192,192,192, 192,192,192, 0, 0, 0, 0, 0, 0, 28 | 0, 0, 0, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 29 | 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 30 | 192,192,192, 192,192,192, 192,192,192, 0, 0, 0, 0, 0, 0, 31 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 192,192,192, 192,192,192, 32 | 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 33 | 255,255,255, 192,192,192, 192,192,192, 0, 0, 0, 0, 0, 0, 34 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35 | 192,192,192, 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 36 | 192,192,192, 255,255,255, 192,192,192, 192,192,192, 192,192,192, 37 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 38 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 128,128,128, 39 | 0, 0, 0, 192,192,192, 255,255,255, 192,192,192, 192,192,192, 40 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 41 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 42 | 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 192,192,192, 43 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 44 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 45 | 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 46 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 47 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 48 | 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 49 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 50 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 51 | 255,255,255, 255,255,255, 255,255,255, 128,128,128, 0, 0, 0, 52 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 53 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 54 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 55 | 0, 0, 0, 56 | }; 57 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_leftarrow.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int glui_img_leftarrow[] = { 16, 16, /* width, height */ 4 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7 | 0, 0, 0, 192,192,192, 128,128,128, 128,128,128, 128,128,128, 8 | 128,128,128, 128,128,128, 128,128,128, 128,128,128, 128,128,128, 9 | 128,128,128, 128,128,128, 128,128,128, 128,128,128, 128,128,128, 10 | 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 192,192,192, 11 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 12 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 13 | 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 14 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 15 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 16 | 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 17 | 255,255,255, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 18 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 19 | 192,192,192, 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 20 | 192,192,192, 255,255,255, 192,192,192, 192,192,192, 192,192,192, 21 | 192,192,192, 192,192,192, 192,192,192, 0, 0, 0, 192,192,192, 22 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 128,128,128, 23 | 0, 0, 0, 192,192,192, 255,255,255, 192,192,192, 192,192,192, 24 | 192,192,192, 192,192,192, 192,192,192, 0, 0, 0, 0, 0, 0, 25 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 26 | 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 192,192,192, 27 | 192,192,192, 192,192,192, 192,192,192, 0, 0, 0, 0, 0, 0, 28 | 0, 0, 0, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 29 | 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 30 | 192,192,192, 192,192,192, 192,192,192, 0, 0, 0, 0, 0, 0, 31 | 0, 0, 0, 0, 0, 0, 192,192,192, 192,192,192, 192,192,192, 32 | 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 33 | 255,255,255, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 34 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 192,192,192, 192,192,192, 35 | 192,192,192, 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 36 | 192,192,192, 255,255,255, 192,192,192, 192,192,192, 192,192,192, 37 | 192,192,192, 192,192,192, 0, 0, 0, 0, 0, 0, 192,192,192, 38 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 128,128,128, 39 | 0, 0, 0, 192,192,192, 255,255,255, 192,192,192, 192,192,192, 40 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 0, 0, 0, 41 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 42 | 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 192,192,192, 43 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 44 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 45 | 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 46 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 47 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 48 | 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 49 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 50 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 51 | 255,255,255, 255,255,255, 255,255,255, 128,128,128, 0, 0, 0, 52 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 53 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 54 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 55 | 0, 0, 0, 56 | }; 57 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_listbox_down.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int glui_img_listbox_down[] = { 11, 17, /* width, height */ 4 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 | 0, 0, 0, 127,127,127, 127,127,127, 127,127,127, 127,127,127, 7 | 127,127,127, 127,127,127, 127,127,127, 127,127,127, 127,127,127, 8 | 127,127,127, 0, 0, 0, 127,127,127, 191,191,191, 191,191,191, 9 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 10 | 191,191,191, 127,127,127, 0, 0, 0, 127,127,127, 191,191,191, 11 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 12 | 191,191,191, 191,191,191, 127,127,127, 0, 0, 0, 127,127,127, 13 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 14 | 191,191,191, 191,191,191, 191,191,191, 127,127,127, 0, 0, 0, 15 | 127,127,127, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 16 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 127,127,127, 17 | 0, 0, 0, 127,127,127, 191,191,191, 191,191,191, 191,191,191, 18 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 19 | 127,127,127, 0, 0, 0, 127,127,127, 191,191,191, 191,191,191, 20 | 191,191,191, 191,191,191, 127,127,127, 191,191,191, 191,191,191, 21 | 191,191,191, 127,127,127, 0, 0, 0, 127,127,127, 191,191,191, 22 | 191,191,191, 191,191,191, 127,127,127, 127,127,127, 127,127,127, 23 | 191,191,191, 191,191,191, 127,127,127, 0, 0, 0, 127,127,127, 24 | 191,191,191, 191,191,191, 127,127,127, 127,127,127, 127,127,127, 25 | 127,127,127, 127,127,127, 191,191,191, 127,127,127, 0, 0, 0, 26 | 127,127,127, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 27 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 127,127,127, 28 | 0, 0, 0, 127,127,127, 191,191,191, 191,191,191, 191,191,191, 29 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 30 | 127,127,127, 0, 0, 0, 127,127,127, 191,191,191, 191,191,191, 31 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 32 | 191,191,191, 127,127,127, 0, 0, 0, 127,127,127, 191,191,191, 33 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 34 | 191,191,191, 191,191,191, 127,127,127, 0, 0, 0, 127,127,127, 35 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 36 | 191,191,191, 191,191,191, 191,191,191, 127,127,127, 0, 0, 0, 37 | 127,127,127, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 38 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 127,127,127, 39 | 0, 0, 0, 127,127,127, 127,127,127, 127,127,127, 127,127,127, 40 | 127,127,127, 127,127,127, 127,127,127, 127,127,127, 127,127,127, 41 | 127,127,127, 0, 0, 0, 42 | }; 43 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_listbox_down.ppm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/mpitrace/1c168af279b37e08d662c125735d30db25eb2777/traceview/glui-2.36/src/glui_img_listbox_down.ppm -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_listbox_up.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int glui_img_listbox_up[] = { 11, 17, /* width, height */ 4 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 | 0, 0, 0, 191,191,191, 127,127,127, 127,127,127, 127,127,127, 7 | 127,127,127, 127,127,127, 127,127,127, 127,127,127, 127,127,127, 8 | 127,127,127, 0, 0, 0, 191,191,191, 255,255,255, 191,191,191, 9 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 10 | 191,191,191, 127,127,127, 0, 0, 0, 191,191,191, 255,255,255, 11 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 12 | 191,191,191, 191,191,191, 127,127,127, 0, 0, 0, 191,191,191, 13 | 255,255,255, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 14 | 191,191,191, 191,191,191, 191,191,191, 127,127,127, 0, 0, 0, 15 | 191,191,191, 255,255,255, 191,191,191, 191,191,191, 191,191,191, 16 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 127,127,127, 17 | 0, 0, 0, 191,191,191, 255,255,255, 191,191,191, 191,191,191, 18 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 19 | 127,127,127, 0, 0, 0, 191,191,191, 255,255,255, 191,191,191, 20 | 191,191,191, 191,191,191, 0, 0, 0, 191,191,191, 191,191,191, 21 | 191,191,191, 127,127,127, 0, 0, 0, 191,191,191, 255,255,255, 22 | 191,191,191, 191,191,191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23 | 191,191,191, 191,191,191, 127,127,127, 0, 0, 0, 191,191,191, 24 | 255,255,255, 191,191,191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25 | 0, 0, 0, 0, 0, 0, 191,191,191, 127,127,127, 0, 0, 0, 26 | 191,191,191, 255,255,255, 191,191,191, 191,191,191, 191,191,191, 27 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 127,127,127, 28 | 0, 0, 0, 191,191,191, 255,255,255, 191,191,191, 191,191,191, 29 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 30 | 127,127,127, 0, 0, 0, 191,191,191, 255,255,255, 191,191,191, 31 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 32 | 191,191,191, 127,127,127, 0, 0, 0, 191,191,191, 255,255,255, 33 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 34 | 191,191,191, 191,191,191, 127,127,127, 0, 0, 0, 191,191,191, 35 | 255,255,255, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 36 | 191,191,191, 191,191,191, 191,191,191, 127,127,127, 0, 0, 0, 37 | 191,191,191, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 38 | 255,255,255, 255,255,255, 255,255,252, 255,255,255, 127,127,127, 39 | 0, 0, 0, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 40 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 41 | 191,191,191, 0, 0, 0, 42 | }; 43 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_listbox_up.ppm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/mpitrace/1c168af279b37e08d662c125735d30db25eb2777/traceview/glui-2.36/src/glui_img_listbox_up.ppm -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_listbox_up_dis.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int glui_img_listbox_up_dis[] = { 11, 17, /* width, height */ 4 | 127,127,127, 127,127,127, 127,127,127, 127,127,127, 127,127,127, 5 | 127,127,127, 127,127,127, 127,127,127, 127,127,127, 127,127,127, 6 | 127,127,127, 191,191,191, 127,127,127, 127,127,127, 127,127,127, 7 | 127,127,127, 127,127,127, 127,127,127, 127,127,127, 127,127,127, 8 | 127,127,127, 127,127,127, 191,191,191, 255,255,255, 191,191,191, 9 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 10 | 191,191,191, 127,127,127, 127,127,127, 191,191,191, 255,255,255, 11 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 12 | 191,191,191, 191,191,191, 127,127,127, 127,127,127, 191,191,191, 13 | 255,255,255, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 14 | 191,191,191, 191,191,191, 191,191,191, 127,127,127, 127,127,127, 15 | 191,191,191, 255,255,255, 191,191,191, 191,191,191, 191,191,191, 16 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 127,127,127, 17 | 127,127,127, 191,191,191, 255,255,255, 191,191,191, 191,191,191, 18 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 19 | 127,127,127, 127,127,127, 191,191,191, 255,255,255, 191,191,191, 20 | 191,191,191, 191,191,191, 254,254,254, 191,191,191, 191,191,191, 21 | 191,191,191, 127,127,127, 127,127,127, 191,191,191, 255,255,255, 22 | 191,191,191, 191,191,191, 127,127,127, 127,127,127, 254,254,254, 23 | 191,191,191, 191,191,191, 127,127,127, 127,127,127, 191,191,191, 24 | 255,255,255, 191,191,191, 127,127,127, 127,127,127, 127,127,127, 25 | 127,127,127, 254,254,254, 191,191,191, 127,127,127, 127,127,127, 26 | 191,191,191, 255,255,255, 191,191,191, 191,191,191, 191,191,191, 27 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 127,127,127, 28 | 127,127,127, 191,191,191, 255,255,255, 191,191,191, 191,191,191, 29 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 30 | 127,127,127, 127,127,127, 191,191,191, 255,255,255, 191,191,191, 31 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 32 | 191,191,191, 127,127,127, 127,127,127, 191,191,191, 255,255,255, 33 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 34 | 191,191,191, 191,191,191, 127,127,127, 127,127,127, 191,191,191, 35 | 255,255,255, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 36 | 191,191,191, 191,191,191, 191,191,191, 127,127,127, 127,127,127, 37 | 191,191,191, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 38 | 255,255,255, 255,255,255, 255,255,252, 255,255,255, 127,127,127, 39 | 127,127,127, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 40 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 41 | 191,191,191, 127,127,127, 42 | }; 43 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_listbox_up_dis.ppm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/mpitrace/1c168af279b37e08d662c125735d30db25eb2777/traceview/glui-2.36/src/glui_img_listbox_up_dis.ppm -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_radiobutton_0.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int glui_img_radiobutton_0[] = { 14, 14, /* width, height */ 4 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 5 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 6 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 7 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 255,255,255, 8 | 255,255,255, 255,255,255, 255,255,255, 192,192,192, 192,192,192, 9 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 10 | 192,192,192, 255,255,255, 255,255,255, 192,192,192, 192,192,192, 11 | 192,192,192, 192,192,192, 255,255,255, 255,255,255, 192,192,192, 12 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 128,128,128, 13 | 192,192,192, 192,192,192, 255,255,255, 255,255,255, 255,255,255, 14 | 255,255,255, 192,192,192, 192,192,192, 255,255,255, 192,192,192, 15 | 192,192,192, 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 16 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 17 | 255,255,255, 192,192,192, 255,255,255, 192,192,192, 192,192,192, 18 | 192,192,192, 128,128,128, 0, 0, 0, 255,255,255, 255,255,255, 19 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 20 | 255,255,255, 192,192,192, 255,255,255, 192,192,192, 192,192,192, 21 | 128,128,128, 0, 0, 0, 255,255,255, 255,255,255, 255,255,255, 22 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 23 | 192,192,192, 255,255,255, 192,192,192, 192,192,192, 128,128,128, 24 | 0, 0, 0, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 25 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 192,192,192, 26 | 255,255,255, 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 27 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 28 | 255,255,255, 255,255,255, 255,255,255, 192,192,192, 255,255,255, 29 | 192,192,192, 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 30 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 31 | 255,255,255, 192,192,192, 255,255,255, 192,192,192, 192,192,192, 32 | 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 0, 0, 0, 33 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 0, 0, 0, 34 | 0, 0, 0, 255,255,255, 192,192,192, 192,192,192, 192,192,192, 35 | 192,192,192, 192,192,192, 128,128,128, 128,128,128, 0, 0, 0, 36 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 128,128,128, 128,128,128, 37 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 38 | 192,192,192, 192,192,192, 192,192,192, 128,128,128, 128,128,128, 39 | 128,128,128, 128,128,128, 192,192,192, 192,192,192, 192,192,192, 40 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 41 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 42 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 43 | 192,192,192, 44 | }; 45 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_radiobutton_0_dis.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int glui_img_radiobutton_0_dis[] = { 14, 14, /* width, height */ 4 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 5 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 6 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 7 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 255,255,255, 8 | 255,255,255, 255,255,255, 255,255,255, 192,192,192, 192,192,192, 9 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 10 | 192,192,192, 255,255,255, 255,255,255, 192,192,192, 192,192,192, 11 | 192,192,192, 192,192,192, 255,255,255, 255,255,255, 192,192,192, 12 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 128,128,128, 13 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 14 | 192,192,192, 192,192,192, 192,192,192, 255,255,255, 192,192,192, 15 | 192,192,192, 192,192,192, 192,192,192, 128,128,128, 64, 64, 64, 16 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 17 | 192,192,192, 192,192,192, 255,255,255, 192,192,192, 192,192,192, 18 | 192,192,192, 128,128,128, 64, 64, 64, 192,192,192, 192,192,192, 19 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 20 | 192,192,192, 192,192,192, 255,255,255, 192,192,192, 192,192,192, 21 | 128,128,128, 64, 64, 64, 192,192,192, 192,192,192, 192,192,192, 22 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 23 | 192,192,192, 255,255,255, 192,192,192, 192,192,192, 128,128,128, 24 | 64, 64, 64, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 25 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 26 | 255,255,255, 192,192,192, 192,192,192, 128,128,128, 64, 64, 64, 27 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 28 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 255,255,255, 29 | 192,192,192, 192,192,192, 192,192,192, 128,128,128, 64, 64, 64, 30 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 31 | 192,192,192, 192,192,192, 255,255,255, 192,192,192, 192,192,192, 32 | 192,192,192, 192,192,192, 128,128,128, 64, 64, 64, 64, 64, 64, 33 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 64, 64, 64, 34 | 64, 64, 64, 255,255,255, 192,192,192, 192,192,192, 192,192,192, 35 | 192,192,192, 192,192,192, 128,128,128, 128,128,128, 64, 64, 64, 36 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 128,128,128, 128,128,128, 37 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 38 | 192,192,192, 192,192,192, 192,192,192, 128,128,128, 128,128,128, 39 | 128,128,128, 128,128,128, 192,192,192, 192,192,192, 192,192,192, 40 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 41 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 42 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 43 | 192,192,192, 44 | }; 45 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_radiobutton_1.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int glui_img_radiobutton_1[] = { 14, 14, /* width, height */ 4 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 5 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 6 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 7 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 255,255,255, 8 | 255,255,255, 255,255,255, 255,255,255, 192,192,192, 192,192,192, 9 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 10 | 192,192,192, 255,255,255, 255,255,255, 192,192,192, 192,192,192, 11 | 192,192,192, 192,192,192, 255,255,255, 255,255,255, 192,192,192, 12 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 128,128,128, 13 | 192,192,192, 192,192,192, 255,255,255, 255,255,255, 255,255,255, 14 | 255,255,255, 192,192,192, 192,192,192, 255,255,255, 192,192,192, 15 | 192,192,192, 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 16 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 17 | 255,255,255, 192,192,192, 255,255,255, 192,192,192, 192,192,192, 18 | 192,192,192, 128,128,128, 0, 0, 0, 255,255,255, 255,255,255, 19 | 255,255,255, 0, 0, 0, 0, 0, 0, 255,255,255, 255,255,255, 20 | 255,255,255, 192,192,192, 255,255,255, 192,192,192, 192,192,192, 21 | 128,128,128, 0, 0, 0, 255,255,255, 255,255,255, 0, 0, 0, 22 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 255,255,255, 255,255,255, 23 | 192,192,192, 255,255,255, 192,192,192, 192,192,192, 128,128,128, 24 | 0, 0, 0, 255,255,255, 255,255,255, 0, 0, 0, 0, 0, 0, 25 | 0, 0, 0, 0, 0, 0, 255,255,255, 255,255,255, 192,192,192, 26 | 255,255,255, 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 27 | 255,255,255, 255,255,255, 255,255,255, 0, 0, 0, 0, 0, 0, 28 | 255,255,255, 255,255,255, 255,255,255, 192,192,192, 255,255,255, 29 | 192,192,192, 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 30 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 31 | 255,255,255, 192,192,192, 255,255,255, 192,192,192, 192,192,192, 32 | 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 0, 0, 0, 33 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 0, 0, 0, 34 | 0, 0, 0, 255,255,255, 192,192,192, 192,192,192, 192,192,192, 35 | 192,192,192, 192,192,192, 128,128,128, 128,128,128, 0, 0, 0, 36 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 128,128,128, 128,128,128, 37 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 38 | 192,192,192, 192,192,192, 192,192,192, 128,128,128, 128,128,128, 39 | 128,128,128, 128,128,128, 192,192,192, 192,192,192, 192,192,192, 40 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 41 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 42 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 43 | 192,192,192, 44 | }; 45 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_radiobutton_1_dis.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int glui_img_radiobutton_1_dis[] = { 14, 14, /* width, height */ 4 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 5 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 6 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 7 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 255,255,255, 8 | 255,255,255, 255,255,255, 255,255,255, 192,192,192, 192,192,192, 9 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 10 | 192,192,192, 255,255,255, 255,255,255, 192,192,192, 192,192,192, 11 | 192,192,192, 192,192,192, 255,255,255, 255,255,255, 192,192,192, 12 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 128,128,128, 13 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 14 | 192,192,192, 192,192,192, 192,192,192, 255,255,255, 192,192,192, 15 | 192,192,192, 192,192,192, 192,192,192, 128,128,128, 64, 64, 64, 16 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 17 | 192,192,192, 192,192,192, 255,255,255, 192,192,192, 192,192,192, 18 | 192,192,192, 128,128,128, 64, 64, 64, 192,192,192, 192,192,192, 19 | 192,192,192, 64, 64, 64, 64, 64, 64, 192,192,192, 192,192,192, 20 | 192,192,192, 192,192,192, 255,255,255, 192,192,192, 192,192,192, 21 | 128,128,128, 64, 64, 64, 192,192,192, 192,192,192, 64, 64, 64, 22 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 192,192,192, 192,192,192, 23 | 192,192,192, 255,255,255, 192,192,192, 192,192,192, 128,128,128, 24 | 64, 64, 64, 192,192,192, 192,192,192, 64, 64, 64, 64, 64, 64, 25 | 64, 64, 64, 64, 64, 64, 192,192,192, 192,192,192, 192,192,192, 26 | 255,255,255, 192,192,192, 192,192,192, 128,128,128, 64, 64, 64, 27 | 192,192,192, 192,192,192, 192,192,192, 64, 64, 64, 64, 64, 64, 28 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 255,255,255, 29 | 192,192,192, 192,192,192, 192,192,192, 128,128,128, 64, 64, 64, 30 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 31 | 192,192,192, 192,192,192, 255,255,255, 192,192,192, 192,192,192, 32 | 192,192,192, 192,192,192, 128,128,128, 64, 64, 64, 64, 64, 64, 33 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 64, 64, 64, 34 | 64, 64, 64, 255,255,255, 192,192,192, 192,192,192, 192,192,192, 35 | 192,192,192, 192,192,192, 128,128,128, 128,128,128, 64, 64, 64, 36 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 128,128,128, 128,128,128, 37 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 38 | 192,192,192, 192,192,192, 192,192,192, 128,128,128, 128,128,128, 39 | 128,128,128, 128,128,128, 192,192,192, 192,192,192, 192,192,192, 40 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 41 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 42 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 43 | 192,192,192, 44 | }; 45 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_rightarrow.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int glui_img_rightarrow[] = { 16, 16, /* width, height */ 4 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7 | 0, 0, 0, 192,192,192, 128,128,128, 128,128,128, 128,128,128, 8 | 128,128,128, 128,128,128, 128,128,128, 128,128,128, 128,128,128, 9 | 128,128,128, 128,128,128, 128,128,128, 128,128,128, 128,128,128, 10 | 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 192,192,192, 11 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 12 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 13 | 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 14 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 15 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 16 | 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 17 | 255,255,255, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 18 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 19 | 192,192,192, 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 20 | 192,192,192, 255,255,255, 192,192,192, 192,192,192, 192,192,192, 21 | 192,192,192, 0, 0, 0, 192,192,192, 192,192,192, 192,192,192, 22 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 128,128,128, 23 | 0, 0, 0, 192,192,192, 255,255,255, 192,192,192, 192,192,192, 24 | 192,192,192, 192,192,192, 0, 0, 0, 0, 0, 0, 192,192,192, 25 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 26 | 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 192,192,192, 27 | 192,192,192, 192,192,192, 192,192,192, 0, 0, 0, 0, 0, 0, 28 | 0, 0, 0, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 29 | 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 30 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 0, 0, 0, 31 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 192,192,192, 192,192,192, 32 | 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 33 | 255,255,255, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 34 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 192,192,192, 192,192,192, 35 | 192,192,192, 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 36 | 192,192,192, 255,255,255, 192,192,192, 192,192,192, 192,192,192, 37 | 192,192,192, 0, 0, 0, 0, 0, 0, 192,192,192, 192,192,192, 38 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 128,128,128, 39 | 0, 0, 0, 192,192,192, 255,255,255, 192,192,192, 192,192,192, 40 | 192,192,192, 192,192,192, 0, 0, 0, 192,192,192, 192,192,192, 41 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 42 | 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 192,192,192, 43 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 44 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 45 | 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 46 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 47 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 48 | 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 49 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 50 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 51 | 255,255,255, 255,255,255, 255,255,255, 128,128,128, 0, 0, 0, 52 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 53 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 54 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 55 | 0, 0, 0, 56 | }; 57 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_spindown_0.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int glui_img_spindown_0[] = { 12, 8, /* width, height */ 4 | 255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 | 0, 0, 0, 0, 0, 0, 255,255,255, 127,127,127, 127,127,127, 7 | 127,127,127, 127,127,127, 127,127,127, 127,127,127, 127,127,127, 8 | 127,127,127, 127,127,127, 127,127,127, 0, 0, 0, 255,255,255, 9 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 10 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 127,127,127, 11 | 0, 0, 0, 255,255,255, 191,191,191, 191,191,191, 191,191,191, 12 | 191,191,191, 0, 0, 0, 127,127,127, 191,191,191, 191,191,191, 13 | 191,191,191, 127,127,127, 0, 0, 0, 255,255,255, 191,191,191, 14 | 191,191,191, 191,191,191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15 | 127,127,127, 191,191,191, 191,191,191, 127,127,127, 0, 0, 0, 16 | 255,255,255, 191,191,191, 191,191,191, 0, 0, 0, 0, 0, 0, 17 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 127,127,127, 191,191,191, 18 | 127,127,127, 0, 0, 0, 255,255,255, 191,191,191, 191,191,191, 19 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 20 | 191,191,191, 191,191,191, 127,127,127, 0, 0, 0, 255,255,255, 21 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 22 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 23 | 0, 0, 0, 24 | }; 25 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_spindown_1.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int glui_img_spindown_1[] = { 12, 8, /* width, height */ 4 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 5 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 6 | 255,255,255, 255,255,255, 0, 0, 0, 127,127,127, 191,191,191, 7 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 8 | 191,191,191, 191,191,191, 191,191,191, 255,255,255, 0, 0, 0, 9 | 127,127,127, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 10 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 11 | 255,255,255, 0, 0, 0, 127,127,127, 191,191,191, 191,191,191, 12 | 191,191,191, 127,127,127, 0, 0, 0, 191,191,191, 191,191,191, 13 | 191,191,191, 191,191,191, 255,255,255, 0, 0, 0, 127,127,127, 14 | 191,191,191, 191,191,191, 127,127,127, 0, 0, 0, 0, 0, 0, 15 | 0, 0, 0, 191,191,191, 191,191,191, 191,191,191, 255,255,255, 16 | 0, 0, 0, 127,127,127, 191,191,191, 127,127,127, 0, 0, 0, 17 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191,191,191, 18 | 191,191,191, 255,255,255, 0, 0, 0, 127,127,127, 191,191,191, 19 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 20 | 191,191,191, 191,191,191, 191,191,191, 255,255,255, 0, 0, 0, 21 | 127,127,127, 127,127,127, 127,127,127, 127,127,127, 127,127,127, 22 | 127,127,127, 127,127,127, 127,127,127, 127,127,127, 191,191,191, 23 | 255,255,255, 24 | }; 25 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_spindown_dis.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int glui_img_spindown_dis[] = { 12, 8, /* width, height */ 4 | 255,255,255, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 5 | 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 6 | 64, 64, 64, 64, 64, 64, 255,255,255, 127,127,127, 127,127,127, 7 | 127,127,127, 127,127,127, 127,127,127, 127,127,127, 127,127,127, 8 | 127,127,127, 127,127,127, 127,127,127, 64, 64, 64, 255,255,255, 9 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 10 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 127,127,127, 11 | 64, 64, 64, 255,255,255, 191,191,191, 191,191,191, 191,191,191, 12 | 191,191,191, 127,127,127, 255,255,255, 191,191,191, 191,191,191, 13 | 191,191,191, 127,127,127, 64, 64, 64, 255,255,255, 191,191,191, 14 | 191,191,191, 191,191,191, 127,127,127, 127,127,127, 127,127,127, 15 | 255,255,255, 191,191,191, 191,191,191, 127,127,127, 64, 64, 64, 16 | 255,255,255, 191,191,191, 191,191,191, 127,127,127, 127,127,127, 17 | 127,127,127, 127,127,127, 127,127,127, 255,255,255, 191,191,191, 18 | 127,127,127, 64, 64, 64, 255,255,255, 191,191,191, 191,191,191, 19 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 20 | 191,191,191, 191,191,191, 127,127,127, 64, 64, 64, 255,255,255, 21 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 22 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 23 | 64, 64, 64, 24 | }; 25 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_spinup_0.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int glui_img_spinup_0[] = { 12, 8, /* width, height */ 4 | 255,255,255, 127,127,127, 127,127,127, 127,127,127, 127,127,127, 5 | 127,127,127, 127,127,127, 127,127,127, 127,127,127, 127,127,127, 6 | 127,127,127, 0, 0, 0, 255,255,255, 191,191,191, 191,191,191, 7 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 8 | 191,191,191, 191,191,191, 127,127,127, 0, 0, 0, 255,255,255, 9 | 191,191,191, 191,191,191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10 | 0, 0, 0, 0, 0, 0, 127,127,127, 191,191,191, 127,127,127, 11 | 0, 0, 0, 255,255,255, 191,191,191, 191,191,191, 191,191,191, 12 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 127,127,127, 191,191,191, 13 | 191,191,191, 127,127,127, 0, 0, 0, 255,255,255, 191,191,191, 14 | 191,191,191, 191,191,191, 191,191,191, 0, 0, 0, 127,127,127, 15 | 191,191,191, 191,191,191, 191,191,191, 127,127,127, 0, 0, 0, 16 | 255,255,255, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 17 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 18 | 127,127,127, 0, 0, 0, 255,255,255, 191,191,191, 191,191,191, 19 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 20 | 191,191,191, 191,191,191, 191,191,191, 0, 0, 0, 255,255,255, 21 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 22 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 23 | 255,255,255, 24 | }; 25 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_spinup_1.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int glui_img_spinup_1[] = { 12, 8, /* width, height */ 4 | 0, 0, 0, 127,127,127, 255,255,255, 255,255,255, 255,255,255, 5 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 6 | 255,255,255, 255,255,255, 0, 0, 0, 127,127,127, 191,191,191, 7 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 8 | 191,191,191, 191,191,191, 191,191,191, 255,255,255, 0, 0, 0, 9 | 127,127,127, 191,191,191, 127,127,127, 0, 0, 0, 0, 0, 0, 10 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 191,191,191, 191,191,191, 11 | 255,255,255, 0, 0, 0, 127,127,127, 191,191,191, 191,191,191, 12 | 127,127,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191,191,191, 13 | 191,191,191, 191,191,191, 255,255,255, 0, 0, 0, 127,127,127, 14 | 191,191,191, 191,191,191, 191,191,191, 127,127,127, 0, 0, 0, 15 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 255,255,255, 16 | 0, 0, 0, 127,127,127, 191,191,191, 191,191,191, 191,191,191, 17 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 18 | 191,191,191, 255,255,255, 0, 0, 0, 127,127,127, 127,127,127, 19 | 127,127,127, 127,127,127, 127,127,127, 127,127,127, 127,127,127, 20 | 127,127,127, 127,127,127, 191,191,191, 255,255,255, 0, 0, 0, 21 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23 | 255,255,255, 24 | }; 25 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_spinup_dis.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int glui_img_spinup_dis[] = { 12, 8, /* width, height */ 4 | 255,255,255, 127,127,127, 127,127,127, 127,127,127, 127,127,127, 5 | 127,127,127, 127,127,127, 127,127,127, 127,127,127, 127,127,127, 6 | 127,127,127, 64, 64, 64, 255,255,255, 191,191,191, 191,191,191, 7 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 8 | 191,191,191, 191,191,191, 127,127,127, 64, 64, 64, 255,255,255, 9 | 191,191,191, 191,191,191, 127,127,127, 127,127,127, 127,127,127, 10 | 127,127,127, 127,127,127, 255,255,255, 191,191,191, 127,127,127, 11 | 64, 64, 64, 255,255,255, 191,191,191, 191,191,191, 191,191,191, 12 | 127,127,127, 127,127,127, 127,127,127, 255,255,255, 191,191,191, 13 | 191,191,191, 127,127,127, 64, 64, 64, 255,255,255, 191,191,191, 14 | 191,191,191, 191,191,191, 191,191,191, 127,127,127, 255,255,255, 15 | 191,191,191, 191,191,191, 191,191,191, 127,127,127, 64, 64, 64, 16 | 255,255,255, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 17 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 18 | 127,127,127, 64, 64, 64, 255,255,255, 191,191,191, 191,191,191, 19 | 191,191,191, 191,191,191, 191,191,191, 191,191,191, 191,191,191, 20 | 191,191,191, 191,191,191, 191,191,191, 64, 64, 64, 255,255,255, 21 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 22 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 23 | 255,255,255, 24 | }; 25 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_img_uparrow.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int glui_img_uparrow[] = { 16, 16, /* width, height */ 4 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7 | 0, 0, 0, 192,192,192, 128,128,128, 128,128,128, 128,128,128, 8 | 128,128,128, 128,128,128, 128,128,128, 128,128,128, 128,128,128, 9 | 128,128,128, 128,128,128, 128,128,128, 128,128,128, 128,128,128, 10 | 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 192,192,192, 11 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 12 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 13 | 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 14 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 15 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 16 | 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 17 | 255,255,255, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 18 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 19 | 192,192,192, 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 20 | 192,192,192, 255,255,255, 192,192,192, 192,192,192, 192,192,192, 21 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 22 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 128,128,128, 23 | 0, 0, 0, 192,192,192, 255,255,255, 192,192,192, 192,192,192, 24 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25 | 0, 0, 0, 0, 0, 0, 192,192,192, 192,192,192, 192,192,192, 26 | 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 192,192,192, 27 | 192,192,192, 192,192,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28 | 0, 0, 0, 0, 0, 0, 192,192,192, 192,192,192, 192,192,192, 29 | 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 30 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 0, 0, 0, 31 | 0, 0, 0, 0, 0, 0, 192,192,192, 192,192,192, 192,192,192, 32 | 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 33 | 255,255,255, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 34 | 192,192,192, 0, 0, 0, 192,192,192, 192,192,192, 192,192,192, 35 | 192,192,192, 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 36 | 192,192,192, 255,255,255, 192,192,192, 192,192,192, 192,192,192, 37 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 38 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 128,128,128, 39 | 0, 0, 0, 192,192,192, 255,255,255, 192,192,192, 192,192,192, 40 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 41 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 42 | 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 192,192,192, 43 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 44 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 45 | 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 255,255,255, 46 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 47 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 48 | 192,192,192, 192,192,192, 128,128,128, 0, 0, 0, 192,192,192, 49 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 50 | 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 51 | 255,255,255, 255,255,255, 255,255,255, 128,128,128, 0, 0, 0, 52 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 53 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 54 | 192,192,192, 192,192,192, 192,192,192, 192,192,192, 192,192,192, 55 | 0, 0, 0, 56 | }; 57 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | This software is provided 'as-is', without any express or implied 3 | warranty. In no event will the authors be held liable for any damages 4 | arising from the use of this software. 5 | 6 | Permission is granted to anyone to use this software for any purpose, 7 | including commercial applications, and to alter it and redistribute it 8 | freely, subject to the following restrictions: 9 | 10 | 1. The origin of this software must not be misrepresented; you must not 11 | claim that you wrote the original software. If you use this software 12 | in a product, an acknowledgment in the product documentation would be 13 | appreciated but is not required. 14 | 2. Altered source versions must be plainly marked as such, and must not be 15 | misrepresented as being the original software. 16 | 3. This notice may not be removed or altered from any source 17 | */ 18 | #ifndef GLUI_INTERNAL_H 19 | #define GLUI_INTERNAL_H 20 | 21 | #include 22 | #include 23 | 24 | #ifndef AND 25 | #define AND && 26 | #define OR || 27 | #define NOT ! 28 | #endif 29 | 30 | #ifndef MAX 31 | #define MAX(a,b) ((a)>(b) ? (a) : (b)) 32 | #define MIN(a,b) ((a)<(b) ? (a) : (b)) 33 | #endif 34 | 35 | #ifndef ABS 36 | #define ABS(a) ((a)>=0 ? (a) : (-(a))) 37 | #endif 38 | 39 | /******************** bit comparisons and operations ***************/ 40 | #ifndef TEST_BIT 41 | #define TEST_BIT( x, b ) (((x) & (1<<(b))) != 0 ) 42 | #define SET_BIT( x, b ) ((x) |= (1 << (b))) 43 | #define CLEAR_BIT( x, b ) ((x) &= ~(1 << (b))) 44 | #define TOGGLE_BIT( x, b ) ((TEST_BIT(x,b)) ?(CLEAR_BIT(x,b)):(SET_BIT(x,b))) 45 | #endif 46 | 47 | #ifndef TEST_AND 48 | #define TEST_AND( a, b ) ((a&b)==b) 49 | #endif 50 | 51 | 52 | #ifndef M_PI 53 | #define M_PI 3.141592654 54 | #endif 55 | 56 | /*********** flush the stdout and stderr output streams *************/ 57 | #ifndef flushout 58 | #define flushout fflush(stdout) 59 | #define flusherr fflush(stderr) 60 | #endif 61 | 62 | /********** Debugging functions *************************************/ 63 | #ifndef error_return 64 | #define error_return( c ); {fprintf(stderr,c);return;} 65 | #endif 66 | 67 | /************************* floating-point random ********************/ 68 | #ifndef randf 69 | #define randf() ((float) rand() / (float)RAND_MAX ) 70 | #endif 71 | 72 | #ifndef SIGN 73 | #define SIGN(x) ((x)>=0 ? 1 : -1) 74 | #endif 75 | 76 | /****************** conversion between degrees and radians **********/ 77 | #ifndef DEG2RAD 78 | #define DEG2RAD(x) ((x)/180.0*M_PI) 79 | #define RAD2DEG(x) ((x)/M_PI*180.0) 80 | #endif 81 | 82 | /***************** clamp a value to some fixed interval *************/ 83 | #ifndef CLAMP 84 | #define CLAMP(x,lo,hi) {if ((x) < (lo)) {(x)=(lo);} else if((x) > (hi)) {(x)=(hi);}} 85 | #endif 86 | 87 | /************ check if a value lies within a closed interval *********/ 88 | #ifndef IN_BOUNDS 89 | #define IN_BOUNDS( x, lo, hi ) ( (x) >= (lo) AND (x) <= (hi) ) 90 | #endif 91 | 92 | /************ check if a 2D point lies within a 2D box ***************/ 93 | #ifndef PT_IN_BOX 94 | #define PT_IN_BOX( x, y, lo_x, hi_x, lo_y, hi_y ) \ 95 | ( IN_BOUNDS(x,lo_x,hi_x) AND IN_BOUNDS(y,lo_y,hi_y) ) 96 | #endif 97 | 98 | /****** check if value lies on proper side of another value *****/ 99 | /*** if side is positive => proper side is positive, else negative **/ 100 | #ifndef CHECK_PROPER_SIDE 101 | #define CHECK_PROPER_SIDE(x,val,side) ((side) > 0 ? (x) > (val) : (x) < (val)) 102 | #endif 103 | 104 | 105 | /***** Small value when we want to do a comparison to 'close to zero' *****/ 106 | #ifndef FUDGE 107 | #define FUDGE .00001 108 | #endif 109 | 110 | 111 | /******************* swap two values, using a temp variable *********/ 112 | #ifndef SWAP2 113 | #define SWAP2(a,b,t) {t=a;a=b;b=t;} 114 | #endif 115 | 116 | #define VEC3_TO_ARRAY(v,a) a[0]=v[0], a[1]=v[1], a[2]=v[2] 117 | 118 | /**** Return the ASCII control code given the non-control ASCII character */ 119 | #define CTRL(c) ( (c>=('a'-1)) ? (c-'a'+1) : (c-'A'+1) ) 120 | 121 | /* 122 | typedef unsigned char Byte; 123 | 124 | #ifndef _RGBC_ 125 | class RGBc 126 | { 127 | public: 128 | Byte r, g, b; 129 | 130 | void set(Byte r,Byte g,Byte b) {this->r=r;this->g=g;this->b=b;} 131 | 132 | RGBc( void ) {} 133 | RGBc( Byte r, Byte g, Byte b ) { set( r, g, b ); } 134 | }; 135 | #define _RGBC_ 136 | #endif 137 | */ 138 | 139 | #endif /* GLUI_INTERNAL_H */ 140 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_internal_control.h: -------------------------------------------------------------------------------- 1 | /* 2 | Header file for use by GLUI controls. 3 | Everything you need is right here. 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | 21 | */ 22 | #ifndef __GLUI_INTERNAL_CONTROL_H 23 | #define __GLUI_INTERNAL_CONTROL_H 24 | 25 | /* This is the main GLUI external header */ 26 | #include "GL/glui.h" 27 | 28 | /* Here's some utility routines */ 29 | #include "glui_internal.h" 30 | 31 | 32 | /** 33 | A GLUI_Control-drawing sentinal object. 34 | On creation, saves the current draw buffer and window. 35 | On destruction, restores draw buffer and window. 36 | This is way nicer than calling save/restore manually. 37 | */ 38 | class GLUI_DrawingSentinal { 39 | int orig_buf, orig_win; 40 | GLUI_Control *c; 41 | public: 42 | /** The constructor sets up the drawing system */ 43 | GLUI_DrawingSentinal(GLUI_Control *c_); 44 | /** The destructor cleans up drawing back how it was */ 45 | ~GLUI_DrawingSentinal(); 46 | 47 | // Do-nothing routine to avoid compiler warning about unused variable 48 | inline void avoid_warning(void) {} 49 | }; 50 | /** Just drop a GLUI_DRAWINGSENTINAL_IDIOM at the start of your draw methods, 51 | and they'll return if we can't be drawn, and 52 | automatically save and restore all needed state. 53 | */ 54 | #define GLUI_DRAWINGSENTINAL_IDIOM if (NOT can_draw()) return; GLUI_DrawingSentinal drawSentinal(this); drawSentinal.avoid_warning(); 55 | 56 | 57 | /** Return the time, in seconds. */ 58 | inline double GLUI_Time(void) {return 0.001*glutGet(GLUT_ELAPSED_TIME);} 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_separator.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | 3 | GLUI User Interface Toolkit 4 | --------------------------- 5 | 6 | glui_separator.cpp - GLUI_Separator control class 7 | 8 | 9 | -------------------------------------------------- 10 | 11 | Copyright (c) 1998 Paul Rademacher 12 | 13 | WWW: http://sourceforge.net/projects/glui/ 14 | Forums: http://sourceforge.net/forum/?group_id=92496 15 | 16 | This software is provided 'as-is', without any express or implied 17 | warranty. In no event will the authors be held liable for any damages 18 | arising from the use of this software. 19 | 20 | Permission is granted to anyone to use this software for any purpose, 21 | including commercial applications, and to alter it and redistribute it 22 | freely, subject to the following restrictions: 23 | 24 | 1. The origin of this software must not be misrepresented; you must not 25 | claim that you wrote the original software. If you use this software 26 | in a product, an acknowledgment in the product documentation would be 27 | appreciated but is not required. 28 | 2. Altered source versions must be plainly marked as such, and must not be 29 | misrepresented as being the original software. 30 | 3. This notice may not be removed or altered from any source distribution. 31 | 32 | *****************************************************************************/ 33 | 34 | #include "glui_internal_control.h" 35 | 36 | /****************************** GLUI_Separator::GLUI_Separator() **********/ 37 | 38 | GLUI_Separator::GLUI_Separator( GLUI_Node *parent ) 39 | { 40 | common_init(); 41 | parent->add_control( this ); 42 | } 43 | 44 | /****************************** GLUI_Separator::draw() **********/ 45 | 46 | void GLUI_Separator::draw( int x, int y ) 47 | { 48 | GLUI_DRAWINGSENTINAL_IDIOM 49 | 50 | int width, indent; 51 | int cont_x, cont_y, cont_w, cont_h, cont_x_off, cont_y_off; 52 | 53 | if ( parent() != NULL ) { 54 | get_this_column_dims(&cont_x, &cont_y, &cont_w, &cont_h, 55 | &cont_x_off, &cont_y_off); 56 | 57 | width = cont_w - cont_x_off*2; 58 | } 59 | else { 60 | width = this->w; 61 | } 62 | 63 | indent = (int) floor(width * .05); 64 | 65 | glLineWidth( 1.0 ); 66 | glBegin( GL_LINES ); 67 | glColor3f( .5, .5, .5 ); 68 | glVertex2i( indent, GLUI_SEPARATOR_HEIGHT/2-1 ); 69 | glVertex2i( width-indent, GLUI_SEPARATOR_HEIGHT/2-1 ); 70 | 71 | glColor3f( 1., 1., 1. ); 72 | glVertex2i( indent, GLUI_SEPARATOR_HEIGHT/2 ); 73 | glVertex2i( width-indent, GLUI_SEPARATOR_HEIGHT/2 ); 74 | glEnd(); 75 | } 76 | 77 | 78 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_statictext.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | 3 | GLUI User Interface Toolkit 4 | --------------------------- 5 | 6 | glui_statictext.cpp - GLUI_StaticText Control 7 | 8 | 9 | -------------------------------------------------- 10 | 11 | Copyright (c) 1998 Paul Rademacher 12 | 13 | WWW: http://sourceforge.net/projects/glui/ 14 | Forums: http://sourceforge.net/forum/?group_id=92496 15 | 16 | This software is provided 'as-is', without any express or implied 17 | warranty. In no event will the authors be held liable for any damages 18 | arising from the use of this software. 19 | 20 | Permission is granted to anyone to use this software for any purpose, 21 | including commercial applications, and to alter it and redistribute it 22 | freely, subject to the following restrictions: 23 | 24 | 1. The origin of this software must not be misrepresented; you must not 25 | claim that you wrote the original software. If you use this software 26 | in a product, an acknowledgment in the product documentation would be 27 | appreciated but is not required. 28 | 2. Altered source versions must be plainly marked as such, and must not be 29 | misrepresented as being the original software. 30 | 3. This notice may not be removed or altered from any source distribution. 31 | 32 | *****************************************************************************/ 33 | 34 | #include "glui_internal_control.h" 35 | 36 | /****************************** GLUI_StaticText::GLUI_StaticText() **********/ 37 | GLUI_StaticText::GLUI_StaticText( GLUI_Node *parent, const char *name ) 38 | { 39 | common_init(); 40 | set_name( name ); 41 | parent->add_control( this ); 42 | } 43 | 44 | /****************************** GLUI_StaticText::draw() **********/ 45 | 46 | void GLUI_StaticText::draw( int x, int y ) 47 | { 48 | GLUI_DRAWINGSENTINAL_IDIOM 49 | 50 | draw_text(); 51 | } 52 | 53 | 54 | /****************************** GLUI_StaticText::set_text() **********/ 55 | 56 | void GLUI_StaticText::set_text( const char *text ) 57 | { 58 | set_name( text ); 59 | redraw(); 60 | } 61 | 62 | 63 | /************************************ GLUI_StaticText::update_size() **********/ 64 | 65 | void GLUI_StaticText::update_size( void ) 66 | { 67 | int text_size; 68 | 69 | if ( NOT glui ) 70 | return; 71 | 72 | text_size = string_width( name ); 73 | 74 | if ( w < text_size ) 75 | w = text_size; 76 | } 77 | 78 | 79 | /****************************** GLUI_StaticText::draw_text() **********/ 80 | 81 | void GLUI_StaticText::draw_text( void ) 82 | { 83 | if ( NOT can_draw() ) 84 | return; 85 | 86 | erase_text(); 87 | draw_name( 0, 9 ); 88 | } 89 | 90 | 91 | /****************************** GLUI_StaticText::erase_text() **********/ 92 | 93 | void GLUI_StaticText::erase_text( void ) 94 | { 95 | if ( NOT can_draw() ) 96 | return; 97 | 98 | set_to_bkgd_color(); 99 | glDisable( GL_CULL_FACE ); 100 | glBegin( GL_TRIANGLES ); 101 | glVertex2i( 0,0 ); glVertex2i( w, 0 ); glVertex2i( w, h ); 102 | glVertex2i( 0, 0 ); glVertex2i( w, h ); glVertex2i( 0, h ); 103 | glEnd(); 104 | } 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_string.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | 3 | GLUI User Interface Toolkit 4 | --------------------------- 5 | 6 | glui.cpp 7 | 8 | 9 | -------------------------------------------------- 10 | 11 | Copyright (c) 1998 Paul Rademacher (this file, Bill Baxter 2005) 12 | 13 | This software is provided 'as-is', without any express or implied 14 | warranty. In no event will the authors be held liable for any damages 15 | arising from the use of this software. 16 | 17 | Permission is granted to anyone to use this software for any purpose, 18 | including commercial applications, and to alter it and redistribute it 19 | freely, subject to the following restrictions: 20 | 21 | 1. The origin of this software must not be misrepresented; you must not 22 | claim that you wrote the original software. If you use this software 23 | in a product, an acknowledgment in the product documentation would be 24 | appreciated but is not required. 25 | 2. Altered source versions must be plainly marked as such, and must not be 26 | misrepresented as being the original software. 27 | 3. This notice may not be removed or altered from any source distribution. 28 | 29 | *****************************************************************************/ 30 | 31 | #include "GL/glui.h" 32 | #include 33 | 34 | #ifdef _MSC_VER 35 | #define vsnprintf _vsnprintf 36 | #endif 37 | 38 | GLUI_String& glui_format_str(GLUI_String& str, const char* fmt, ...) 39 | { 40 | const size_t ISIZE = 128; 41 | char stackbuf[ISIZE]; 42 | size_t bufsz = ISIZE; 43 | char *buf = stackbuf; 44 | str = ""; 45 | va_list arg; 46 | while (1) { 47 | va_start(arg, fmt); 48 | int ret = vsnprintf(buf,bufsz-1,fmt,arg); 49 | va_end(arg); 50 | if (ret>=0) { 51 | break; 52 | } 53 | // else make a bigger buf, try again 54 | bufsz <<= 1; 55 | if (buf==stackbuf) buf = (char*)malloc(sizeof(char)*bufsz); 56 | else buf = (char*)realloc(buf, sizeof(char)*bufsz); 57 | } 58 | if (buf!=stackbuf) free(buf); 59 | str=buf; 60 | return str; 61 | } 62 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/glui_window.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | glui_window.cpp - GLUI_Button control class 4 | 5 | GLUI User Interface Toolkit 6 | Copyright (c) 1998 Paul Rademacher 7 | 8 | WWW: http://sourceforge.net/projects/glui/ 9 | Forums: http://sourceforge.net/forum/?group_id=92496 10 | 11 | This software is provided 'as-is', without any express or implied 12 | warranty. In no event will the authors be held liable for any damages 13 | arising from the use of this software. 14 | 15 | Permission is granted to anyone to use this software for any purpose, 16 | including commercial applications, and to alter it and redistribute it 17 | freely, subject to the following restrictions: 18 | 19 | 1. The origin of this software must not be misrepresented; you must not 20 | claim that you wrote the original software. If you use this software 21 | in a product, an acknowledgment in the product documentation would be 22 | appreciated but is not required. 23 | 2. Altered source versions must be plainly marked as such, and must not be 24 | misrepresented as being the original software. 25 | 3. This notice may not be removed or altered from any source distribution. 26 | 27 | */ 28 | 29 | #include "GL/glui.h" 30 | #include "glui_internal.h" 31 | 32 | GLUI_Glut_Window::GLUI_Glut_Window() 33 | : GLUI_Node(), 34 | 35 | glut_window_id(0), 36 | glut_keyboard_CB(NULL), 37 | glut_special_CB(NULL), 38 | glut_reshape_CB(NULL), 39 | glut_passive_motion_CB(NULL), 40 | glut_mouse_CB(NULL), 41 | glut_visibility_CB(NULL), 42 | glut_motion_CB(NULL), 43 | glut_display_CB(NULL), 44 | glut_entry_CB(NULL) 45 | { 46 | } 47 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/makefile: -------------------------------------------------------------------------------- 1 | .SUFFIXES: .cpp 2 | 3 | # Compiler options 4 | OPTS=-O2 5 | CXX = g++ 6 | CPPFLAGS += $(OPTS) -Wall -pedantic 7 | 8 | CPPFLAGS += -I./ -I./include 9 | 10 | LIBGLUI = -L./lib -lglui 11 | LIBGL = -lGLU -lGL -lglut 12 | 13 | ####################################### 14 | 15 | GLUI_OBJS = glui_add_controls.o glui_string.o glui.o glui_bitmap_img_data.o glui_bitmaps.o glui_button.o glui_edittext.o glui_commandline.o glui_checkbox.o glui_node.o glui_radio.o glui_statictext.o glui_panel.o glui_separator.o glui_spinner.o glui_control.o glui_column.o glui_translation.o glui_rotation.o glui_mouse_iaction.o glui_listbox.o glui_rollout.o glui_window.o arcball.o algebra3.o quaternion.o viewmodel.o glui_treepanel.o glui_tree.o glui_textbox.o glui_scrollbar.o glui_list.o glui_filebrowser.o 16 | 17 | GLUI_LIB = lib/libglui.a 18 | 19 | GLUI_EXAMPLES = bin/example1 bin/example2 bin/example3 bin/example4 bin/example5 bin/example6 20 | 21 | GLUI_TOOLS = bin/ppm2array 22 | 23 | .PHONY: all setup examples tools clean depend doc doc-pdf doc-dist dist 24 | 25 | all: setup $(GLUI_LIB) examples tools 26 | 27 | setup: 28 | mkdir -p bin 29 | mkdir -p lib 30 | 31 | examples: $(GLUI_EXAMPLES) 32 | 33 | tools: $(GLUI_TOOLS) 34 | 35 | bin/ppm2array: tools/ppm2array.cpp tools/ppm.cpp 36 | $(CXX) $(CPPFLAGS) -o $@ $^ 37 | 38 | bin/%: example/%.cpp $(GLUI_LIB) 39 | $(CXX) $(CPPFLAGS) -o $@ $< $(LIBGLUI) $(LIBGLUT) $(LIBGL) $(LIBS) 40 | 41 | $(GLUI_LIB): $(GLUI_OBJS) 42 | ar -r $(GLUI_LIB) $(GLUI_OBJS) 43 | 44 | .cpp.o: 45 | $(CXX) $(CPPFLAGS) -c $< 46 | 47 | .c.o: 48 | $(CXX) $(CPPFLAGS) -c $< 49 | 50 | docs: 51 | doxygen doc/doxygen.cfg 52 | 53 | clean: 54 | rm -f *.o $(GLUI_LIB) $(GLUI_EXAMPLES) $(GLUI_TOOLS) 55 | rm -fr doc/doxygen 56 | 57 | depend: 58 | makedepend -Y./include `find -name "*.cpp"` `find -name "*.c"` 59 | 60 | DIST = glui-2.35 61 | 62 | doc: 63 | doxygen doc/doxygen.cfg 64 | 65 | doc-pdf: 66 | cd doc/doxygen/latex && pdflatex refman.tex && pdflatex refman.tex && pdflatex refman.tex 67 | 68 | doc-dist: 69 | mkdir -p $(DIST)/doc 70 | cp `find doc/doxygen/html -type f` $(DIST)/doc 71 | tar cv $(DIST) | gzip -9 - > $(DIST)-doc.tgz 72 | zip -vr9 $(DIST)-doc.zip $(DIST) 73 | rm -Rf $(DIST) 74 | 75 | dist: clean 76 | mkdir -p $(DIST) 77 | cp --parents \ 78 | `find -type f -name "*.cpp"` \ 79 | `find -type f -name "*.c"` \ 80 | `find -type f -name "*.h"` \ 81 | `find -type f -name "*.dev"` \ 82 | `find -type f -name "*.dsp"` \ 83 | `find -type f -name "*.dsw"` \ 84 | `find -type f -name "*.vcproj"` \ 85 | `find -type f -name "*.sln"` \ 86 | `find -type f -name "*.txt"` \ 87 | makefile \ 88 | $(DIST) 89 | tar cv $(DIST) | gzip -9 - > $(DIST).tgz 90 | rm -Rf $(DIST) 91 | 92 | # DO NOT DELETE THIS LINE -- make depend depends on it. 93 | 94 | ./algebra3.o: algebra3.h glui_internal.h 95 | ./arcball.o: arcball.h glui_internal.h algebra3.h quaternion.h 96 | ./glui_button.o: ./include/GL/glui.h glui_internal.h 97 | ./glui_checkbox.o: ./include/GL/glui.h glui_internal.h 98 | ./glui_column.o: ./include/GL/glui.h glui_internal.h 99 | ./glui_control.o: ./include/GL/glui.h glui_internal.h 100 | ./glui_edittext.o: ./include/GL/glui.h glui_internal.h 101 | ./glui_listbox.o: ./include/GL/glui.h glui_internal.h 102 | ./glui_mouse_iaction.o: ./include/GL/glui.h glui_internal.h 103 | ./glui_node.o: ./include/GL/glui.h glui_internal.h 104 | ./glui_panel.o: ./include/GL/glui.h glui_internal.h 105 | ./glui_radio.o: ./include/GL/glui.h glui_internal.h 106 | ./glui_rollout.o: ./include/GL/glui.h glui_internal.h 107 | ./glui_rotation.o: ./include/GL/glui.h arcball.h glui_internal.h algebra3.h 108 | ./glui_rotation.o: quaternion.h 109 | ./glui_separator.o: ./include/GL/glui.h glui_internal.h 110 | ./glui_spinner.o: ./include/GL/glui.h glui_internal.h 111 | ./glui_translation.o: ./include/GL/glui.h glui_internal.h algebra3.h 112 | ./glui_window.o: ./include/GL/glui.h glui_internal.h 113 | ./quaternion.o: quaternion.h algebra3.h glui_internal.h 114 | ./viewmodel.o: viewmodel.h algebra3.h ./include/GL/glui.h 115 | ./glui_bitmaps.o: ./include/GL/glui.h glui_internal.h 116 | ./glui_statictext.o: ./include/GL/glui.h glui_internal.h 117 | ./glui.o: ./include/GL/glui.h glui_internal.h 118 | ./glui_add_controls.o: ./include/GL/glui.h glui_internal.h 119 | ./glui_commandline.o: ./include/GL/glui.h glui_internal.h 120 | ./glui_list.o: ./include/GL/glui.h glui_internal.h 121 | ./glui_scrollbar.o: ./include/GL/glui.h glui_internal.h 122 | ./glui_string.o: ./include/GL/glui.h 123 | ./glui_textbox.o: ./include/GL/glui.h glui_internal.h 124 | ./glui_tree.o: ./include/GL/glui.h glui_internal.h 125 | ./glui_treepanel.o: ./include/GL/glui.h 126 | ./example/example1.o: ./include/GL/glui.h 127 | ./example/example2.o: ./include/GL/glui.h 128 | ./example/example3.o: ./include/GL/glui.h 129 | ./example/example4.o: ./include/GL/glui.h 130 | ./example/example5.o: ./include/GL/glui.h 131 | ./example/example6.o: ./include/GL/glui.h 132 | ./tools/ppm2array.o: ./tools/ppm.hpp 133 | ./glui_filebrowser.o: ./include/GL/glui.h glui_internal.h 134 | -------------------------------------------------------------------------------- /traceview/glui-2.36/src/tools/ppm.cpp: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // File : ppm.cpp 3 | //------------------------------------------------------------------------------ 4 | 5 | //============================================================================ 6 | // ppm.cpp : Portable Pixel Map image format module 7 | //============================================================================ 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | #define PPM_VERBOSE 0 14 | 15 | 16 | void VFlip(unsigned char * Pix, int width, int height, int chan) 17 | { 18 | int lsize = width * chan; 19 | unsigned char *tbuf = new unsigned char[lsize]; 20 | assert(tbuf); 21 | 22 | if (height == 0) 23 | return; 24 | 25 | for(int y=0; y 9 | #include 10 | 11 | int main( int argc, char *argv[] ) 12 | { 13 | int i; 14 | unsigned char* img = 0; 15 | int w, h; 16 | FILE *output; 17 | char basename[200]; 18 | 19 | if ( argc != 2 && argc != 3 ) { 20 | fprintf( stderr, "USAGE: %s input.ppm [output.cpp]\n", argv[0] ); 21 | return 1; 22 | } 23 | 24 | LoadPPM( argv[1], img, w, h ); 25 | 26 | if ( img ) { 27 | strcpy( basename, argv[1] ); 28 | basename[ strlen(basename)-4 ] = '\0'; 29 | 30 | if (argc == 3) 31 | output = fopen( argv[2], "w" ); 32 | else 33 | output = stdout; 34 | if ( !output ) { 35 | fprintf( stderr, "ERROR: File '%s' could not be opened for writing\n", 36 | argv[2] ); 37 | return 1; 38 | } 39 | 40 | VFlip(img,w,h); /* Opengl bitmaps are specified bottom-to-top */ 41 | 42 | fprintf( output, "\n\n"); 43 | fprintf( output, "int %s[] = {", basename ); 44 | fprintf( output, " %d, %d, /* width, height */\n", w, h); 45 | 46 | fprintf( output, " " ); 47 | for( i=0; i n) break; 28 | numinc++; 29 | inc[numinc] = h; 30 | pwr2 *= 2; 31 | pwr4 *= 4; 32 | } 33 | 34 | for (i=0; i 0) { // sort in increasing order 37 | for (; numinc >= 0; numinc--) { 38 | h = inc[numinc]; 39 | for (i = h; i < n; i++) { 40 | val = arr[i]; 41 | k = ind[i]; 42 | 43 | j = i; 44 | 45 | while ( (j >= h) && (arr[j-h] > val) ) { 46 | arr[j] = arr[j-h]; 47 | ind[j] = ind[j-h]; 48 | j = j - h; 49 | } 50 | 51 | arr[j] = val; 52 | ind[j] = k; 53 | } 54 | } 55 | } 56 | else { // sort in decreasing order 57 | for (; numinc >= 0; numinc--) { 58 | h = inc[numinc]; 59 | for (i = h; i < n; i++) { 60 | val = arr[i]; 61 | k = ind[i]; 62 | 63 | j = i; 64 | 65 | while ( (j >= h) && (arr[j-h] < val) ) { 66 | arr[j] = arr[j-h]; 67 | ind[j] = ind[j-h]; 68 | j = j - h; 69 | } 70 | 71 | arr[j] = val; 72 | ind[j] = k; 73 | } 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /util/README: -------------------------------------------------------------------------------- 1 | The "readsparse" utility is designed to read the binary sparse-matrix 2 | files that contain information on the communication patterns that 3 | are recorded with libmpitrace.so when the user specifies : 4 | 5 | export TRACE_SEND_PATTERN=yes 6 | export LD_PRELOAD=/path/to/libmpitrace.so 7 | mpirun -np 1024 your.exe 8 | 9 | To build the readsparse utility type make. 10 | 11 | To use the utility : readsparse send_bytes.sparse.jobid . This will 12 | print the contents to standard out, so it is best to redirect output 13 | to a file. The output lists for each rank the number of messages 14 | and bytes sent to every connected destination rank. The binary input 15 | file contains information from only those MPI calls that have a 16 | specific destination rank as a call argument, i.e. some form of send 17 | operation. Collective MPI operations and receives are not included. 18 | 19 | When using PROFILE_BY_CALL_STACK=yes, the mpi_profile outputs contain 20 | instruction addresses for a section of the call stack, for the most 21 | expensive MPI calls. The translate.py utility is a python3 script that 22 | uses GNU addr2line to translate addresses and print the function name, 23 | source file and line number. Syntax : 24 | 25 | translate.py mpi_profile.jobid.rank >output.txt 26 | 27 | One should include -g as an option for compilation and linking, to 28 | ensure that addr2line can properly translate addresses. 29 | -------------------------------------------------------------------------------- /util/makefile: -------------------------------------------------------------------------------- 1 | readsparse : readsparse.c 2 | gcc -g -O2 readsparse.c -o readsparse 3 | -------------------------------------------------------------------------------- /util/readsparse.c: -------------------------------------------------------------------------------- 1 | /* Copyright IBM Corporation, 2019 2 | * author : Bob Walkup 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | int main(int argc, char * argv[]) 9 | { 10 | struct connStruct { 11 | float bytes; 12 | int count; 13 | int rank; 14 | int pad; 15 | }; 16 | struct connStruct * connection; 17 | FILE * fd; 18 | int nranks, i, k, nconn, minconn, maxconn; 19 | int minconn_rank, maxconn_rank, minbytes_rank, maxbytes_rank; 20 | int msgs, minmsgs, maxmsgs, minmsgs_rank, maxmsgs_rank; 21 | float totbytes, minbytes, maxbytes, avgbytes, avgconn, avgmsgs; 22 | 23 | 24 | fd = fopen(argv[1], "r"); 25 | 26 | if (fd == NULL) { 27 | printf("failed to open the input file %s ... exiting\n", argv[1]); 28 | exit(0); 29 | } 30 | 31 | fread(&nranks, sizeof(int), 1, fd); 32 | 33 | printf("got nranks = %d\n\n", nranks); 34 | 35 | connection = (struct connStruct *) malloc(nranks*sizeof(struct connStruct)); 36 | 37 | maxbytes = 0.0; 38 | minbytes = 1.0e20; 39 | minmsgs = 2000000000; 40 | maxmsgs = 0; 41 | avgmsgs = 0.0f; 42 | 43 | maxconn = 0; 44 | minconn = 10000000; 45 | 46 | maxbytes_rank = 0; 47 | minbytes_rank = 0; 48 | 49 | maxconn_rank = 0; 50 | minconn_rank = 0; 51 | 52 | avgconn = 0.0; 53 | avgbytes = 0.0; 54 | 55 | 56 | for (i=0; i maxmsgs) { 72 | maxmsgs = msgs; 73 | maxmsgs_rank = i; 74 | } 75 | if (msgs < minmsgs) { 76 | minmsgs = msgs; 77 | minmsgs_rank = i; 78 | } 79 | if (totbytes > maxbytes) { 80 | maxbytes = totbytes; 81 | maxbytes_rank = i; 82 | } 83 | if (totbytes < minbytes) { 84 | minbytes = totbytes; 85 | minbytes_rank = i; 86 | } 87 | if (nconn > maxconn) { 88 | maxconn = nconn; 89 | maxconn_rank = i; 90 | } 91 | if (nconn < minconn) { 92 | minconn = nconn; 93 | minconn_rank = i; 94 | } 95 | printf("\n"); 96 | } 97 | 98 | avgconn = avgconn / ((float) nranks); 99 | avgbytes = avgbytes / ((float) nranks); 100 | avgmsgs = avgmsgs / ((float) nranks); 101 | 102 | printf("average connections = %.3f\n", avgconn); 103 | 104 | printf("min connections = %d for rank %d\n", minconn, minconn_rank); 105 | printf("max connections = %d for rank %d\n", maxconn, maxconn_rank); 106 | 107 | printf("average bytes sent = %.4e\n", avgbytes); 108 | 109 | printf("min bytes sent = %.4e for rank %d\n", minbytes, minbytes_rank); 110 | printf("max bytes sent = %.4e for rank %d\n", maxbytes, maxbytes_rank); 111 | 112 | printf("min messages sent = %d for rank %d\n", minmsgs, minmsgs_rank); 113 | printf("max messages sent = %d for rank %d\n", maxmsgs, maxmsgs_rank); 114 | 115 | printf("avg messages sent = %.4e\n", avgmsgs); 116 | 117 | fclose(fd); 118 | 119 | return 0; 120 | } 121 | -------------------------------------------------------------------------------- /util/translate.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import sys 3 | import subprocess 4 | import io 5 | 6 | if len(sys.argv) != 2: 7 | sys.exit("syntax : translate.py mpi_profile.jobid.rank") 8 | 9 | file = open(sys.argv[1]) 10 | line = file.readline() 11 | while line: 12 | line = line.rstrip() 13 | print(line) 14 | val = line.find(' filename = ') 15 | if val == 0: 16 | exe_or_lib = line[13:] 17 | lib = exe_or_lib.find('.so') 18 | next = file.readline() 19 | next = next.rstrip() 20 | print(next) 21 | if lib > 0: 22 | indx = next.find('offset =') 23 | arg = next[indx+10:] 24 | else: 25 | indx = next.find('address =') 26 | arg = next[indx+10:indx+28] 27 | result = subprocess.run(['addr2line', '-f', '-C', '-e', exe_or_lib, arg], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) 28 | output = result.stdout.decode('utf-8') 29 | buffer = io.StringIO(output) 30 | myline = ' function = ' + buffer.readline().strip() 31 | print(myline) 32 | myline = ' source = ' + buffer.readline().strip() 33 | print(myline) 34 | line = file.readline() 35 | file.close 36 | -------------------------------------------------------------------------------- /vprof/README: -------------------------------------------------------------------------------- 1 | This directory has a simplified set of routines to control profiling via 2 | the profil() routine, and write output in vmon.out format, for use with 3 | bfdprof. Support for program sampling vial the profil() routine can be 4 | enabled in libmpitrace.so via configure options ... see the README file 5 | in the src directory. The user can optionally add explicit calls to the 6 | code to mark a code region for pc sampling. The interface is : 7 | 8 | C/C++ syntax : mpitrace_vprof_start(); ... mpitrace_vprof_stop(); 9 | type signature : extern "C" void mpitrace_vprof_start(void); 10 | extern "C" void mpitrace_vprof_stop(void); 11 | where the extern "C" qualifier is needed for C++ only. 12 | 13 | Fortran syntax : 14 | call mpitrace_vprof_start() ... call mpitrace_vprof_stop() 15 | 16 | There is a call to mpitrace_vprof_write() inside the wrapper for MPI_Finalize() 17 | ... so you do not need to call that explicitly. 18 | 19 | If you add calls as indicated above, you would have to link your code 20 | with libmpitrace.so, which is often not convenient. You can get the 21 | equivalent behavior by adding calls to MPI_Pcontrol() with specific 22 | arguments : 23 | 24 | MPI_Pcontrol(11); // start pc sampling with profil() 25 | ... 26 | MPI_Pcontrol(10); // stop pc sampling 27 | 28 | The MPI_Pcontrol function is included in all MPI implementations, and they 29 | have no effect unless a profiling tool such as libmpitrace.so has stolen 30 | the entry points. So, with this approach you can get control of the code 31 | region to sample, without explicitly linking with libmpitrace.so when you 32 | build your executable. For Fortran, the syntax is : 33 | 34 | call mpi_pcontrol(11) ! start pc sampling with profil() 35 | ... 36 | call mpi_pcontrol(10) ! stop pc sampling 37 | 38 | Note that there should be just one call to start profiling and one 39 | call to stop profiling. This restriction could probably be removed, 40 | but would require some changes to the current code. 41 | 42 | With the MPI wrappers, you will by default get vmon.out files for the 43 | ranks with the min, max, and median times in MPI, and for rank 0. It 44 | is recommended to set the SAVE_LIST variable to one or a few MPI ranks. 45 | Doing that will enable interrupts on only the ranks there were listed. 46 | For example " export SAVE_LIST=0,11 will enable interrupts on ranks 0 47 | and 11. 48 | 49 | --------------------------------------------------------------------------------