- edited description
extras/cannon Makefile should "just work" with OpenBLAS
Right now the extras/cannon Makefile tries to figure out how to include/link BLAS and does a reasonable job for some standard BLAS setups.
It could be improved to additionally handle many common OpenBLAS installs, requiring the user to set at most one variable, with logic along the following lines:
ifneq ($(wildcard $(BLAS_INSTALL)/include),)
BLAS_HEADER_DIRS = -I$(BLAS_INSTALL)/include
else
ifneq ($(wildcard /usr/include/openblas/cblas.h),)
BLAS_HEADER_DIRS = -I/usr/include/openblas
endif
endif
ifneq ($(wildcard $(BLAS_INSTALL)/lib/libopenblas.{a,so}),)
BLAS_LDFLAGS += -L$(BLAS_INSTALL)/lib -lopenblas
else
ifneq ($(wildcard $(BLAS_INSTALL)/lib/libopenblas64.{a,so}),)
BLAS_LDFLAGS += -L$(BLAS_INSTALL)/lib -lopenblas64
endif
endif
Comments (4)
-
reporter -
The snippet above looks to me sufficient to "just work" only for user builds and RedHat-based distributions, including CentoOS, Scientific Linux (Dirac) and OpenSuSE (Cori), where
BLAS_INSTALL=/usr
selects the distro-provided installation.Ubuntu uses
/usr/include/[system-tuple]/
where the system-tuple is something likepowerpc64le-linux-gnu
. This appears to be to allow inline ASM in headers. It can be queried usingdpkg-architecture -q DEB_TARGET_GNU_TYPE
. That is a script usingCC
in the spirit ofconfig.guess
and thus "just works" forCC
set to a gcc cross compiler, but for a native PGI it "whines" and falls back toCC=/usr/bin/cc
. So, this might not amenable to robust automation. -
- changed status to open
Proposed solution in upcxx-extras pull request 23
-
- changed status to resolved
Resolved via the pull request noted previously.
- Log in to comment