NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
summary.c File Reference

Make a system call to return various useful parameters. More...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/times.h>
#include <sys/utsname.h>

Go to the source code of this file.

Functions

int bucket (int lng)
 
void cputim (double *usr, double *sys)
 
void elapse (double *timer)
 
void end_timer (struct time_data *time)
 
void print_timing (char *string, struct time_data *time)
 
void resource ()
 
void start_ ()
 
void start_timer (struct time_data *time)
 
void summary_ (int *returnVal)
 

Variables

double cpu_comm
 
double f_bytes
 
double final_wall
 
static FILE * fp = NULL
 
struct time_data MPI_Abort_data
 
struct time_data MPI_Address_data
 
struct time_data MPI_Allgather_data
 
struct time_data MPI_Allgatherv_data
 
struct time_data MPI_Allreduce_data
 
struct time_data MPI_Alltoall_data
 
struct time_data MPI_Alltoallv_data
 
struct time_data MPI_Attr_delete_data
 
struct time_data MPI_Attr_get_data
 
struct time_data MPI_Attr_put_data
 
struct time_data MPI_Barrier_data
 
struct time_data MPI_Bcast_data
 
struct time_data MPI_Bsend_data
 
struct time_data MPI_Bsend_init_data
 
struct time_data MPI_Buffer_attach_data
 
struct time_data MPI_Buffer_detach_data
 
struct time_data MPI_Cancel_data
 
struct time_data MPI_Cart_coords_data
 
struct time_data MPI_Cart_create_data
 
struct time_data MPI_Cart_get_data
 
struct time_data MPI_Cart_map_data
 
struct time_data MPI_Cart_rank_data
 
struct time_data MPI_Cart_shift_data
 
struct time_data MPI_Cart_sub_data
 
struct time_data MPI_Cartdim_get_data
 
struct time_data MPI_Comm_compare_data
 
struct time_data MPI_Comm_create_data
 
struct time_data MPI_Comm_dup_data
 
struct time_data MPI_Comm_free_data
 
struct time_data MPI_Comm_group_data
 
struct time_data MPI_Comm_rank_data
 
struct time_data MPI_Comm_remote_group_data
 
struct time_data MPI_Comm_remote_size_data
 
struct time_data MPI_Comm_size_data
 
struct time_data MPI_Comm_split_data
 
struct time_data MPI_Comm_test_inter_data
 
struct time_data MPI_Dims_create_data
 
struct time_data MPI_Errhandler_create_data
 
struct time_data MPI_Errhandler_free_data
 
struct time_data MPI_Errhandler_get_data
 
struct time_data MPI_Errhandler_set_data
 
struct time_data MPI_Error_class_data
 
struct time_data MPI_Error_string_data
 
struct time_data MPI_Gather_data
 
struct time_data MPI_Gatherv_data
 
struct time_data MPI_Get_count_data
 
struct time_data MPI_Get_elements_data
 
struct time_data MPI_Get_processor_name_data
 
struct time_data MPI_Graph_create_data
 
struct time_data MPI_Graph_get_data
 
struct time_data MPI_Graph_map_data
 
struct time_data MPI_Graph_neighbors_count_data
 
struct time_data MPI_Graph_neighbors_data
 
struct time_data MPI_Graphdims_get_data
 
struct time_data MPI_Group_compare_data
 
struct time_data MPI_Group_difference_data
 
struct time_data MPI_Group_excl_data
 
struct time_data MPI_Group_free_data
 
struct time_data MPI_Group_incl_data
 
struct time_data MPI_Group_intersection_data
 
struct time_data MPI_Group_range_excl_data
 
struct time_data MPI_Group_range_incl_data
 
struct time_data MPI_Group_rank_data
 
struct time_data MPI_Group_size_data
 
struct time_data MPI_Group_translate_ranks_data
 
struct time_data MPI_Group_union_data
 
struct time_data MPI_Ibsend_data
 
struct time_data MPI_Initialized_data
 
struct time_data MPI_Intercomm_create_data
 
struct time_data MPI_Intercomm_merge_data
 
struct time_data MPI_Iprobe_data
 
struct time_data MPI_Irecv_data
 
struct time_data MPI_Irsend_data
 
struct time_data MPI_Isend_data
 
struct time_data MPI_Issend_data
 
struct time_data MPI_Keyval_create_data
 
struct time_data MPI_Keyval_free_data
 
struct time_data MPI_Op_create_data
 
struct time_data MPI_Op_free_data
 
struct time_data MPI_Pack_data
 
struct time_data MPI_Pack_size_data
 
struct time_data MPI_Probe_data
 
struct time_data MPI_Recv_data
 
struct time_data MPI_Recv_init_data
 
struct time_data MPI_Reduce_data
 
struct time_data MPI_Reduce_scatter_data
 
struct time_data MPI_Request_free_data
 
struct time_data MPI_Rsend_data
 
struct time_data MPI_Rsend_init_data
 
struct time_data MPI_Scan_data
 
struct time_data MPI_Scatter_data
 
struct time_data MPI_Scatterv_data
 
struct time_data MPI_Send_data
 
struct time_data MPI_Send_init_data
 
struct time_data MPI_Sendrecv_data
 
struct time_data MPI_Sendrecv_replace_data
 
struct time_data MPI_Ssend_data
 
struct time_data MPI_Ssend_init_data
 
struct time_data MPI_Start_data
 
struct time_data MPI_Startall_data
 
struct time_data MPI_Test_cancelled_data
 
struct time_data MPI_Test_data
 
struct time_data MPI_Testall_data
 
struct time_data MPI_Testany_data
 
struct time_data MPI_Testsome_data
 
struct time_data MPI_Topo_test_data
 
struct time_data MPI_Type_commit_data
 
struct time_data MPI_Type_contiguous_data
 
struct time_data MPI_Type_extent_data
 
struct time_data MPI_Type_free_data
 
struct time_data MPI_Type_hindexed_data
 
struct time_data MPI_Type_hvector_data
 
struct time_data MPI_Type_indexed_data
 
struct time_data MPI_Type_lb_data
 
struct time_data MPI_Type_size_data
 
struct time_data MPI_Type_struct_data
 
struct time_data MPI_Type_ub_data
 
struct time_data MPI_Type_vector_data
 
struct time_data MPI_Unpack_data
 
struct time_data MPI_Wait_data
 
struct time_data MPI_Waitall_data
 
struct time_data MPI_Waitany_data
 
struct time_data MPI_Waitsome_data
 
struct time_data MPI_Wtick_data
 
struct time_data MPI_Wtime_data
 
int msglen
 
int mypid
 
int numtask
 
int procid_0
 
int profile
 
double start_wall
 
double tbytes
 
double tcpu
 
double tot_wall
 
int trace_flag
 
double twall
 
double wall_comm
 

Detailed Description

Make a system call to return various useful parameters.

This code will make a system call to return various useful parameters. When subroutine summary() is called, a list of system resource statistics is printed to stdout.

Users need to place a call to start() at the beginning of the section of code to be "measured" and a call to summary() at the end.

Use as follows:

call start()
do stuff
call summary()
Author
Jim Tuccillo
Date
August 1999

Definition in file summary.c.

Function Documentation

◆ bucket()

int bucket ( int  lng)
Parameters
lng
Author
Jim Tuccillo
Date
August 1999

Definition at line 196 of file summary.c.

◆ cputim()

void cputim ( double *  usr,
double *  sys 
)
Parameters
usr
sys
Author
Jim Tuccillo
Date
August 1999

Definition at line 234 of file summary.c.

◆ elapse()

void elapse ( double *  timer)
Parameters
timer
Author
Jim Tuccillo
Date
August 1999

Definition at line 211 of file summary.c.

◆ end_timer()

void end_timer ( struct time_data *  time)
Parameters
time
Author
Jim Tuccillo
Date
August 1999

Definition at line 279 of file summary.c.

◆ print_timing()

void print_timing ( char *  string,
struct time_data *  time 
)
Parameters
string
time
Author
Jim Tuccillo
Date
August 1999

Definition at line 381 of file summary.c.

◆ resource()

void resource ( )
Author
Jim Tuccillo
Date
August 1999

Definition at line 299 of file summary.c.

◆ start_()

void start_ ( )
Author
Jim Tuccillo
Date
August 1999

Definition at line 458 of file summary.c.

◆ start_timer()

void start_timer ( struct time_data *  time)
Parameters
time
Author
Jim Tuccillo
Date
August 1999

Definition at line 260 of file summary.c.

◆ summary_()

void summary_ ( int *  returnVal)
Parameters
returnVal
Author
Jim Tuccillo
Date
August 1999

Definition at line 437 of file summary.c.

Variable Documentation

◆ cpu_comm

double cpu_comm

Definition at line 47 of file summary.c.

◆ f_bytes

double f_bytes

Definition at line 45 of file summary.c.

◆ final_wall

double final_wall

Definition at line 46 of file summary.c.

◆ fp

FILE* fp = NULL
static

Definition at line 40 of file summary.c.

◆ MPI_Abort_data

struct time_data MPI_Abort_data

Definition at line 112 of file summary.c.

◆ MPI_Address_data

struct time_data MPI_Address_data

Definition at line 123 of file summary.c.

◆ MPI_Allgather_data

struct time_data MPI_Allgather_data

Definition at line 66 of file summary.c.

◆ MPI_Allgatherv_data

struct time_data MPI_Allgatherv_data

Definition at line 67 of file summary.c.

◆ MPI_Allreduce_data

struct time_data MPI_Allreduce_data

Definition at line 68 of file summary.c.

◆ MPI_Alltoall_data

struct time_data MPI_Alltoall_data

Definition at line 69 of file summary.c.

◆ MPI_Alltoallv_data

struct time_data MPI_Alltoallv_data

Definition at line 70 of file summary.c.

◆ MPI_Attr_delete_data

struct time_data MPI_Attr_delete_data

Definition at line 82 of file summary.c.

◆ MPI_Attr_get_data

struct time_data MPI_Attr_get_data

Definition at line 83 of file summary.c.

◆ MPI_Attr_put_data

struct time_data MPI_Attr_put_data

Definition at line 84 of file summary.c.

◆ MPI_Barrier_data

struct time_data MPI_Barrier_data

Definition at line 71 of file summary.c.

◆ MPI_Bcast_data

struct time_data MPI_Bcast_data

Definition at line 72 of file summary.c.

◆ MPI_Bsend_data

struct time_data MPI_Bsend_data

Definition at line 124 of file summary.c.

◆ MPI_Bsend_init_data

struct time_data MPI_Bsend_init_data

Definition at line 125 of file summary.c.

◆ MPI_Buffer_attach_data

struct time_data MPI_Buffer_attach_data

Definition at line 126 of file summary.c.

◆ MPI_Buffer_detach_data

struct time_data MPI_Buffer_detach_data

Definition at line 127 of file summary.c.

◆ MPI_Cancel_data

struct time_data MPI_Cancel_data

Definition at line 128 of file summary.c.

◆ MPI_Cart_coords_data

struct time_data MPI_Cart_coords_data

Definition at line 175 of file summary.c.

◆ MPI_Cart_create_data

struct time_data MPI_Cart_create_data

Definition at line 176 of file summary.c.

◆ MPI_Cart_get_data

struct time_data MPI_Cart_get_data

Definition at line 177 of file summary.c.

◆ MPI_Cart_map_data

struct time_data MPI_Cart_map_data

Definition at line 178 of file summary.c.

◆ MPI_Cart_rank_data

struct time_data MPI_Cart_rank_data

Definition at line 179 of file summary.c.

◆ MPI_Cart_shift_data

struct time_data MPI_Cart_shift_data

Definition at line 180 of file summary.c.

◆ MPI_Cart_sub_data

struct time_data MPI_Cart_sub_data

Definition at line 181 of file summary.c.

◆ MPI_Cartdim_get_data

struct time_data MPI_Cartdim_get_data

Definition at line 182 of file summary.c.

◆ MPI_Comm_compare_data

struct time_data MPI_Comm_compare_data

Definition at line 85 of file summary.c.

◆ MPI_Comm_create_data

struct time_data MPI_Comm_create_data

Definition at line 86 of file summary.c.

◆ MPI_Comm_dup_data

struct time_data MPI_Comm_dup_data

Definition at line 87 of file summary.c.

◆ MPI_Comm_free_data

struct time_data MPI_Comm_free_data

Definition at line 88 of file summary.c.

◆ MPI_Comm_group_data

struct time_data MPI_Comm_group_data

Definition at line 89 of file summary.c.

◆ MPI_Comm_rank_data

struct time_data MPI_Comm_rank_data

Definition at line 90 of file summary.c.

◆ MPI_Comm_remote_group_data

struct time_data MPI_Comm_remote_group_data

Definition at line 91 of file summary.c.

◆ MPI_Comm_remote_size_data

struct time_data MPI_Comm_remote_size_data

Definition at line 92 of file summary.c.

◆ MPI_Comm_size_data

struct time_data MPI_Comm_size_data

Definition at line 93 of file summary.c.

◆ MPI_Comm_split_data

struct time_data MPI_Comm_split_data

Definition at line 94 of file summary.c.

◆ MPI_Comm_test_inter_data

struct time_data MPI_Comm_test_inter_data

Definition at line 95 of file summary.c.

◆ MPI_Dims_create_data

struct time_data MPI_Dims_create_data

Definition at line 183 of file summary.c.

◆ MPI_Errhandler_create_data

struct time_data MPI_Errhandler_create_data

Definition at line 114 of file summary.c.

◆ MPI_Errhandler_free_data

struct time_data MPI_Errhandler_free_data

Definition at line 115 of file summary.c.

◆ MPI_Errhandler_get_data

struct time_data MPI_Errhandler_get_data

Definition at line 116 of file summary.c.

◆ MPI_Errhandler_set_data

struct time_data MPI_Errhandler_set_data

Definition at line 118 of file summary.c.

◆ MPI_Error_class_data

struct time_data MPI_Error_class_data

Definition at line 113 of file summary.c.

◆ MPI_Error_string_data

struct time_data MPI_Error_string_data

Definition at line 117 of file summary.c.

◆ MPI_Gather_data

struct time_data MPI_Gather_data

Definition at line 73 of file summary.c.

◆ MPI_Gatherv_data

struct time_data MPI_Gatherv_data

Definition at line 74 of file summary.c.

◆ MPI_Get_count_data

struct time_data MPI_Get_count_data

Definition at line 133 of file summary.c.

◆ MPI_Get_elements_data

struct time_data MPI_Get_elements_data

Definition at line 132 of file summary.c.

◆ MPI_Get_processor_name_data

struct time_data MPI_Get_processor_name_data

Definition at line 119 of file summary.c.

◆ MPI_Graph_create_data

struct time_data MPI_Graph_create_data

Definition at line 184 of file summary.c.

◆ MPI_Graph_get_data

struct time_data MPI_Graph_get_data

Definition at line 185 of file summary.c.

◆ MPI_Graph_map_data

struct time_data MPI_Graph_map_data

Definition at line 186 of file summary.c.

◆ MPI_Graph_neighbors_count_data

struct time_data MPI_Graph_neighbors_count_data

Definition at line 188 of file summary.c.

◆ MPI_Graph_neighbors_data

struct time_data MPI_Graph_neighbors_data

Definition at line 187 of file summary.c.

◆ MPI_Graphdims_get_data

struct time_data MPI_Graphdims_get_data

Definition at line 189 of file summary.c.

◆ MPI_Group_compare_data

struct time_data MPI_Group_compare_data

Definition at line 96 of file summary.c.

◆ MPI_Group_difference_data

struct time_data MPI_Group_difference_data

Definition at line 97 of file summary.c.

◆ MPI_Group_excl_data

struct time_data MPI_Group_excl_data

Definition at line 98 of file summary.c.

◆ MPI_Group_free_data

struct time_data MPI_Group_free_data

Definition at line 99 of file summary.c.

◆ MPI_Group_incl_data

struct time_data MPI_Group_incl_data

Definition at line 100 of file summary.c.

◆ MPI_Group_intersection_data

struct time_data MPI_Group_intersection_data

Definition at line 101 of file summary.c.

◆ MPI_Group_range_excl_data

struct time_data MPI_Group_range_excl_data

Definition at line 103 of file summary.c.

◆ MPI_Group_range_incl_data

struct time_data MPI_Group_range_incl_data

Definition at line 104 of file summary.c.

◆ MPI_Group_rank_data

struct time_data MPI_Group_rank_data

Definition at line 102 of file summary.c.

◆ MPI_Group_size_data

struct time_data MPI_Group_size_data

Definition at line 105 of file summary.c.

◆ MPI_Group_translate_ranks_data

struct time_data MPI_Group_translate_ranks_data

Definition at line 106 of file summary.c.

◆ MPI_Group_union_data

struct time_data MPI_Group_union_data

Definition at line 107 of file summary.c.

◆ MPI_Ibsend_data

struct time_data MPI_Ibsend_data

Definition at line 134 of file summary.c.

◆ MPI_Initialized_data

struct time_data MPI_Initialized_data

Definition at line 120 of file summary.c.

◆ MPI_Intercomm_create_data

struct time_data MPI_Intercomm_create_data

Definition at line 108 of file summary.c.

◆ MPI_Intercomm_merge_data

struct time_data MPI_Intercomm_merge_data

Definition at line 109 of file summary.c.

◆ MPI_Iprobe_data

struct time_data MPI_Iprobe_data

Definition at line 135 of file summary.c.

◆ MPI_Irecv_data

struct time_data MPI_Irecv_data

Definition at line 136 of file summary.c.

◆ MPI_Irsend_data

struct time_data MPI_Irsend_data

Definition at line 137 of file summary.c.

◆ MPI_Isend_data

struct time_data MPI_Isend_data

Definition at line 138 of file summary.c.

◆ MPI_Issend_data

struct time_data MPI_Issend_data

Definition at line 139 of file summary.c.

◆ MPI_Keyval_create_data

struct time_data MPI_Keyval_create_data

Definition at line 110 of file summary.c.

◆ MPI_Keyval_free_data

struct time_data MPI_Keyval_free_data

Definition at line 111 of file summary.c.

◆ MPI_Op_create_data

struct time_data MPI_Op_create_data

Definition at line 75 of file summary.c.

◆ MPI_Op_free_data

struct time_data MPI_Op_free_data

Definition at line 76 of file summary.c.

◆ MPI_Pack_data

struct time_data MPI_Pack_data

Definition at line 140 of file summary.c.

◆ MPI_Pack_size_data

struct time_data MPI_Pack_size_data

Definition at line 141 of file summary.c.

◆ MPI_Probe_data

struct time_data MPI_Probe_data

Definition at line 142 of file summary.c.

◆ MPI_Recv_data

struct time_data MPI_Recv_data

Definition at line 143 of file summary.c.

◆ MPI_Recv_init_data

struct time_data MPI_Recv_init_data

Definition at line 130 of file summary.c.

◆ MPI_Reduce_data

struct time_data MPI_Reduce_data

Definition at line 78 of file summary.c.

◆ MPI_Reduce_scatter_data

struct time_data MPI_Reduce_scatter_data

Definition at line 77 of file summary.c.

◆ MPI_Request_free_data

struct time_data MPI_Request_free_data

Definition at line 129 of file summary.c.

◆ MPI_Rsend_data

struct time_data MPI_Rsend_data

Definition at line 144 of file summary.c.

◆ MPI_Rsend_init_data

struct time_data MPI_Rsend_init_data

Definition at line 145 of file summary.c.

◆ MPI_Scan_data

struct time_data MPI_Scan_data

Definition at line 79 of file summary.c.

◆ MPI_Scatter_data

struct time_data MPI_Scatter_data

Definition at line 80 of file summary.c.

◆ MPI_Scatterv_data

struct time_data MPI_Scatterv_data

Definition at line 81 of file summary.c.

◆ MPI_Send_data

struct time_data MPI_Send_data

Definition at line 146 of file summary.c.

◆ MPI_Send_init_data

struct time_data MPI_Send_init_data

Definition at line 131 of file summary.c.

◆ MPI_Sendrecv_data

struct time_data MPI_Sendrecv_data

Definition at line 147 of file summary.c.

◆ MPI_Sendrecv_replace_data

struct time_data MPI_Sendrecv_replace_data

Definition at line 148 of file summary.c.

◆ MPI_Ssend_data

struct time_data MPI_Ssend_data

Definition at line 149 of file summary.c.

◆ MPI_Ssend_init_data

struct time_data MPI_Ssend_init_data

Definition at line 150 of file summary.c.

◆ MPI_Start_data

struct time_data MPI_Start_data

Definition at line 151 of file summary.c.

◆ MPI_Startall_data

struct time_data MPI_Startall_data

Definition at line 152 of file summary.c.

◆ MPI_Test_cancelled_data

struct time_data MPI_Test_cancelled_data

Definition at line 156 of file summary.c.

◆ MPI_Test_data

struct time_data MPI_Test_data

Definition at line 153 of file summary.c.

◆ MPI_Testall_data

struct time_data MPI_Testall_data

Definition at line 154 of file summary.c.

◆ MPI_Testany_data

struct time_data MPI_Testany_data

Definition at line 155 of file summary.c.

◆ MPI_Testsome_data

struct time_data MPI_Testsome_data

Definition at line 157 of file summary.c.

◆ MPI_Topo_test_data

struct time_data MPI_Topo_test_data

Definition at line 190 of file summary.c.

◆ MPI_Type_commit_data

struct time_data MPI_Type_commit_data

Definition at line 158 of file summary.c.

◆ MPI_Type_contiguous_data

struct time_data MPI_Type_contiguous_data

Definition at line 159 of file summary.c.

◆ MPI_Type_extent_data

struct time_data MPI_Type_extent_data

Definition at line 160 of file summary.c.

◆ MPI_Type_free_data

struct time_data MPI_Type_free_data

Definition at line 161 of file summary.c.

◆ MPI_Type_hindexed_data

struct time_data MPI_Type_hindexed_data

Definition at line 162 of file summary.c.

◆ MPI_Type_hvector_data

struct time_data MPI_Type_hvector_data

Definition at line 163 of file summary.c.

◆ MPI_Type_indexed_data

struct time_data MPI_Type_indexed_data

Definition at line 164 of file summary.c.

◆ MPI_Type_lb_data

struct time_data MPI_Type_lb_data

Definition at line 165 of file summary.c.

◆ MPI_Type_size_data

struct time_data MPI_Type_size_data

Definition at line 166 of file summary.c.

◆ MPI_Type_struct_data

struct time_data MPI_Type_struct_data

Definition at line 167 of file summary.c.

◆ MPI_Type_ub_data

struct time_data MPI_Type_ub_data

Definition at line 168 of file summary.c.

◆ MPI_Type_vector_data

struct time_data MPI_Type_vector_data

Definition at line 169 of file summary.c.

◆ MPI_Unpack_data

struct time_data MPI_Unpack_data

Definition at line 170 of file summary.c.

◆ MPI_Wait_data

struct time_data MPI_Wait_data

Definition at line 171 of file summary.c.

◆ MPI_Waitall_data

struct time_data MPI_Waitall_data

Definition at line 172 of file summary.c.

◆ MPI_Waitany_data

struct time_data MPI_Waitany_data

Definition at line 173 of file summary.c.

◆ MPI_Waitsome_data

struct time_data MPI_Waitsome_data

Definition at line 174 of file summary.c.

◆ MPI_Wtick_data

struct time_data MPI_Wtick_data

Definition at line 121 of file summary.c.

◆ MPI_Wtime_data

struct time_data MPI_Wtime_data

Definition at line 122 of file summary.c.

◆ msglen

int msglen

Definition at line 43 of file summary.c.

◆ mypid

int mypid

Definition at line 41 of file summary.c.

◆ numtask

int numtask

Definition at line 41 of file summary.c.

◆ procid_0

int procid_0

Definition at line 42 of file summary.c.

◆ profile

int profile

Definition at line 43 of file summary.c.

◆ start_wall

double start_wall

Definition at line 46 of file summary.c.

◆ tbytes

double tbytes

Definition at line 45 of file summary.c.

◆ tcpu

double tcpu

Definition at line 45 of file summary.c.

◆ tot_wall

double tot_wall

Definition at line 46 of file summary.c.

◆ trace_flag

int trace_flag

Definition at line 44 of file summary.c.

◆ twall

double twall

Definition at line 45 of file summary.c.

◆ wall_comm

double wall_comm

Definition at line 47 of file summary.c.