From: "Poole, Steve" <swp...@lanl.gov>
Date: Thursday, February 2, 2023 at 3:10 AM
To: "ptools-...@icl.utk.edu" <ptools-...@icl.utk.edu>
Subject: Question about aarch64
I am trying to build PAPI on aarch64 (specifically the Ampere 80 core device on the Nvidia DevKits).
Has this already been built? I am getting errors as below::
make[2]: Entering directory '/vast/home/spoole/src/G+H/TAKE/papi-master/src/libpfm4/lib'
gcc -Wno-override-init -g -Wall -Werror -Wextra -Wno-unused-parameter -I. -I/vast/home/spoole/src/G+H/TAKE/papi-master/src/libpfm4/lib/../include -DCONFIG_PFMLIB_DEBUG -DCONFIG_PFMLIB_OS_LINUX -D_REENTRANT -I. -DCONFIG_PFMLIB_ARCH_ARM64 -I. -c pfmlib_perf_event_pmu.c
pfmlib_perf_event_pmu.c: In function ‘gen_tracepoint_table’:
pfmlib_perf_event_pmu.c:349:50: error: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 4095 [-Werror=format-truncation=]
349 | snprintf(d2path, MAXPATHLEN, "%s/%s", debugfs_mnt, d1->d_name);
| ^~
pfmlib_perf_event_pmu.c:349:17: note: ‘snprintf’ output between 2 and 4352 bytes into a destination of size 4096
349 | snprintf(d2path, MAXPATHLEN, "%s/%s", debugfs_mnt, d1->d_name);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pfmlib_perf_event_pmu.c:399:58: error: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 4095 [-Werror=format-truncation=]
399 | snprintf(idpath, MAXPATHLEN, "%s/%s/id", d2path, d2->d_name);
| ^~
pfmlib_perf_event_pmu.c:399:25: note: ‘snprintf’ output between 5 and 4355 bytes into a destination of size 4096
399 | snprintf(idpath, MAXPATHLEN, "%s/%s/id", d2path, d2->d_name);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
I am using gcc/12.1.0.
Thanks..
V/r,
Steve…
Cell : (505) 695-3033
Office : (505) 664-0584
IMPORTANT NOTICE: The contents of this email and any attachments are company confidential and
may also be privileged. If you are not the intended recipient, please notify the sender immediately
and do not disclose the contents to any other person, use it for any purpose, or store or copy the
information in any medium.
Thank you.
Will do and send the results. I did download what I think is the latest master.
Thank you!!
I went all the way back to gcc-10.30 same results.
I can go back to gcc-9.x if that might help.
V/r,
Steve…
Cell : (505) 695-3033
Office : (505) 664-0584
IMPORTANT NOTICE: The contents of this email and any attachments are company confidential and
may also be privileged. If you are not the intended recipient, please notify the sender immediately
and do not disclose the contents to any other person, use it for any purpose, or store or copy the
information in any medium.
Thank you.
From:
"Poole, Steve" <swp...@lanl.gov>
Date: Wednesday, February 8, 2023 at 12:25 PM
To: Heike Jagode <jag...@icl.utk.edu>, ptools-perfapi <ptools-...@icl.utk.edu>, perfapi-devel <perfap...@icl.utk.edu>
Subject: Re: [EXTERNAL] Re: FW: Question about aarch64
Here are the results::
./configure --prefix=/vast/home/spoole/local-darwin-G+H LDFLAGS="-Wno-error=format-truncation"
make
make -C /vast/home/spoole/src/G+H/TAKE/papi-master/src/libpfm4 ARCH="aarch64" CC="gcc -Wno-override-init" lib
make[1]: Entering directory '/vast/home/spoole/src/G+H/TAKE/papi-master/src/libpfm4'
make -C lib
make[2]: Entering directory '/vast/home/spoole/src/G+H/TAKE/papi-master/src/libpfm4/lib'
gcc -Wno-override-init -g -Wall -Werror -Wextra -Wno-unused-parameter -I. -I/vast/home/spoole/src/G+H/TAKE/papi-master/src/libpfm4/lib/../include -DCONFIG_PFMLIB_DEBUG -DCONFIG_PFMLIB_OS_LINUX -D_REENTRANT -I. -DCONFIG_PFMLIB_ARCH_ARM64 -I. -c pfmlib_perf_event_pmu.c
pfmlib_perf_event_pmu.c: In function ‘gen_tracepoint_table’:
pfmlib_perf_event_pmu.c:349:50: error: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 4095 [-Werror=format-truncation=]
349 | snprintf(d2path, MAXPATHLEN, "%s/%s", debugfs_mnt, d1->d_name);
| ^~
pfmlib_perf_event_pmu.c:349:17: note: ‘snprintf’ output between 2 and 4352 bytes into a destination of size 4096
349 | snprintf(d2path, MAXPATHLEN, "%s/%s", debugfs_mnt, d1->d_name);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pfmlib_perf_event_pmu.c:399:58: error: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 4095 [-Werror=format-truncation=]
399 | snprintf(idpath, MAXPATHLEN, "%s/%s/id", d2path, d2->d_name);
| ^~
pfmlib_perf_event_pmu.c:399:25: note: ‘snprintf’ output between 5 and 4355 bytes into a destination of size 4096
399 | snprintf(idpath, MAXPATHLEN, "%s/%s/id", d2path, d2->d_name);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [/vast/home/spoole/src/G+H/TAKE/papi-master/src/libpfm4/lib/../rules.mk:30: pfmlib_perf_event_pmu.o] Error 1
make[2]: Leaving directory '/vast/home/spoole/src/G+H/TAKE/papi-master/src/libpfm4/lib'
make[1]: *** [Makefile:52: lib] Error 2
make[1]: Leaving directory '/vast/home/spoole/src/G+H/TAKE/papi-master/src/libpfm4'
make: *** [Rules.pfm4_pe:41: /vast/home/spoole/src/G+H/TAKE/papi-master/src/libpfm4/lib/libpfm.a] Error 2
V/r,
Steve…
Cell : (505) 695-3033
Office : (505) 664-0584
IMPORTANT NOTICE: The contents of this email and any attachments are company confidential and
may also be privileged. If you are not the intended recipient, please notify the sender immediately
and do not disclose the contents to any other person, use it for any purpose, or store or copy the
information in any medium.
Thank you.
From: Heike Jagode <jag...@icl.utk.edu>
Date: Wednesday, February 8, 2023 at 11:58 AM
To: "Poole, Steve" <swp...@lanl.gov>, ptools-perfapi <ptools-...@icl.utk.edu>, perfapi-devel <perfap...@icl.utk.edu>
Subject: [EXTERNAL] Re: FW: Question about aarch64
Hi Steve,
9.x has the same results. It is like the build is not seeing my CFLAGS options.
Here are the results::
./configure --prefix=/vast/home/spoole/local-darwin-G+H LDFLAGS="-Wno-error=format-truncation"
make
make -C /vast/home/spoole/src/G+H/TAKE/papi-master/src/libpfm4 ARCH="aarch64" CC="gcc -Wno-override-init" lib
make[1]: Entering directory '/vast/home/spoole/src/G+H/TAKE/papi-master/src/libpfm4'
make -C lib
make[2]: Entering directory '/vast/home/spoole/src/G+H/TAKE/papi-master/src/libpfm4/lib'
gcc -Wno-override-init -g -Wall -Werror -Wextra -Wno-unused-parameter -I. -I/vast/home/spoole/src/G+H/TAKE/papi-master/src/libpfm4/lib/../include -DCONFIG_PFMLIB_DEBUG -DCONFIG_PFMLIB_OS_LINUX -D_REENTRANT -I. -DCONFIG_PFMLIB_ARCH_ARM64 -I. -c pfmlib_perf_event_pmu.c
pfmlib_perf_event_pmu.c: In function ‘gen_tracepoint_table’:
pfmlib_perf_event_pmu.c:349:50: error: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 4095 [-Werror=format-truncation=]
349 | snprintf(d2path, MAXPATHLEN, "%s/%s", debugfs_mnt, d1->d_name);
| ^~
pfmlib_perf_event_pmu.c:349:17: note: ‘snprintf’ output between 2 and 4352 bytes into a destination of size 4096
349 | snprintf(d2path, MAXPATHLEN, "%s/%s", debugfs_mnt, d1->d_name);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pfmlib_perf_event_pmu.c:399:58: error: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 4095 [-Werror=format-truncation=]
399 | snprintf(idpath, MAXPATHLEN, "%s/%s/id", d2path, d2->d_name);
| ^~
pfmlib_perf_event_pmu.c:399:25: note: ‘snprintf’ output between 5 and 4355 bytes into a destination of size 4096
399 | snprintf(idpath, MAXPATHLEN, "%s/%s/id", d2path, d2->d_name);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [/vast/home/spoole/src/G+H/TAKE/papi-master/src/libpfm4/lib/../rules.mk:30: pfmlib_perf_event_pmu.o] Error 1
make[2]: Leaving directory '/vast/home/spoole/src/G+H/TAKE/papi-master/src/libpfm4/lib'
make[1]: *** [Makefile:52: lib] Error 2
make[1]: Leaving directory '/vast/home/spoole/src/G+H/TAKE/papi-master/src/libpfm4'
make: *** [Rules.pfm4_pe:41: /vast/home/spoole/src/G+H/TAKE/papi-master/src/libpfm4/lib/libpfm.a] Error 2
V/r,
Steve…
Cell : (505) 695-3033
Office : (505) 664-0584
IMPORTANT NOTICE: The contents of this email and any attachments are company confidential and
may also be privileged. If you are not the intended recipient, please notify the sender immediately
and do not disclose the contents to any other person, use it for any purpose, or store or copy the
information in any medium.
Thank you.
Date: Wednesday, February 8, 2023 at 11:58 AM
To: "Poole, Steve" <swp...@lanl.gov>, ptools-perfapi <ptools-...@icl.utk.edu>, perfapi-devel <perfap...@icl.utk.edu>
Subject: [EXTERNAL] Re: FW: Question about aarch64
Hi Steve,
Did a hack which I think might work. I will let you know.
That is sort of what I did in my hack.