Skip to content

[GSD-11595] "zello_sysman.cpp" build fails with mystery errors, does not check for required spec version #626

@eero-t

Description

@eero-t

While latest release version (23.05.25593.9) works fine, building Git head version of zello_sysman:
g++ -O2 -Wall -o zello_sysman zello_sysman.cpp -lze_loader -locloc

Fails to following mystery errors:

zello_sysman.cpp: In function 'void getSysmanDeviceHandles(_ze_driver_handle_t*&, std::vector<_ze_device_handle_t*>&)':
zello_sysman.cpp:166:18: error: 'zesInit' was not declared in this scope; did you mean 'zeInit'?
  166 |     VALIDATECALL(zesInit(0));
      |                  ^~~~~~~
zello_sysman.cpp:94:25: note: in definition of macro 'VALIDATECALL'
   94 |         ze_result_t r = myZeCall;             \
      |                         ^~~~~~~~
zello_sysman.cpp:169:18: error: 'zesDriverGet' was not declared in this scope; did you mean 'zeDriverGet'?
  169 |     VALIDATECALL(zesDriverGet(&driverCount, nullptr));
      |                  ^~~~~~~~~~~~
zello_sysman.cpp:94:25: note: in definition of macro 'VALIDATECALL'
   94 |         ze_result_t r = myZeCall;             \
      |                         ^~~~~~~~
zello_sysman.cpp:174:18: error: 'zesDriverGet' was not declared in this scope; did you mean 'zeDriverGet'?
  174 |     VALIDATECALL(zesDriverGet(&driverCount, &sysmanDriverHandle));
      |                  ^~~~~~~~~~~~
zello_sysman.cpp:94:25: note: in definition of macro 'VALIDATECALL'
   94 |         ze_result_t r = myZeCall;             \
      |                         ^~~~~~~~
zello_sysman.cpp:177:18: error: 'zesDeviceGet' was not declared in this scope; did you mean 'zeDeviceGet'?
  177 |     VALIDATECALL(zesDeviceGet(sysmanDriverHandle, &deviceCount, nullptr));
      |                  ^~~~~~~~~~~~
zello_sysman.cpp:94:25: note: in definition of macro 'VALIDATECALL'
   94 |         ze_result_t r = myZeCall;             \
      |                         ^~~~~~~~
zello_sysman.cpp:183:18: error: 'zesDeviceGet' was not declared in this scope; did you mean 'zeDeviceGet'?
  183 |     VALIDATECALL(zesDeviceGet(sysmanDriverHandle, &deviceCount, sysmanDevices.data()));
      |                  ^~~~~~~~~~~~
zello_sysman.cpp:94:25: note: in definition of macro 'VALIDATECALL'
   94 |         ze_result_t r = myZeCall;             \
      |                         ^~~~~~~~
zello_sysman.cpp: In function 'void testSysmanFabricPort(_ze_device_handle_t*&)':
zello_sysman.cpp:1147:9: error: 'zes_fabric_port_error_counters_t' was not declared in this scope; did you mean 'zes_fabric_port_throughput_t'?
 1147 |         zes_fabric_port_error_counters_t fabricPortErrorCounters = {};
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         zes_fabric_port_throughput_t
zello_sysman.cpp:1197:67: error: 'fabricPortErrorCounters' was not declared in this scope
 1197 |         VALIDATECALL(zesFabricPortGetFabricErrorCounters(handle, &fabricPortErrorCounters));
      |                                                                   ^~~~~~~~~~~~~~~~~~~~~~~
zello_sysman.cpp:94:25: note: in definition of macro 'VALIDATECALL'
   94 |         ze_result_t r = myZeCall;             \
      |                         ^~~~~~~~
zello_sysman.cpp:1197:22: error: 'zesFabricPortGetFabricErrorCounters' was not declared in this scope
 1197 |         VALIDATECALL(zesFabricPortGetFabricErrorCounters(handle, &fabricPortErrorCounters));
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
zello_sysman.cpp:94:25: note: in definition of macro 'VALIDATECALL'
   94 |         ze_result_t r = myZeCall;             \
      |                         ^~~~~~~~
zello_sysman.cpp:1199:48: error: 'fabricPortErrorCounters' was not declared in this scope
 1199 |             std::cout << "Link Failures = " << fabricPortErrorCounters.linkFailureCount << std::endl;
      |                                                ^~~~~~~~~~~~~~~~~~~~~~~

Note: as this is very useful tool for testing Sysman implementation, I'm building it against release version of L0, not against Git head version. Others can do the same, as this tool has been mentioned in different public Sysman related tickets (not in just this project).

EDIT: therefore it should check that available L0 header is new enough and show understandable error if not, like this:

#if ZE_API_VERSION_CURRENT < ZE_MAKE_VERSION( 1, 13 )
# error "zello_sysman.cpp requires L0 API >= v1.13"
#endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: Level Zero SysmanLevel Zero System Management API for hardware monitoringStatus: BacklogConfirmed issue; pending scheduling or queued awaiting resourcesType: BugGeneral bug report, unexpected behavior or crash

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions