Skip to content

Commit

Permalink
Merge branch 'master' into intel_sapphirerapids
Browse files Browse the repository at this point in the history
  • Loading branch information
TomTheBear authored Oct 20, 2023
2 parents 24ff138 + 734cb94 commit 684220e
Show file tree
Hide file tree
Showing 30 changed files with 1,062 additions and 152 deletions.
1 change: 0 additions & 1 deletion groups/zen3/L2CACHE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ PMC5 RETIRED_INSTRUCTIONS

METRICS
Runtime (RDTSC) [s] time
Runtime unhalted [s] FIXC1*inverseClock
L2 request rate (PMC0+PMC1+PMC2+PMC3)/PMC5
L2 miss rate ((PMC0+PMC1+PMC2+PMC3)-(PMC4+PMC1))/PMC5
L2 miss ratio ((PMC0+PMC1+PMC2+PMC3)-(PMC4+PMC1))/(PMC0+PMC1+PMC2+PMC3)
Expand Down
14 changes: 5 additions & 9 deletions groups/zen4/ENERGY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ FIXC2 MAX_CPU_CLOCK
PMC0 RETIRED_INSTRUCTIONS
PMC1 CPU_CLOCKS_UNHALTED
PWR0 RAPL_CORE_ENERGY
PWR1 RAPL_PKG_ENERGY
PWR2 RAPL_DRAM_ENERGY
PWR2 RAPL_L3_ENERGY



Expand All @@ -18,19 +17,16 @@ Clock [MHz] 1.E-06*(FIXC1/FIXC2)/inverseClock
CPI PMC1/PMC0
Energy Core [J] PWR0
Power Core [W] PWR0/time
Energy PKG [J] PWR1
Power PKG [W] PWR1/time
Energy DRAM [J] PWR2
Power DRAM [W] PWR2/time
Energy L3 [J] PWR2
Power L3 [W] PWR2/time

LONG
Formulas:
Power Core [W] = RAPL_CORE_ENERGY/time
Power PKG [W] = RAPL_PKG_ENERGY/time
Power DRAM [W] = RAPL_DRAM_ENERGY/time
Power L3 [W] = RAPL_L3_ENERGY/time
-
Ryzen implements the RAPL interface previously introduced by Intel.
This interface enables to monitor the consumed energy on the core and package
This interface enables to monitor the consumed energy on the core and L3
domain.
It is not documented by AMD which parts of the CPU are in which domain.

1 change: 1 addition & 0 deletions src/access-daemon/accessDaemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -3741,6 +3741,7 @@ int main(void)
case ZEN3_RYZEN:
case ZEN3_RYZEN2:
case ZEN3_RYZEN3:
case ZEN3_EPYC_TRENTO:
allowed = allowed_amd17_zen2;
break;
case ZEN4_RYZEN:
Expand Down
22 changes: 15 additions & 7 deletions src/access_x86_msr.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
* sys interface of the Linux 2.6 kernel. This module
* is based on the msr-util tools.
*
* Version: <VERSION>
* Released: <DATE>
* Version: 5.2.2
* Released: 26.07.2022
*
* Author: Jan Treibig (jt), jan.treibig@gmail.com.
* Thomas Gruber (tr), thomas.roehl@googlemail.com
* Project: likwid
*
* Copyright (C) 2016 RRZE, University Erlangen-Nuremberg
* Copyright (C) 2022 NHR@FAU, University Erlangen-Nuremberg
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
Expand Down Expand Up @@ -182,18 +182,26 @@ void
access_x86_msr_finalize(const int cpu_id)
{
int i = 0;

access_x86_rdpmc_finalize(cpu_id);
if (FD && FD[cpu_id] > 0)
{
DEBUG_PRINT(DEBUGLEV_DEVELOP, Closing FD for CPU %d, cpu_id);
close(FD[cpu_id]);
FD[cpu_id] = 0;
FD[cpu_id] = -1;
}
int c = 0;
for (i = 0; i < cpuid_topology.numHWThreads; i++)
{
if (FD[i] >= 0) c++;
}
if (FD)
if (c == 0 && FD)
{
DEBUG_PRINT(DEBUGLEV_DEVELOP, Free FD space);
memset(FD, -1, cpuid_topology.numHWThreads * sizeof(int));
free(FD);
FD = NULL;
}
access_x86_rdpmc_finalize(cpu_id);

}

int
Expand Down
2 changes: 1 addition & 1 deletion src/applications/likwid-mpirun.lua
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ local function executeSlurm(wrapperscript, hostfile, env, nrNodes)
opts["ntasks-per-node"] = string.format("%d", ppn)
end
opts["cpu_bind"] = "none"
opts["cpus-per-task"] = string.format("%d", threads)
opts["cpus-per-task"] = string.format("%d", tpp)
supported_types = _srun_get_mpi_types()
if supported_types["pmi2"] then
opts["mpi"] = "pmi2"
Expand Down
4 changes: 2 additions & 2 deletions src/applications/likwid-perfctr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ if use_marker == true then
end
os.remove(markerFile)
else
print_stderr("Marker API result file does not exist. This may happen if the application has not called LIKWID_MARKER_CLOSE.")
print_stderr("MMarker API result file does not exist. This may happen if the application was not compiled with LIKWID_PERFMON macro or the application has not called LIKWID_MARKER_CLOSE.")
end
end
if gpusSupported and #gpu_event_string_list > 0 then
Expand All @@ -1163,7 +1163,7 @@ if use_marker == true then
likwid.destroyNvMarkerFile()
os.remove(nvMarkerFile)
else
print_stderr("GPU Marker API result file does not exist. This may happen if the application has not called LIKWID_GPUMARKER_CLOSE.")
print_stderr("GPU Marker API result file does not exist. This may happen if the application was not compiled with LIKWID_NVMON macro or the application has not called LIKWID_GPUMARKER_CLOSE.")
end
end
elseif use_timeline == false then
Expand Down
39 changes: 38 additions & 1 deletion src/includes/likwid.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,41 @@ extern "C" {
#include <likwid-marker.h>
#endif


/*
################################################################################
# Library information
################################################################################
*/

/** \addtogroup LibInfo Information about the library
* @{
*/
/*! \brief Get the major version of the LIKWID library
@return Major version
*/
extern int likwid_getMajorVersion(void) __attribute__ ((visibility ("default") ));
/*! \brief Get the minor version of the LIKWID library
@return Minor version
*/
extern int likwid_getMinorVersion(void) __attribute__ ((visibility ("default") ));
/*! \brief Get the bugfix version of the LIKWID library
@return Bugfix version
*/
extern int likwid_getBugfixVersion(void) __attribute__ ((visibility ("default") ));
/*! \brief Check whether the LIKWID library was built with Nvidia GPU support */
extern int likwid_getNvidiaSupport(void) __attribute__ ((visibility ("default") ));

/*! \brief Get the maximal count of supported HW threads */
extern int likwid_getMaxSupportedThreads(void) __attribute__ ((visibility ("default") ));

/*! \brief Get the maximal count of supported CPU sockets */
extern int likwid_getMaxSupportedSockets(void) __attribute__ ((visibility ("default") ));
/** @}*/

/*
################################################################################
# Marker API related functions
Expand Down Expand Up @@ -709,7 +744,7 @@ for the current architecture. topology_init() and numa_init() must be called bef
perfmon_init_maps()
\sa RegisterMap list, PerfmonEvent list and BoxMap list
*/
extern void perfmon_init_maps(void) __attribute__ ((visibility ("default") ));
extern int perfmon_init_maps(void) __attribute__ ((visibility ("default") ));
/*! \brief Check the performance monitoring maps whether counters and events are available
Checks each counter and event in the performance monitoring maps for their availibility on
Expand Down Expand Up @@ -1396,6 +1431,8 @@ typedef struct {
double uncoreMinFreq; /*!< \brief Minimal uncore frequency */
double uncoreMaxFreq; /*!< \brief Maximal uncore frequency */
uint8_t perfBias; /*!< \brief Performance energy bias */
int statusRegWidth;
int numDomains; /*!< \brief Number of RAPL domains */
PowerDomain domains[NUM_POWER_DOMAINS]; /*!< \brief List of power domains */
} PowerInfo;

Expand Down
35 changes: 35 additions & 0 deletions src/includes/perfmon_graviton3.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* =======================================================================================
*
* Filename: perfmon_graviton3.h
*
* Description: Header File of perfmon module for ARM AWS Graviton3
*
* Version: <VERSION>
* Released: <DATE>
*
* Author: Carlos Falquez, c.falquez@fz-juelich.de
* Project: likwid
*
* Copyright (C) 2022, Forschungszentrum Juelich, Germany
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* =======================================================================================
*/

#include <perfmon_graviton3_events.h>
#include <perfmon_graviton3_counters.h>

static int perfmon_numCountersGraviton3 = NUM_COUNTERS_GRAVITON3;
static int perfmon_numArchEventsGraviton3 = NUM_ARCH_EVENTS_GRAVITON3;
48 changes: 48 additions & 0 deletions src/includes/perfmon_graviton3_counters.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* =======================================================================================
*
* Filename: perfmon_graviton3_counters.h
*
* Description: Counter Header File of perfmon module for ARM AWS Graviton3
*
* Version: <VERSION>
* Released: <DATE>
*
* Author: Carlos Falquez, c.falquez@fz-juelich.de
* Project: likwid
*
* Copyright (C) 2022, Forschungszentrum Juelich, Germany
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
* =======================================================================================
*/

#define NUM_COUNTERS_GRAVITON3 6

static RegisterMap graviton3_counter_map[NUM_COUNTERS_GRAVITON3] = {
{"PMC0", PMC0, PMC, 0, 0, 0, 0, EVENT_OPTION_NONE_MASK},
{"PMC1", PMC1, PMC, 0, 0, 0, 0, EVENT_OPTION_NONE_MASK},
{"PMC2", PMC2, PMC, 0, 0, 0, 0, EVENT_OPTION_NONE_MASK},
{"PMC3", PMC3, PMC, 0, 0, 0, 0, EVENT_OPTION_NONE_MASK},
{"PMC4", PMC4, PMC, 0, 0, 0, 0, EVENT_OPTION_NONE_MASK},
{"PMC5", PMC5, PMC, 0, 0, 0, 0, EVENT_OPTION_NONE_MASK},
};

static BoxMap graviton3_box_map[NUM_UNITS] = {
[PMC] = {0, 0, 0, 0, 0, 0, 32},
};

static char* graviton3_translate_types[NUM_UNITS] = {
[PMC] = "/sys/bus/event_source/devices/armv8_pmuv3_0",
};
Loading

0 comments on commit 684220e

Please sign in to comment.