Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
slabasan committed Mar 7, 2024
1 parent d0e0b0b commit 1e8e81c
Show file tree
Hide file tree
Showing 23 changed files with 194 additions and 194 deletions.
38 changes: 19 additions & 19 deletions src/variorum/AMD_GPU/instinctGPU.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ int amd_gpu_instinct_get_power(int verbose)
printf("Running %s\n", __FUNCTION__);
}

unsigned iter = 0;
unsigned nsockets;
unsigned int iter = 0;
uint16_t nsockets;

#ifdef VARIORUM_WITH_AMD_GPU
variorum_get_topology(&nsockets, NULL, NULL, P_AMD_GPU_IDX);
Expand All @@ -42,8 +42,8 @@ int amd_gpu_instinct_get_power_limit(int verbose)
printf("Running %s\n", __FUNCTION__);
}

unsigned iter = 0;
unsigned nsockets;
unsigned int iter = 0;
uint16_t nsockets;

#ifdef VARIORUM_WITH_AMD_GPU
variorum_get_topology(&nsockets, NULL, NULL, P_AMD_GPU_IDX);
Expand All @@ -64,8 +64,8 @@ int amd_gpu_instinct_get_thermals(int verbose)
printf("Running %s\n", __FUNCTION__);
}

unsigned iter = 0;
unsigned nsockets;
unsigned int iter = 0;
uint16_t nsockets;

#ifdef VARIORUM_WITH_AMD_GPU
variorum_get_topology(&nsockets, NULL, NULL, P_AMD_GPU_IDX);
Expand All @@ -86,8 +86,8 @@ int amd_gpu_instinct_get_thermals_json(json_t *get_thermal_obj)
printf("Running %s\n", __FUNCTION__);
}

unsigned iter = 0;
unsigned nsockets;
unsigned int iter = 0;
uint16_t nsockets;

variorum_get_topology(&nsockets, NULL, NULL, P_AMD_GPU_IDX);

Expand All @@ -107,8 +107,8 @@ int amd_gpu_instinct_get_clocks(int verbose)
printf("Running %s\n", __FUNCTION__);
}

unsigned iter = 0;
unsigned nsockets;
unsigned int iter = 0;
uint16_t nsockets;

#ifdef VARIORUM_WITH_AMD_GPU
variorum_get_topology(&nsockets, NULL, NULL, P_AMD_GPU_IDX);
Expand All @@ -129,8 +129,8 @@ int amd_gpu_instinct_get_clocks_json(json_t *get_clock_obj_json)
printf("Running %s\n", __FUNCTION__);
}

unsigned iter = 0;
unsigned nsockets;
unsigned int iter = 0;
uint16_t nsockets;

variorum_get_topology(&nsockets, NULL, NULL, P_AMD_GPU_IDX);

Expand All @@ -150,8 +150,8 @@ int amd_gpu_instinct_get_gpu_utilization(int verbose)
printf("Running %s\n", __FUNCTION__);
}

unsigned iter = 0;
unsigned nsockets;
unsigned int iter = 0;
uint16_t nsockets;

#ifdef VARIORUM_WITH_AMD_GPU
variorum_get_topology(&nsockets, NULL, NULL, P_AMD_GPU_IDX);
Expand All @@ -173,8 +173,8 @@ int amd_gpu_instinct_get_gpu_utilization_json(char **get_gpu_util_obj_str)
}

json_t *get_util_obj = json_object();
unsigned iter = 0;
unsigned nsockets;
unsigned int iter = 0;
uint16_t nsockets;

#ifdef VARIORUM_WITH_AMD_GPU
variorum_get_topology(&nsockets, NULL, NULL, P_AMD_GPU_IDX);
Expand All @@ -198,8 +198,8 @@ int amd_gpu_instinct_cap_each_gpu_power_limit(unsigned int powerlimit)
printf("Running %s\n", __FUNCTION__);
}

unsigned iter = 0;
unsigned nsockets;
unsigned int iter = 0;
uint16_t nsockets;
#ifdef VARIORUM_WITH_AMD_GPU
variorum_get_topology(&nsockets, NULL, NULL, P_AMD_GPU_IDX);
#endif
Expand All @@ -213,7 +213,7 @@ int amd_gpu_instinct_cap_each_gpu_power_limit(unsigned int powerlimit)
int amd_gpu_instinct_get_power_json(json_t *get_power_obj)
{
char *val = getenv("VARIORUM_LOG");
unsigned nsockets;
uint16_t nsockets;

if (val != NULL && atoi(val) == 1)
{
Expand Down
10 changes: 5 additions & 5 deletions src/variorum/ARM/ARM_Juno_r2.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ int arm_juno_r2_get_thermals(int long_ver)
int arm_juno_r2_get_clocks(int long_ver)
{
int ret = 0;
unsigned iter = 0;
unsigned nsockets;
unsigned int iter = 0;
uint16_t nsockets;

char *val = getenv("VARIORUM_LOG");
if (val != NULL && atoi(val) == 1)
Expand All @@ -71,8 +71,8 @@ int arm_juno_r2_get_clocks(int long_ver)
int arm_juno_r2_get_frequencies(void)
{
int ret = 0;
unsigned iter = 0;
unsigned nsockets;
unsigned int iter = 0;
uint16_t nsockets;

char *val = getenv("VARIORUM_LOG");
if (val != NULL && atoi(val) == 1)
Expand All @@ -94,7 +94,7 @@ int arm_juno_r2_get_frequencies(void)
int arm_juno_r2_cap_socket_frequency(int cpuid, int freq)
{
int ret = 0;
unsigned nsockets;
uint16_t nsockets;

char *val = getenv("VARIORUM_LOG");
if (val != NULL && atoi(val) == 1)
Expand Down
6 changes: 3 additions & 3 deletions src/variorum/ARM/ARM_Neoverse_N1.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ int arm_neoverse_n1_get_thermals(int long_ver)
int arm_neoverse_n1_get_clocks(int long_ver)
{
int ret = 0;
unsigned iter = 0;
unsigned nsockets;
unsigned int iter = 0;
uint16_t nsockets;

char *val = getenv("VARIORUM_LOG");
if (val != NULL && atoi(val) == 1)
Expand All @@ -71,7 +71,7 @@ int arm_neoverse_n1_get_clocks(int long_ver)
int arm_neoverse_n1_cap_socket_frequency(int cpuid, int freq)
{
int ret = 0;
unsigned nsockets;
uint16_t nsockets;

char *val = getenv("VARIORUM_LOG");
if (val != NULL && atoi(val) == 1)
Expand Down
2 changes: 1 addition & 1 deletion src/variorum/ARM/arm_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <variorum_error.h>
#include <variorum_timers.h>

unsigned m_num_package;
unsigned int m_num_package;
char m_hostname[1024];

int read_file_ui64(const int file, uint64_t *val)
Expand Down
2 changes: 1 addition & 1 deletion src/variorum/ARM/arm_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <config_architecture.h>

extern unsigned m_num_package;
extern unsigned int m_num_package;
extern char m_hostname[1024];

int read_file_ui64(
Expand Down
22 changes: 11 additions & 11 deletions src/variorum/IBM/Power9.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ int ibm_cpu_p9_get_power(int long_ver)
int fd;
int rc;
int bytes;
unsigned iter = 0;
unsigned nsockets = 0;
unsigned int iter = 0;
uint16_t nsockets = 0;

#ifdef VARIORUM_WITH_IBM_CPU
variorum_get_topology(&nsockets, NULL, NULL, P_IBM_CPU_IDX);
Expand Down Expand Up @@ -320,9 +320,9 @@ int ibm_cpu_p9_monitoring(FILE *output)
int fd;
int rc;
int bytes;
unsigned iter = 0;
unsigned nsockets = 0;
static unsigned count = 0;
unsigned int iter = 0;
uint16_t nsockets = 0;
static unsigned int count = 0;

#ifdef VARIORUM_WITH_IBM_CPU
variorum_get_topology(&nsockets, NULL, NULL, P_IBM_CPU_IDX);
Expand Down Expand Up @@ -405,8 +405,8 @@ int ibm_cpu_p9_get_power_json(json_t *get_power_obj)
int fd;
int rc;
int bytes;
unsigned iter = 0;
unsigned nsockets = 0;
unsigned int iter = 0;
uint16_t nsockets = 0;

#ifdef VARIORUM_WITH_IBM_CPU
variorum_get_topology(&nsockets, NULL, NULL, P_IBM_CPU_IDX);
Expand Down Expand Up @@ -468,8 +468,8 @@ int ibm_cpu_p9_get_node_thermal_json(json_t *get_thermal_obj)
int fd;
int rc;
int bytes;
unsigned iter = 0;
unsigned nsockets;
unsigned int iter = 0;
uint16_t nsockets;

#ifdef VARIORUM_WITH_IBM_CPU
variorum_get_topology(&nsockets, NULL, NULL, P_IBM_CPU_IDX);
Expand Down Expand Up @@ -596,8 +596,8 @@ int ibm_cpu_p9_get_node_frequency_json(json_t *get_frequency_obj_json)
int fd;
int rc;
int bytes;
unsigned iter = 0;
unsigned nsockets;
unsigned int iter = 0;
uint16_t nsockets;

#ifdef VARIORUM_WITH_IBM_CPU
variorum_get_topology(&nsockets, NULL, NULL, P_IBM_CPU_IDX);
Expand Down
10 changes: 5 additions & 5 deletions src/variorum/Intel/Intel_06_2A.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ static struct sandybridge_2a_offsets msrs =

int intel_cpu_fm_06_2a_get_power_limits(int long_ver)
{
unsigned socket;
unsigned nsockets, ncores, nthreads;
uint16_t socket;
uint16_t nsockets, ncores, nthreads;
#ifdef VARIORUM_WITH_INTEL_CPU
variorum_get_topology(&nsockets, &ncores, &nthreads, P_INTEL_CPU_IDX);
#endif
Expand Down Expand Up @@ -140,8 +140,8 @@ int intel_cpu_fm_06_2a_get_power_limits(int long_ver)

int intel_cpu_fm_06_2a_cap_power_limits(int package_power_limit)
{
unsigned socket;
unsigned nsockets, ncores, nthreads;
uint16_t socket;
uint16_t nsockets, ncores, nthreads;
#ifdef VARIORUM_WITH_INTEL_CPU
variorum_get_topology(&nsockets, &ncores, &nthreads, P_INTEL_CPU_IDX);
#endif
Expand Down Expand Up @@ -492,7 +492,7 @@ int intel_cpu_fm_06_2a_cap_best_effort_node_power_limit(int node_limit)
* the floor of the value being taken. So while we will be off by 1W total,
* we will guarantee that we stay under the specified cap. */

unsigned nsockets, ncores, nthreads;
uint16_t nsockets, ncores, nthreads;
#ifdef VARIORUM_WITH_INTEL_CPU
variorum_get_topology(&nsockets, &ncores, &nthreads, P_INTEL_CPU_IDX);
#endif
Expand Down
10 changes: 5 additions & 5 deletions src/variorum/Intel/Intel_06_2D.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ static struct sandybridge_2d_offsets msrs =

int intel_cpu_fm_06_2d_get_power_limits(int long_ver)
{
unsigned socket;
unsigned nsockets, ncores, nthreads;
uint16_t socket;
uint16_t nsockets, ncores, nthreads;
#ifdef VARIORUM_WITH_INTEL_CPU
variorum_get_topology(&nsockets, &ncores, &nthreads, P_INTEL_CPU_IDX);
#endif
Expand Down Expand Up @@ -141,8 +141,8 @@ int intel_cpu_fm_06_2d_get_power_limits(int long_ver)

int intel_cpu_fm_06_2d_cap_power_limits(int package_power_limit)
{
unsigned socket;
unsigned nsockets, ncores, nthreads;
uint16_t socket;
uint16_t nsockets, ncores, nthreads;
#ifdef VARIORUM_WITH_INTEL_CPU
variorum_get_topology(&nsockets, &ncores, &nthreads, P_INTEL_CPU_IDX);
#endif
Expand Down Expand Up @@ -496,7 +496,7 @@ int intel_cpu_fm_06_2d_cap_best_effort_node_power_limit(int node_limit)
* the floor of the value being taken. So while we will be off by 1W total,
* we will guarantee that we stay under the specified cap. */

unsigned nsockets, ncores, nthreads;
uint16_t nsockets, ncores, nthreads;
#ifdef VARIORUM_WITH_INTEL_CPU
variorum_get_topology(&nsockets, &ncores, &nthreads, P_INTEL_CPU_IDX);
#endif
Expand Down
10 changes: 5 additions & 5 deletions src/variorum/Intel/Intel_06_3E.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ static struct ivybridge_3e_offsets msrs =

int intel_cpu_fm_06_3e_get_power_limits(int long_ver)
{
unsigned socket;
unsigned nsockets, ncores, nthreads;
uint16_t socket;
uint16_t nsockets, ncores, nthreads;
#ifdef VARIORUM_WITH_INTEL_CPU
variorum_get_topology(&nsockets, &ncores, &nthreads, P_INTEL_CPU_IDX);
#endif
Expand Down Expand Up @@ -151,8 +151,8 @@ int intel_cpu_fm_06_3e_get_power_limits(int long_ver)

int intel_cpu_fm_06_3e_cap_power_limits(int package_power_limit)
{
unsigned socket;
unsigned nsockets, ncores, nthreads;
uint16_t socket;
uint16_t nsockets, ncores, nthreads;
#ifdef VARIORUM_WITH_INTEL_CPU
variorum_get_topology(&nsockets, &ncores, &nthreads, P_INTEL_CPU_IDX);
#endif
Expand Down Expand Up @@ -520,7 +520,7 @@ int intel_cpu_fm_06_3e_cap_best_effort_node_power_limit(int node_limit)
* the floor of the value being taken. So while we will be off by 1W total,
* we will guarantee that we stay under the specified cap. */

unsigned nsockets, ncores, nthreads;
uint16_t nsockets, ncores, nthreads;
#ifdef VARIORUM_WITH_INTEL_CPU
variorum_get_topology(&nsockets, &ncores, &nthreads, P_INTEL_CPU_IDX);
#endif
Expand Down
10 changes: 5 additions & 5 deletions src/variorum/Intel/Intel_06_3F.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ static struct haswell_3f_offsets msrs =

int intel_cpu_fm_06_3f_get_power_limits(int long_ver)
{
unsigned socket;
unsigned nsockets, ncores, nthreads;
uint16_t socket;
uint16_t nsockets, ncores, nthreads;
#ifdef VARIORUM_WITH_INTEL_CPU
variorum_get_topology(&nsockets, &ncores, &nthreads, P_INTEL_CPU_IDX);
#endif
Expand Down Expand Up @@ -152,8 +152,8 @@ int intel_cpu_fm_06_3f_get_power_limits(int long_ver)

int intel_cpu_fm_06_3f_cap_power_limits(int package_power_limit)
{
unsigned socket;
unsigned nsockets, ncores, nthreads;
uint16_t socket;
uint16_t nsockets, ncores, nthreads;
#ifdef VARIORUM_WITH_INTEL_CPU
variorum_get_topology(&nsockets, &ncores, &nthreads, P_INTEL_CPU_IDX);
#endif
Expand Down Expand Up @@ -515,7 +515,7 @@ int intel_cpu_fm_06_3f_cap_best_effort_node_power_limit(int node_limit)
* the floor of the value being taken. So while we will be off by 1W total,
* we will guarantee that we stay under the specified cap. */

unsigned nsockets, ncores, nthreads;
uint16_t nsockets, ncores, nthreads;
#ifdef VARIORUM_WITH_INTEL_CPU
variorum_get_topology(&nsockets, &ncores, &nthreads, P_INTEL_CPU_IDX);
#endif
Expand Down
10 changes: 5 additions & 5 deletions src/variorum/Intel/Intel_06_4F.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ static struct broadwell_4f_offsets msrs =

int intel_cpu_fm_06_4f_get_power_limits(int long_ver)
{
unsigned socket;
unsigned nsockets, ncores, nthreads;
uint16_t socket;
uint16_t nsockets, ncores, nthreads;
#ifdef VARIORUM_WITH_INTEL_CPU
variorum_get_topology(&nsockets, &ncores, &nthreads, P_INTEL_CPU_IDX);
#endif
Expand Down Expand Up @@ -153,8 +153,8 @@ int intel_cpu_fm_06_4f_get_power_limits(int long_ver)

int intel_cpu_fm_06_4f_cap_power_limits(int package_power_limit)
{
unsigned socket;
unsigned nsockets, ncores, nthreads;
uint16_t socket;
uint16_t nsockets, ncores, nthreads;
#ifdef VARIORUM_WITH_INTEL_CPU
variorum_get_topology(&nsockets, &ncores, &nthreads, P_INTEL_CPU_IDX);
#endif
Expand Down Expand Up @@ -537,7 +537,7 @@ int intel_cpu_fm_06_4f_cap_best_effort_node_power_limit(int node_limit)
* the floor of the value being taken. So while we will be off by 1W total,
* we will guarantee that we stay under the specified cap. */

unsigned nsockets, ncores, nthreads;
uint16_t nsockets, ncores, nthreads;
#ifdef VARIORUM_WITH_INTEL_CPU
variorum_get_topology(&nsockets, &ncores, &nthreads, P_INTEL_CPU_IDX);
#endif
Expand Down
Loading

0 comments on commit 1e8e81c

Please sign in to comment.