Software Tuning, Performance Optimization & Platform Monitoring
Discussion regarding monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform updating.

Intel PCM: Set environment variables for programs being profiled

Irshad_P_
Beginner
371 Views

Hi,

I'm trying to get stats for an OpenMP program using `pcm.x "path/to/executable"` after setting OMP_NUM_THEADS environment variable to `1`. PCM doesn't seem to respect that. It runs the program on all the available cores. Tried `pcm.x "export OMP_NUM_THREADS=1 && path/to/executable"` and also `pcm.x "OMP_NUM_THEADS=1 path/to/executable"`. Both doesn't work.

Any help on how to get this done is much appreciated.

0 Kudos
4 Replies
Roman_D_Intel
Employee
371 Views

you can try to put the two lines

export OMP_NUM_THREADS=1 

path/to/executable

into "run.sh" script

and then execute pcm.x "sh run.sh"

Roman

0 Kudos
Irshad_P_
Beginner
371 Views

Hi Roman,

Thanks for the reply. But, wouldn't that pollute the numbers obtained ?

0 Kudos
Roman_D_Intel
Employee
371 Views

If your program runs > 1 second I would say no.

0 Kudos
Irshad_P_
Beginner
371 Views

Thanks :)

0 Kudos
Reply