Compile and use PAPI on MAC OSX 10.10.3

Open discussion of PAPI.

Compile and use PAPI on MAC OSX 10.10.3

Postby Technophobe01 » Fri Feb 13, 2015 12:03 am

Dear PAPI,

I am interesting in getting pointers on how to configure and compile PAPI on Mac OS X 10.10.3.

Has anyone done this, or have any recommendations on the correct steps to do this?

Any help would be much appreciated.

Note: I saw the following comment in the INSTALL.txt..

Other Platforms
*****************************************************************************
PAPI can be compiled and installed on most platforms that have GNU compilers
regardless of operating system or hardware. This includes, for example,
Macintosh systems running recent versions of OSX. However, PAPI can only
provide access to the CPU hardware counters on platforms that are directly
supported. Unsupported platforms will run, buttony provide basic timing
functions, and potential access to some non-cpu components.
Technophobe01
 
Posts: 2
Joined: Thu Feb 12, 2015 11:49 pm
Location: Seattle

Re: Compile and use PAPI on MAC OSX 10.10.3

Postby Technophobe01 » Fri Feb 13, 2015 1:59 pm

I have been able to compile Papi on MacOSX 10.10.3...

Prerequisite:
Install and setup MacPorts https://www.macports.org
Install gnu fortran

>sudo port selfupdate
>sudo port outdated
>sudo port upgrade outdated
>sudo port install gcc49
----
Select gcc 4.9

>port select --list gcc
>sudo port select --set gcc mp-gcc49
>cd ~/dev/papi-5.4.0/src
>./configure
>cd ctests
>mvim omptough.c zero_shmem.c
replace
#include <malloc.h>
with
#include <malloc/malloc.h>
save / exit
>./make
>./run_tests.sh (edited)

Compile is different from run fully but it does compile and execute and pass baseline tests. Appreciate comments or thoughts on execution etc.


Machine Spec:
Model Name: MacBook Pro
Model Identifier: MacBookPro10,1
Processor Name: Intel Core i7
Processor Speed: 2.7 GHz
Number of Processors: 1
Total Number of Cores: 4
L2 Cache (per Core): 256 KB
L3 Cache: 8 MB
Memory: 16 GB
Technophobe01
 
Posts: 2
Joined: Thu Feb 12, 2015 11:49 pm
Location: Seattle

Re: Compile and use PAPI on MAC OSX 10.10.3

Postby yarkhan » Fri Feb 13, 2015 4:10 pm

When you tried to run_tests.sh, did you get any tests that passed?

There was recently a discussion about building PAPI on a Mac (Feb 9 2015) on the papi_devel mailing list.
This may provide some insight
https://lists.eecs.utk.edu/pipermail/pe ... 06879.html
This was in response to the message
https://lists.eecs.utk.edu/pipermail/pe ... 06877.html

Quoting Philip Mucci
> Sadly, PAPI has never been ported to MacOS. It -has- been ported to BSD (thanks to Harald S!) , however, I don’t think the counter access methods
> are the same on OS X. I looked at this a number of years ago, so my knowledge is likely dated. Back then, you used CHUD API calls…
> And honestly, the Mac performance tools are so good (IMHO), that it wasn’t clear that PAPI (and some PAPI-based tools) were going to bring
> something valuable to the table.
>
> All that said, my guess is that it wouldn’t be much work to adapt the BSD code to run on OSX using some different API calls if you’re feeling
> ambitious...

Quoting Vince Weaver
> we at one point (relatively) recently fixed up OSX support enough so PAPI
> compiles and runs.
>
> The issue is there is no hardware counter support. So you are limited to
> using interfaces that will work w/o HW counters, which is not much.
>
> Our initial intent was maybe to provide support for things like reading
> RAPL counters that do MSR directly, but I don't think we ever got around
> to porting that code.
>
> Vince
yarkhan
 
Posts: 12
Joined: Mon Aug 11, 2014 10:33 am


Return to General discussion (read-only)

Who is online

Users browsing this forum: Exabot [Bot] and 1 guest

cron