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?
Sorry for our delayed response. To investigate the problem further can you please provide following details.
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.
Thanks for your inputs.
Can you please try following.
Also, can you please tell which AMD GPU you are using. Using Intel based CPU should not be an issue.
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.
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
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.
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.
Many thanks for your support with this. I will see if it's possible to have the card moved to a bare metal system.
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 : 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:  Vendor Specific Information: Len=08 <?>
Capabilities:  Power Management version 3
Capabilities:  Express Legacy Endpoint, MSI 00
Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities:  Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
We're getting close. Any ideas?