HadrienG2 / hwlocality

Rust bindings to Open MPI Portable Hardware Locality "hwloc" library, covering version 2.0 and above.
MIT License
20 stars 5 forks source link

Disable hwloc CLI tools and tests on Windows #88

Closed nazar-pc closed 8 months ago

nazar-pc commented 8 months ago

Fixes https://github.com/HadrienG2/hwlocality/issues/87 by not compiling CLI tools and tests that are not needed for hwlocality's use case anyway.

semanticdiff-com[bot] commented 8 months ago

Review changes with SemanticDiff.

Analyzed 1 of 1 files.

Overall, the semantic diff is 17% smaller than the GitHub diff.

Filename Status
:heavy_check_mark: hwlocality-sys/build.rs 16.67% smaller
nazar-pc commented 8 months ago

I did a quick search before submitting a PR and wasn't able to find it. I'm not familiar with autotools though, so I might have missed something fairly obvious.

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (ebeca11) 65.81% compared to head (372bd2f) 66.97%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #88 +/- ## ========================================== + Coverage 65.81% 66.97% +1.16% ========================================== Files 43 42 -1 Lines 4599 4055 -544 ========================================== - Hits 3027 2716 -311 + Misses 1572 1339 -233 ``` | [Flag](https://app.codecov.io/gh/HadrienG2/hwlocality/pull/88/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Hadrien+G.) | Coverage Δ | | |---|---|---| | [ubuntu-latest](https://app.codecov.io/gh/HadrienG2/hwlocality/pull/88/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Hadrien+G.) | `66.97% <ø> (ø)` | | | [windows-latest](https://app.codecov.io/gh/HadrienG2/hwlocality/pull/88/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Hadrien+G.) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Hadrien+G.#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

nazar-pc commented 8 months ago

Branch is out of date. Should I update it or will you merge as is?

HadrienG2 commented 8 months ago

You will want to generate the configure script (see hwloc docs) and then run ./configure --help. This will tell you which configuration options are available.

nazar-pc commented 8 months ago

Have not seen anything relevant in help message on Linux:

``` `configure' configures hwloc 2.8.1rc1-git to adapt to many kinds of systems. Usage: ./configure [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print `checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for `--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or `..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [/usr/local] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, `make install' will install all the files in `/usr/local/bin', `/usr/local/lib' etc. You can specify an installation prefix other than `/usr/local' using `--prefix', for instance `--prefix=$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/hwloc] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=no] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-embedded-mode Using --enable-embedded-mode puts the HWLOC into "embedded" mode. The default is --disable-embedded-mode, meaning that the HWLOC is in "standalone" mode. --enable-debug Using --enable-debug enables various hwloc maintainer-level debugging controls. This option is not recomended for end users. --enable-doxygen enable support for building Doxygen documentation (note that this option is ONLY relevant in developer builds; Doxygen documentation is pre-built for tarball builds and this option is therefore ignored) --disable-readme disable the updating of the top-level README file from the HTML documentation index --disable-picky When in developer checkouts of hwloc and compiling with gcc, the default is to enable maximum compiler pickyness. Using --disable-picky or --enable-picky overrides any default setting --disable-cairo Disable the Cairo back-end of hwloc's lstopo command --disable-cpuid Disable the cpuid-based architecture specific support (x86 component) --disable-libxml2 Do not use libxml2 for XML support, use a custom minimalistic support --disable-io Disable I/O discovery build entirely (PCI, LinuxIO, CUDA, OpenCL, NVML, RSMI, LevelZero, GL) instead of only disabling it at runtime by default --disable-pci Disable the PCI device discovery build (instead of only disabling PCI at runtime by default) --enable-32bits-pci-domain Enable 32 bits PCI domains (domains > 16bits are ignored by default). WARNING: This breaks the library ABI, don't enable unless really needed. --disable-opencl Disable the OpenCL device discovery build (instead of only disabling OpenCL at runtime by default) --disable-cuda Disable the CUDA device discovery build using libcudart (instead of only disabling CUDA at runtime by default) --disable-nvml Disable the NVML device discovery build (instead of only disabling NVML at runtime by default) --disable-rsmi Disable the ROCm SMI device discovery --disable-levelzero Disable the oneAPI Level Zero device discovery --disable-gl Disable the GL display device discovery (instead of only disabling GL at runtime by default) --disable-libudev Disable the Linux libudev --enable-plugins=name,... Build the given components as dynamically-loaded plugins --disable-plugin-dlopen Do not use dlopen for loading plugins. --disable-plugin-ltdl Do not use ltdl for loading plugins. --enable-visibility enable visibility feature of certain compilers/linkers (default: enabled on platforms that support it) --enable-netloc The Netloc functionality is disabled by default. Using --enable-netloc will cause configure to abort if Netloc cannot be build (e.g., not supported on your platform). Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-hwloc-symbol-prefix=STRING STRING can be any valid C symbol name. It will be prefixed to all public HWLOC symbols. Default: "" (no prefix) --with-cuda-version= Specify the CUDA version (e.g. 11.2) for selecting the appropriate pkg-config file --with-cuda= Specify the CUDA installation directory, used for NVIDIA NVML and OpenCL too. If a non-existent directory is given, all dependencies installed by CUDA are disabled (CUDA, NVML and NVIDIA OpenCL). --with-rocm-version= Specify the ROCm version (e.g. 4.2.0) for selecting the default ROCm installation path (e.g. /opt/rocm-4.2.0) --with-rocm= Specify the ROCm installation directory --with-hwloc-plugins-path=dir:... Colon-separated list of plugin directories. Default: "$prefix/lib/hwloc". Plugins will be installed in the first directory. They will be loaded from all of them, in order. --with-x use the X Window System Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory LT_SYS_LIBRARY_PATH User-defined run-time library search path. CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor HWLOC_MS_LIB Path to Microsoft's Visual Studio `lib' tool CUDA_VERSION The CUDA version (e.g. 11.2) for selecting the appropriate pkg-config file ROCM_VERSION The ROCm version (e.g. 4.2.0) for selecting the default ROCm installation path (e.g. /opt/rocm-4.2.0) PKG_CONFIG path to pkg-config utility HWLOC_PCIACCESS_CFLAGS C compiler flags for PCIACCESS, overriding pkg-config HWLOC_PCIACCESS_LIBS linker flags for PCIACCESS, overriding pkg-config HWLOC_CUDA_CFLAGS C compiler flags for CUDA, overriding pkg-config HWLOC_CUDA_LIBS linker flags for CUDA, overriding pkg-config HWLOC_CUDART_CFLAGS C compiler flags for CUDART, overriding pkg-config HWLOC_CUDART_LIBS linker flags for CUDART, overriding pkg-config HWLOC_LEVELZERO_CFLAGS C compiler flags for LEVELZERO, overriding pkg-config HWLOC_LEVELZERO_LIBS linker flags for LEVELZERO, overriding pkg-config XMKMF Path to xmkmf, Makefile generator for X Window System CPP C preprocessor HWLOC_LIBXML2_CFLAGS C compiler flags for LIBXML2, overriding pkg-config HWLOC_LIBXML2_LIBS linker flags for LIBXML2, overriding pkg-config DOXYGEN Location of the doxygen program (required for building the hwloc doxygen documentation) PDFLATEX Location of the pdflatex program (required for building the hwloc doxygen documentation) MAKEINDEX Location of the makeindex program (required for building the hwloc doxygen documentation) FIG2DEV Location of the fig2dev program (required for building the hwloc doxygen documentation) GS Location of the gs program (required for building the hwloc doxygen documentation) EPSTOPDF Location of the epstopdf program (required for building the hwloc doxygen documentation) W3M Location of the w3m program (required to building the top-level hwloc README file) LYNX Location of the lynx program (required to building the top-level hwloc README file) HWLOC_CAIRO_CFLAGS C compiler flags for CAIRO, overriding pkg-config HWLOC_CAIRO_LIBS linker flags for CAIRO, overriding pkg-config DIFF diff tool ARCHIVEMOUNT Location of the archivemount program (for loading archive topology in tools) HWLOC_NUMA_CFLAGS C compiler flags for NUMA, overriding pkg-config HWLOC_NUMA_LIBS linker flags for NUMA, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . ```

UPD: Found, it is called "embedded mode"

nazar-pc commented 8 months ago

There is embedded mode, but it builds libhwloc_embedded.la file and a bunch of object files instead of static library :confused:

HadrienG2 commented 8 months ago

Thanks for the investigation! :+1: