Skip to content

Adapting to the system hwloc situation #73

@inducer

Description

@inducer

It seems that we have two possible situations that can give us the annoying:

Choose platform:
[0] <pyopencl.Platform 'Portable Computing Language' at 0x7f0979c86008>
Choice [0]:
Not enough memory to run on this device.
[1]    150038 abort (core dumped)  python wave-eager.py
  • System MPI uses libhwloc 1 (Livermore), pocl uses libhwloc 2
  • System MPI uses libhwloc 2 (Debian, e.g. Andreas's machine, scicomp cluster), pocl uses libhwloc1

As of #71, we default to installing libhwloc 1, but that's also not a safe default. Is there something we can do to automate installing the correct libhwloc?

This snippet will get the current hwloc version, using either Python 2 or 3:

import ctypes
hwloc = ctypes.cdll.LoadLibrary("libhwloc.so.15")
# https://github.com/open-mpi/hwloc/blob/master/include/hwloc.h
hwloc.hwloc_get_api_version.restype = ctypes.c_uint
hwloc.hwloc_get_api_version.argtypes = []
print(hwloc.hwloc_get_api_version() >> 16)

I'm just not sure that using this is a great idea...

cc @matthiasdiener

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions