How to use --with-cpu=<CPU>

28 views
Skip to first unread message

Alex Grabski

unread,
Jul 15, 2024, 2:43:36 PM7/15/24
to ptools-perfapi
I need to build papi for HASWELL cpus but my pc runs on Xeon. So I have been trying to use "--with-cpu=<CPU>" in configurations, but I keep getting an error afterwards when running "make".

Am I running the command wrong? 
I have tried:
./configure --with-cpu=haswell
./configure --with-cpu=HASWELL
./configure --with-cpu=Haswell
./configure --with-cpu="haswell"

The error I keep getting:

make[1]: Entering directory '/home/vagrant/papi/src/utils'
gcc -o papi_avail papi_avail.o print_header.o ../libpapi.a
/usr/bin/ld: ../libpapi.a(cpu_utils.o): in function `cpu_get_vendor':
cpu_utils.c:(.text+0x1): undefined reference to `x86_cpu_get_vendor'
/usr/bin/ld: ../libpapi.a(cpu_utils.o): in function `cpu_get_name':
cpu_utils.c:(.text+0x11): undefined reference to `x86_cpu_get_name'
/usr/bin/ld: ../libpapi.a(cpu_utils.o): in function `cpu_get_attribute':
cpu_utils.c:(.text+0x21): undefined reference to `x86_cpu_get_attribute'
/usr/bin/ld: ../libpapi.a(cpu_utils.o): in function `cpu_get_attribute_at':
cpu_utils.c:(.text+0x31): undefined reference to `x86_cpu_get_attribute_at'
/usr/bin/ld: ../libpapi.a(linux-common.o): in function `_linux_get_system_info':
linux-common.c:(.text+0xe60): undefined reference to `_x86_detect_hypervisor'
/usr/bin/ld: ../libpapi.a(linux-common.o): in function `_linux_detect_hypervisor':
linux-common.c:(.text+0x2e1): undefined reference to `_x86_detect_hypervisor'
/usr/bin/ld: ../libpapi.a(linux-memory.o): in function `_linux_get_memory_info':
linux-memory.c:(.text+0xaa7): undefined reference to `_x86_cache_info'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:20: papi_avail] Error 1
make[1]: Leaving directory '/home/vagrant/papi/src/utils'
make: *** [Makefile.inc:248: utils] Error 2

Treece Burgess

unread,
Jul 15, 2024, 4:40:25 PM7/15/24
to Alex Grabski, ptools-perfapi
Hello Alex,

For --with-CPU, there is no argument haswell.

Also, Intel Xeon processors can be based on the Haswell micro-architecture. If you run cat /proc/cpuinfo | grep "name" | head -n 1 on the command line, you will be able to see your CPU architecture. For myself the output looks as follows: model name: Intel(R) Xeon(R) CPU E5-2698 v4 @ 2.20GHz. Once you have this information, you can go to Intel's page to see if it falls underneath the Haswell micro-architecture.

Best wishes,

Treece





--
You received this message because you are subscribed to the Google Groups "ptools-perfapi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ptools-perfap...@icl.utk.edu.
To view this discussion on the web visit https://groups.google.com/a/icl.utk.edu/d/msgid/ptools-perfapi/50e2f07f-77c3-4abf-a187-f19f98a59589n%40icl.utk.edu.

Alex Grabski

unread,
Jul 15, 2024, 5:04:14 PM7/15/24
to Treece Burgess, ptools-perfapi
Hello Treece,

Thank you very much for your reply.

I will check out if mine falls under haswell architecture.

However if not, could you let me know what possible arguments there are or if there is a list of these arguments I can access?

Thank you again,

Alex

Treece Burgess

unread,
Jul 16, 2024, 6:35:06 AM7/16/24
to Alex Grabski, ptools-perfapi
Hello Alex,

Possible options for --with-CPU include: core, core2, i7, atom, p4, p3, opteron, athlon, and x86.

Best wishes,

Treece

Alex Grabski

unread,
Jul 16, 2024, 6:44:14 AM7/16/24
to Treece Burgess, ptools-perfapi
Hi,


Thank you very much for your reply.

I checked my xeon processor and its not based on Haswell. 

Would x86 as an option cover Haswell based cpus? Or is there a different more suitable argument?

Best,

Alex



Treece Burgess

unread,
Jul 17, 2024, 6:34:37 PM7/17/24
to Alex Grabski, ptools-perfapi
Hello Alex,

Just to make sure I understand correctly, you are wanting to cross compile with the host being the Xeon CPU and then you want to deploy this on the target of the Haswell CPU?

Could you also send the output of cat /proc/cpuinfo | grep "name" | head -n 1 to to me?

Best wishes,

Treece

Alex Grabski

unread,
Jul 18, 2024, 9:26:08 AM7/18/24
to Treece Burgess, ptools-perfapi
Hello Treece,

Yes, exactly.

Here's the output: 
model name      : Intel(R) Xeon(R) W-10885M CPU @ 2.40GHz

Thank you,

Alex

Heike Jagode

unread,
Jul 18, 2024, 11:40:17 AM7/18/24
to Alex Grabski, Treece Burgess, ptools-perfapi
Alex,

When you refer to cross-compilation, can you confirm that you are on a machine with actual Haswell chips? In other words, are you on a machine where your login nodes are Comet Lakes (the one you listed above) and your compute nodes are Haswells? That seems unusual, but please confirm.

From your previous emails, it sounded more like you are trying to compile and run PAPI on your Comet Lake system but make PAPI "think" it is running on a Haswell without actually having access to Haswell chips. If this is the case, unfortunately, it is not possible with the --with-CPU flag on bare metal. Perhaps using a virtual machine setup would help with that.

Thanks,
Heike




--
__________________________________________
Heike Jagode, Ph.D., Research Associate Professor
Innovative Computing Laboratory (ICL)
University of Tennessee Knoxville
http://icl.utk.edu/~jagode/

Alex Grabski

unread,
Jul 18, 2024, 3:12:24 PM7/18/24
to Heike Jagode, Treece Burgess, ptools-perfapi
Hi Heike,

Basically I need to build the papi libraries to be used on a server that runs on haswell architecture cpus.

However, I am not able to build PAPI on the server itself, so I have to build the libraries on my pc and then transfer them to the server's operating system.
My pc is running a Intel(R) Xeon(R) W-10885M CPU @ 2.40GHz, which is not a haswell chip.

I am building PAPI on a linux virtual machine.

Thank you,

Alex

Treece Burgess

unread,
Jul 18, 2024, 9:41:53 PM7/18/24
to Alex Grabski, Heike Jagode, ptools-perfapi
Hello Alex,

PAPI supports cross compilation in the sense of a single machine which has login nodes and compute nodes that differ with shared modules. Therefore, what you are suggesting would not be possible.

Best wishes,

Treece

Alex Grabski

unread,
Jul 19, 2024, 11:35:39 AM7/19/24
to Treece Burgess, Heike Jagode, ptools-perfapi
I see, thank you for letting me know.

Alex
Reply all
Reply to author
Forward
0 new messages