ROCm / rocm_smi_lib

ROCm SMI LIB
https://rocm.docs.amd.com/projects/rocm_smi_lib/en/latest/
MIT License
112 stars 48 forks source link

Error on building test #78

Closed BertaViader-zv closed 7 months ago

BertaViader-zv commented 3 years ago

Hello,

I'm trying to test the rocm-smi, but these errors appears on building the tests:

[ 11%] Building CXX object CMakeFiles/rsmitst64.dir/test_common.cc.o
/usr/bin/c++ -DDEBUG -DLITTLEENDIAN_CPU=1 -D__linux__ -I/opt/rocm-4.0.0/rocm_smi/include -I/home/zymvol/git/rocm_smi_lib/tests/rocm_smi_test/.. -I/home/zymvol/git/rocm_smi_lib/tests/rocm_smi_test/gtest/include -isystem /home/zymvol/git/rocm_smi_lib/tests/rocm_smi_test/gtest/googletest/include -isystem /home/zymvol/git/rocm_smi_lib/tests/rocm_smi_test/gtest/googletest -std=c++11  -fexceptions -fno-rtti -fno-math-errno -fno-threadsafe-statics -fmerge-all-constants -fms-extensions -Wall -Wextra -m64  -msse -msse2 -ggdb -O0 -g -pthread -o CMakeFiles/rsmitst64.dir/test_common.cc.o -c /home/zymvol/git/rocm_smi_lib/tests/rocm_smi_test/test_common.cc
/home/zymvol/git/rocm_smi_lib/tests/rocm_smi_test/test_common.cc:70:6: error: ‘RSMI_DEV_PERF_LEVEL_DETERMINISM’ was not declared in this scope; did you mean ‘RSMI_DEV_PERF_LEVEL_MANUAL’?
   70 |     {RSMI_DEV_PERF_LEVEL_DETERMINISM, "RSMI_DEV_PERF_LEVEL_DETERMINISM"},
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |      RSMI_DEV_PERF_LEVEL_MANUAL
/home/zymvol/git/rocm_smi_lib/tests/rocm_smi_test/test_common.cc:73:1: error: could not convert ‘{{RSMI_DEV_PERF_LEVEL_AUTO, "RSMI_DEV_PERF_LEVEL_AUTO"}, {RSMI_DEV_PERF_LEVEL_LOW, "RSMI_DEV_PERF_LEVEL_LOW"}, {RSMI_DEV_PERF_LEVEL_HIGH, "RSMI_DEV_PERF_LEVEL_HIGH"}, {RSMI_DEV_PERF_LEVEL_MANUAL, "RSMI_DEV_PERF_LEVEL_MANUAL"}, {RSMI_DEV_PERF_LEVEL_STABLE_STD, "RSMI_DEV_PERF_LEVEL_STABLE_STD"}, {RSMI_DEV_PERF_LEVEL_STABLE_PEAK, "RSMI_DEV_PERF_LEVEL_STABLE_PEAK"}, {RSMI_DEV_PERF_LEVEL_STABLE_MIN_MCLK, "RSMI_DEV_PERF_LEVEL_STABLE_MIN_MCLK"}, {RSMI_DEV_PERF_LEVEL_STABLE_MIN_SCLK, "RSMI_DEV_PERF_LEVEL_STABLE_MIN_SCLK"}, {<expression error>, "RSMI_DEV_PERF_LEVEL_DETERMINISM"}, {RSMI_DEV_PERF_LEVEL_UNKNOWN, "RSMI_DEV_PERF_LEVEL_UNKNOWN"}}’ from ‘<brace-enclosed initializer list>’ to ‘const std::map<rsmi_dev_perf_level_t, const char*>’
   73 | };
      | ^
      | |
      | <brace-enclosed initializer list>
/home/zymvol/git/rocm_smi_lib/tests/rocm_smi_test/test_common.cc:76:43: error: ‘RSMI_DEV_PERF_LEVEL_DETERMINISM’ was not declared in this scope; did you mean ‘RSMI_DEV_PERF_LEVEL_MANUAL’?
   76 | static_assert(RSMI_DEV_PERF_LEVEL_LAST == RSMI_DEV_PERF_LEVEL_DETERMINISM,
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                           RSMI_DEV_PERF_LEVEL_MANUAL
make[2]: *** [CMakeFiles/rsmitst64.dir/build.make:111: CMakeFiles/rsmitst64.dir/test_common.cc.o] Error 1
make[2]: Leaving directory '/home/zymvol/git/rocm_smi_lib/build'
make[1]: *** [CMakeFiles/Makefile2:160: CMakeFiles/rsmitst64.dir/all] Error 2
make[1]: Leaving directory '/home/zymvol/git/rocm_smi_lib/build'
make: *** [Makefile:152: all] Error 2

I installed rocm-smi from rocm package, I don't know if this is related to that. My card is: Radeon RX 5700 XT and the O.S is ubuntu 20.04.

If you need more information let me know.

Thanks, Berta

charis-poag-amd commented 7 months ago

@abhimeda could you provide your build steps, CMAKE version and gcc --version (or g++ version)? Our readme should outline which versions are compatible. Good news is we build in Ubuntu 20.04, so this should also work for you.

Maybe try pulling in latest seen in master or develop branch and use those steps?

If you are still experiencing issues please provide these steps and your build output. Closing and we can reopen once we receive this information.