cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

kenobrien
Journeyman III

Initialising AMDTPowerProfileAPI returns AMDT_ERROR_FAIL

Hi,

I have built an application which uses AMDTPowerProfileAPI. It compiles successfully, but when I initialise this library as below:

AMDTResult hResult = AMDTPwrProfileInitialize(AMDT_PWR_PROFILE_MODE_ONLINE);

I receive an error code in hResult of "AMDT_ERROR_FAIL".

I'm running Centos 6.6. I did have to statically link to a newer libc to get this library to link so perhaps something is corrupted at runtime.

It is not feasible to update the target machine. None of the other error codes are triggered. What could cause this error?

Best Regards,

Ken

0 Likes
16 Replies
rajeebbarman
Staff
Staff

Re: Initialising AMDTPowerProfileAPI returns AMDT_ERROR_FAIL

Hi Ken,

Sorry for our delayed response. To investigate the problem further can you please provide following details.

  1. Which platform you are using. Do you have discrete GPU connected as well?
  2. What is the output of command “lsmod | grep pcore”
  3. Did you try executing power profiler commandline tool? If not, can you please try executing  following command from
    codexl bin directory  ./CodeXLPowerProfiler -l

--Aalok

0 Likes
kenobrien
Journeyman III

Re: Initialising AMDTPowerProfileAPI returns AMDT_ERROR_FAIL

Hi,

Thank you for your response.

1. I am on Centos 6.6 Linux. I have a discrete AMD GPU connected. The CPU is Intel based. Is this an issue?

2. There is no output. Am I missing a driver?

3. The output of CodeXLPowerProfiler -l is : Failed to initialize the driver. (error code 0x80004005). I have fglrx loaded.

Can you pin down the specific requirements in terms of compiler/runtime required to build using this library.

I have been able to link my executable in the traditional way so I have ruled that out as the problem. I will attempt to install the latest AMD graphics driver today.

Many thanks,

Ken

0 Likes
aalok
Staff
Staff

Re: Initialising AMDTPowerProfileAPI returns AMDT_ERROR_FAIL

Hi Ken,

Thanks for your inputs.

Can you please try  following.

  1. It looks like driver is not installed in your machine. Can you please execute "sudo ./AMDTPwrProfDriverInstall.run" command (from codexl bin directory) to install the power profiler driver,
  2. Execute “lsmod | grep pcore” command, to ensure that pcore module installed in the system.
  3. Now try "CodeXLPowerProfiler -l" (from codexl bin directory). We are getting error code 0x80004005 because driver is not installed.

Also, can you please tell which AMD GPU you are using. Using Intel based CPU should not be an issue.

--Aalok

kenobrien
Journeyman III

Re: Initialising AMDTPowerProfileAPI returns AMDT_ERROR_FAIL

Hi,

Thanks very much for your reply. It was very helpful.

1. I installed the driver.

2. smod | grep pcore gives "pcore                  32525  0"

3. CodeXLPowerProfiler -l gives "Power Profiler is not supported on the current platform (error code 0x80080011)."

We're running an AMD R9 295X2.

Ken

0 Likes
aalok
Staff
Staff

Re: Initialising AMDTPowerProfileAPI returns AMDT_ERROR_FAIL

Hi Ken,

Thanks for reply.

Can you  please provide me the device id for your GPU.

Following Linux command with help to get the device ID

     lspci -vnn | grep VGA -A 12

--Aalok

0 Likes
kenobrien
Journeyman III

Re: Initialising AMDTPowerProfileAPI returns AMDT_ERROR_FAIL

Hi Aalok,

Thanks for your reply. We are running on a virtual system. lspci doesn't have any output whatsoever. We will try to expose the PCIe card to the virtual OS.

Best Regards,

Ken

0 Likes
aalok
Staff
Staff

Re: Initialising AMDTPowerProfileAPI returns AMDT_ERROR_FAIL

Hi Ken,

CodeXL doesn't support Power Profiling on virtual environment due to limitations in accessing relevant physical counters from guest OS.

So in this case the error thrown by the Power Profiler is expected behaviour.

--Aalok

0 Likes
kenobrien
Journeyman III

Re: Initialising AMDTPowerProfileAPI returns AMDT_ERROR_FAIL

Hi Aalok,

Many thanks for your support with this. I will see if it's possible to have the card moved to a bare metal system.

Best Regards,

Ken

0 Likes
kenobrien
Journeyman III

Re: Initialising AMDTPowerProfileAPI returns AMDT_ERROR_FAIL

Hi Aalok,

Turns out the machines are not virtual.

Can you suggest reasons why I'd get an unsupported platform error otherwise?

We now have output from lspci.

08:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Vesuvius [Radeon R9 295X2] [1002:67b9] (prog-if 00 [VGA controller])

        Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:0b2a]

        Flags: bus master, fast devsel, latency 0, IRQ 40

        Memory at a0000000 (64-bit, prefetchable) [size=256M]

        Memory at b0000000 (64-bit, prefetchable) [size=8M]

        I/O ports at c000 [size=256]

        Memory at fb600000 (32-bit, non-prefetchable) [size=256K]

        Expansion ROM at fb640000 [disabled] [size=128K]

        Capabilities: [48] Vendor Specific Information: Len=08 <?>

        Capabilities: [50] Power Management version 3

        Capabilities: [58] Express Legacy Endpoint, MSI 00

        Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+

        Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>

We're getting close. Any ideas?

Best Regards,

Ken

0 Likes