| 0f51ee0f | 12-Apr-2021 |
Alexei Colin <acolin@isi.edu> |
config,petsc4py: support cross-compilation
On some HPC clusters it is necessary to cross-compile because the build hosts (login nodes) have a different architecture (or CPU family) from worker ndoes
config,petsc4py: support cross-compilation
On some HPC clusters it is necessary to cross-compile because the build hosts (login nodes) have a different architecture (or CPU family) from worker ndoes, for example on ALCF Theta HPC cluster workers are Xeon Phi, so turning on cpu-family optimizations turns the build into a cross-compilation. The current ./configure fails with SIGILL (Illegal instruction) when it tries to import `numpy`, which had been cross-compiled and cannot run on the build host.
This patch simply adds (to `./configure` and to `petsc4py`'s `setup.py`) a means to suppress autodetection operations that involve loading dependencies for checks and to get meta info like include. Users who cross-compile can use these arguments to pass the meta info explicitly so that it doesn't need to be autodetected on the build host.
To interface into `setup.py` an env var is used, because there doesn't seem to be any better alternative. We don't want to mess with setuptools's built-in processing of command-line arguments; and extending that seems to be possible only per command, which is not useful for getting the information we need at the top-level scope and is also needlessly complicated.
Signed-off-by: Alexei Colin <acolin@isi.edu>
show more ...
|