Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error with intel compiler & spack #1956

Closed
s-sajid-ali opened this issue Jan 9, 2019 · 10 comments
Closed

Build error with intel compiler & spack #1956

s-sajid-ali opened this issue Jan 9, 2019 · 10 comments

Comments

@s-sajid-ali
Copy link

s-sajid-ali commented Jan 9, 2019

I've built openblas with spack using intel@18.0.3 and when I try to run a simple program it gives the following errors:

PATH_TO_OPENBLAS/lib/libopenblas.so: undefined reference to `for_cpystr'
PATH_TO_OPENBLAS/lib/libopenblas.so: undefined reference to `for_concat'

Here's how the linking looks like :

[sajid@xrmlite lib]$ pwd
/home/sajid/packages/spack/opt/spack/linux-centos7-x86_64/intel-18.0.3/openblas-0.3.4-meisjl5yp4xcjywvq3melryeyueubox2/lib
[sajid@xrmlite lib]$ ldd libopenblas.so
        linux-vdso.so.1 =>  (0x00007ffe29283000)
        libm.so.6 => /lib64/libm.so.6 (0x00002b1aa8aac000)
        libimf.so => /opt/intel/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64/libimf.so (0x00002b1aa8dae000)
        libsvml.so => /opt/intel/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64/libsvml.so (0x00002b1aa9341000)
        libirng.so => /opt/intel/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64/libirng.so (0x00002b1aaac50000)
        libgcc_s.so.1 => /home/sajid/packages/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/gcc-7.3.0-xyzezhjmbiebkjfoakso464rhfshlkyq/lib64/libgcc_s.so.1 (0x00002b1aaafc4000)
        libintlc.so.5 => /opt/intel/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64/libintlc.so.5 (0x00002b1aab1db000)
        libc.so.6 => /lib64/libc.so.6 (0x00002b1aab44a000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00002b1aab817000)
        /lib64/ld-linux-x86-64.so.2 (0x000055ba20f17000)

And for reference, here is the build log : [build.out] and the [build.env].
spack version: develop, at the latest commit.

@martin-frbg
Copy link
Collaborator

I see you already opened spack/spack#8767 for what appears to be the same problem some months ago. So far I can only concur that there seems to be something going wrong with the linking to libifcore, although -lifcore appears on the final link line in your build.out. I do not think that this is OpenBLAS' fault, perhaps your system (or the spack package) has an empty libifcore (or one linked to a different library) in its search path ?

@s-sajid-ali
Copy link
Author

As per your request:

[sajid@xrmlite intel64_lin]$ pwd
/opt/intel/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin
[sajid@xrmlite intel64_lin]$ ldd libifcore.a
        not a dynamic executable
[sajid@xrmlite intel64_lin]$ ldd libifcore.so
        not a dynamic executable
[sajid@xrmlite intel64_lin]$ ldd libifcore.so.5
        linux-vdso.so.1 =>  (0x00007ffd5f9f8000)
        libimf.so => not found
        libm.so.6 => /lib64/libm.so.6 (0x00002b7a3fee1000)
        libsvml.so => not found
        libintlc.so.5 => not found
        libc.so.6 => /lib64/libc.so.6 (0x00002b7a401e4000)
        /lib64/ld-linux-x86-64.so.2 (0x0000558462648000)

I never expected this to be the issue. I'll look into why this happened then. Thanks for the tip.

@s-sajid-ali
Copy link
Author

s-sajid-ali commented Feb 12, 2019

@martin-frbg : If I may ask one more question, is there a way to make openblas not try to do things like
icc -lifcore and instead do icc PATH_TO_LIB/libifcore.a ?

According to a thread I was reading, icc really seems to dislike linking Fortran libraries when compiling with icpc (and icc?) and prefers to be given the path to the static library.

If this is not something that can be done as a variation of openblas build, feel free to close the issue. Thanks in advance.

@s-sajid-ali s-sajid-ali reopened this Feb 12, 2019
@martin-frbg
Copy link
Collaborator

I am not aware of this being set anywhere in the OpenBLAS build files (except in conjuction with linking libacml for a non-default benchmark target). Probably this can (or needs to) be handled viaCFLAGS or LDFLAGS settings, but as I do not use icc or ifort regularly I do not know any to suggest.

@martin-frbg
Copy link
Collaborator

Actually some platforms (OSX at least) use FC rather than CC for the final link of the dynamic libopenblas.so in exports/Makefile - perhaps this should be done whenever the compiler is Intel ?

According to another thread on the same forum it seems to be discouraged to specify the full path to a lib.

@s-sajid-ali
Copy link
Author

s-sajid-ali commented Feb 13, 2019

According to thread_1 it's better to use full paths if using icc to link mixed language packages.

According to thread_2, it's ideal to use ifort to link mixed language packages and not pass full paths to ifort.

Quote from thread_2 : There's no need for this (specifying libraries to link); better to let the ifort driver choose which libraries to link, and let it take them from the same installation as the compiler (so don't specify the compiler library path with -L). Use the switch -cxxlib to ask the driver to link also to the standard C++ libraries, if needed. It is better to use ifort rather than icc or icpc for linking mixed language applications, because ifort can link the libraries for all 3 languages, whereas the other drivers do not know how to link Fortran libraries.

From build.out, we have :

[sajid@xrmlite OpenBLAS-0.3.5]$ cat spack-build.out  | grep ifcore                                                                                                            
/home/sajid/packages/spack/lib/spack/env/intel/icc -O2 -DMAX_STACK_ALLOC=2048 -wd981 -DF_INTERFACE_INTEL -fPIC -DNO_WARMUP -DMAX_CPU_NUMBER=32 -DMAX_PARALLEL_NUMBER=1 -DVERSI
ON=\"0.3.5\" -mavx2 -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -DNO_AFFINITY -I..  -w -o linktest linktest.c ../libopenblas_haswell-r0.3.5.
so -L/opt/intel/compilers_and_libraries_2019.1.144/linux/mpi/intel64/libfabric/lib -L/opt/intel/compilers_and_libraries_2019.1.144/linux/ipp/lib/intel64 -L/opt/intel/compiler
s_and_libraries_2019.1.144/linux/compiler/lib/intel64_lin -L/opt/intel/compilers_and_libraries_2019.1.144/linux/mkl/lib/intel64_lin -L/opt/intel/compilers_and_libraries_2019.
1.144/linux/tbb/lib/intel64/gcc4.7 -L/opt/intel/compilers_and_libraries_2019.1.144/linux/daal/lib/intel64_lin -L/opt/intel/compilers_and_libraries_2019.1.144/linux/daal/../tb
b/lib/intel64_lin/gcc4.4 -L/opt/intel/compilers_and_libraries_2019.1.144/linux/compiler/lib/intel64_lin -L/home/sajid/packages/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/
gcc-8.2.0-sxbf4jq6ghmoybsjlpqz2dm2qbbxzfyn/lib/gcc/x86_64-pc-linux-gnu/8.2.0/ -L/home/sajid/packages/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/gcc-8.2.0-sxbf4jq6ghmoybsj
lpqz2dm2qbbxzfyn/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../lib64 -L/home/sajid/packages/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/gcc-8.2.0-sxbf4jq6ghmoybsjlpqz2dm2q
bbxzfyn/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../lib64/ -L/lib/../lib64 -L/lib/../lib64/ -L/usr/lib/../lib64 -L/usr/lib/../lib64/ -L/opt/intel/compilers_and_libraries_20
19.1.144/linux/mpi/intel64/libfabric/lib/ -L/opt/intel/compilers_and_libraries_2019.1.144/linux/ipp/lib/intel64/ -L/opt/intel/compilers_and_libraries_2019.1.144/linux/compile
r/lib/intel64_lin/ -L/opt/intel/compilers_and_libraries_2019.1.144/linux/mkl/lib/intel64_lin/ -L/opt/intel/compilers_and_libraries_2019.1.144/linux/tbb/lib/intel64/gcc4.7/ -L
/opt/intel/compilers_and_libraries_2019.1.144/linux/daal/lib/intel64_lin/ -L/opt/intel/compilers_and_libraries_2019.1.144/linux/daal/../tbb/lib/intel64_lin/gcc4.4/ -L/home/sa
jid/packages/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/gcc-8.2.0-sxbf4jq6ghmoybsjlpqz2dm2qbbxzfyn/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../ -L/lib64 -L/lib/ -L/usr/lib
64 -L/usr/lib  -lifport -lifcoremt -limf -lsvml -lm -lipgo -lirc -lpthread -lsvml -lc -lirc_s -ldl -lc  -lifcore && echo OK.                                                  
[sajid@xrmlite OpenBLAS-0.3.5]$                                                                                                                                               

So it might be better to do this final linking using ifort instead of icc as explained here.

@martin-frbg
Copy link
Collaborator

Could you try changing line 145 in exports/Makefile, which currently reads
$(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \
to
$(FC) $(FFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \
(that is, change the CC to FC and replace CFLAGS with FFLAGS on the first line following the test for "LSB"), just to see if this is sufficient to pass the proper parameters to ifort? (If that works, we could put an ifeq($(F_COMPILER), INTEL) around that whole ifeq(LSB)...else...endif block to just call ifort if it exists.)

@s-sajid-ali
Copy link
Author

I forked the repo and built it with the suggested change. Everything works now! Thanks for the help.

Linking info :

[sajid@xrmlite lib]$ ldd libopenblas_haswell-r0.3.6.dev.so
        linux-vdso.so.1 =>  (0x00007ffcb95fd000)
        libm.so.6 => /lib64/libm.so.6 (0x00002af99ad23000)
        libifport.so.5 => /opt/intel/compilers_and_libraries_2019.1.144/linux/compiler/lib/intel64/libifport.so.5 (0x00002af99b025000)
        libifcoremt.so.5 => /opt/intel/compilers_and_libraries_2019.1.144/linux/compiler/lib/intel64/libifcoremt.so.5 (0x00002af99b253000)
        libimf.so => /opt/intel/compilers_and_libraries_2019.1.144/linux/compiler/lib/intel64/libimf.so (0x00002af99b5e8000)
        libsvml.so => /opt/intel/compilers_and_libraries_2019.1.144/linux/compiler/lib/intel64/libsvml.so (0x00002af99bb88000)
        libintlc.so.5 => /opt/intel/compilers_and_libraries_2019.1.144/linux/compiler/lib/intel64/libintlc.so.5 (0x00002af99d52b000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00002af99d79e000)
        libc.so.6 => /lib64/libc.so.6 (0x00002af99d9ba000)
        libgcc_s.so.1 => /home/sajid/packages/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/gcc-8.2.0-sxbf4jq6ghmoybsjlpqz2dm2qbbxzfyn/lib64/libgcc_s.so.1 (0x00002af99dd87000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00002af99dfa0000)
        /lib64/ld-linux-x86-64.so.2 (0x00005645c03cb000)

A simple test case which was failing before, works after the change in build recipe.

I'm also attaching the build-env and build-log for reference.

TiborGY added a commit to TiborGY/OpenBLAS that referenced this issue Jul 7, 2019
* With the Intel compiler on Linux, prefer ifort for the final link step 

icc has known problems with mixed-language builds that ifort can handle just fine. Fixes OpenMathLib#1956

* Rename operands to put lda on the input/output constraint list

* Fix wrong constraints in inline assembly

for OpenMathLib#2009

* Fix inline assembly constraints

rework indices to allow marking argument lda4 as input and output. For OpenMathLib#2009

* Fix inline assembly constraints

rework indices to allow marking argument lda as input and output.

* Fix inline assembly constraints

* Fix inline assembly constraints

* Fix inline assembly constraints in Bulldozer TRSM kernels

rework indices to allow marking i,as and bs as both input and output (marked operand n1 as well for simplicity). For OpenMathLib#2009

* Correct range_n limiting

same bug as seen in OpenMathLib#1388, somehow missed in corresponding PR OpenMathLib#1389

* Allow multithreading TRMV again

revert workaround introduced for issue OpenMathLib#1332 as the actual cause appears to be my incorrect fix from OpenMathLib#1262 (see OpenMathLib#1388)

* Fix error introduced during cleanup

* Reduce list of kernels in the dynamic arch build

to make compilation complete reliably within the 1h limit again

* init

* move fix to right place

* Fix missing -c option in AVX512 test

* Fix AVX512 test always returning false due to missing compiler option

* Make x86_32 imply NO_AVX2, NO_AVX512 in addition to NO_AVX

fixes OpenMathLib#2033

* Keep xcode8.3 for osx BINARY=32 build

as xcode10 deprecated i386

* Make sure that AVX512 is disabled in 32bit builds

for OpenMathLib#2033

* Improve handling of NO_STATIC and NO_SHARED

to avoid surprises from defining either as zero. Fixes OpenMathLib#2035 by addressing some concerns from OpenMathLib#1422

* init

* address warning introed with OpenMathLib#1814 et al

* Restore locking optimizations for OpenMP case

restore another accidentally dropped part of OpenMathLib#1468 that was missed in OpenMathLib#2004 to address performance regression reported in OpenMathLib#1461

* HiSilicon tsv110 CPUs optimization branch

add HiSilicon tsv110 CPUs  optimization branch

* add TARGET support for  HiSilicon tsv110 CPUs

* add TARGET support for HiSilicon tsv110 CPUs

* add TARGET support for HiSilicon tsv110 CPUs

* Fix module definition conflicts between LAPACK and ReLAPACK

for OpenMathLib#2043

* Do not compile in AVX512 check if AVX support is disabled

xgetbv is function depends on NO_AVX being undefined - we could change that too, but that combo is unlikely to work anyway

* ctest.c : add __POWERPC__ for PowerMac

* Fix crash in sgemm SSE/nano kernel on x86_64

Fix bug OpenMathLib#2047.

Signed-off-by: Celelibi <celelibi@gmail.com>

* param.h : enable defines for PPC970 on DarwinOS

fixes:
gemm.c: In function 'sgemm_':
../common_param.h:981:18: error: 'SGEMM_DEFAULT_P' undeclared (first use in this function)
 #define SGEMM_P  SGEMM_DEFAULT_P
                  ^

* common_power.h: force DCBT_ARG 0 on PPC970 Darwin

without this, we see
../kernel/power/gemv_n.S:427:Parameter syntax error
and many more similar entries

that relates to this assembly command
dcbt 8, r24, r18

this change makes the DCBT_ARG = 0
and openblas builds through to completion on PowerMac 970
Tests pass

* Make TARGET=GENERIC compatible with DYNAMIC_ARCH=1

for issue OpenMathLib#2048

* make DYNAMIC_ARCH=1 package work on TSV110.

* make DYNAMIC_ARCH=1 package work on TSV110

* Add Intel Denverton

for OpenMathLib#2048

* Add Intel Denverton

* Change 64-bit detection as explained in OpenMathLib#2056

* Trivial typo fix

as suggested in OpenMathLib#2022

* Disable the AVX512 DGEMM kernel (again)

Due to as yet unresolved errors seen in OpenMathLib#1955 and OpenMathLib#2029

* Use POSIX getenv on Cygwin

The Windows-native GetEnvironmentVariable cannot be relied on, as
Cygwin does not always copy environment variables set through Cygwin
to the Windows environment block, particularly after fork().

* Fix for OpenMathLib#2063: The DllMain used in Cygwin did not run the thread memory
pool cleanup upon THREAD_DETACH which is needed when compiled with
USE_TLS=1.

* Also call CloseHandle on each thread, as well as on the event so as to not leak thread handles.

* AIX asm syntax changes needed for shared object creation

* power9 makefile. dgemm based on power8 kernel with following changes : 32x unrolled 16x4 kernel and 8x4 kernel using (lxv stxv butterfly rank1 update). improvement from 17 to 22-23gflops. dtrmm cases were added into dgemm itself

* Expose CBLAS interfaces for I?MIN and I?MAX

* Build CBLAS interfaces for I?MIN and I?MAX

* Add declarations for ?sum and cblas_?sum

* Add interface for ?sum (derived from ?asum)

* Add ?sum

* Add implementations of ssum/dsum and csum/zsum

as trivial copies of asum/zsasum with the fabs calls replaced by fmov to preserve code structure

* Add ARM implementations of ?sum

(trivial copies of the respective ?asum with the fabs calls removed)

* Add ARM64 implementations of ?sum

as trivial copies of the respective ?asum kernels with the fabs calls removed

* Add ia64 implementation of ?sum

as trivial copy of asum with the fabs calls removed

* Add MIPS implementation of ?sum

as trivial copy of ?asum with the fabs calls removed

* Add MIPS64 implementation of ?sum

as trivial copy of ?asum with the fabs replaced by mov to preserve code structure

* Add POWER implementation of ?sum

as trivial copy of ?asum with the fabs replaced by fmr to preserve code structure

* Add SPARC implementation of ?sum

as trivial copy of ?asum with the fabs replaced by fmov to preserve code structure

* Add x86 implementation of ?sum

as trivial copy of ?asum with the fabs calls removed

* Add x86_64 implementation of ?sum

as trivial copy of ?asum with the fabs calls removed

* Add ZARCH implementation of ?sum

as trivial copies of the respective ?asum kernels with the ABS and vflpsb calls removed

* Detect 32bit environment on 64bit ARM hardware

for OpenMathLib#2056, using same approach as OpenMathLib#2058

* Add cmake defaults for ?sum kernels

* Add ?sum

* Add ?sum definitions for generic kernel

* Add declarations for ?sum

* Add -lm and disable EXPRECISION support on *BSD

fixes OpenMathLib#2075

* Add in runtime CPU detection for POWER.

* snprintf define consolidated to common.h

* Support INTERFACE64=1

* Add support for INTERFACE64 and fix XERBLA calls

1. Replaced all instances of "int" with "blasint"
2. Added string length as "hidden" third parameter in calls to fortran XERBLA

* Correct length of name string in xerbla call

* Avoid out-of-bounds accesses in LAPACK EIG tests

see Reference-LAPACK/lapack#333

* Correct INFO=4 condition

* Disable reallocation of work array in xSYTRF

as it appears to cause memory management problems (seen in the LAPACK tests)

* Disable repeated recursion on Ab_BR in ReLAPACK xGBTRF

due to crashes in LAPACK tests

* sgemm/strmm

* Update Changelog with changes from 0.3.6

* Increment version to 0.3.7.dev

* Increment version to 0.3.7.dev

* Misc. typo fixes

Found via `codespell -q 3 -w -L ith,als,dum,nd,amin,nto,wis,ba -S ./relapack,./kernel,./lapack-netlib`

* Correct argument of CPU_ISSET for glibc <2.5

fixes OpenMathLib#2104

* conflict resolve

* Revert reference/ fixes

* Revert Changelog.txt typos

* Disable the SkyLakeX DGEMMITCOPY kernel as well

as a stopgap measure for numpy/numpy#13401 as mentioned in OpenMathLib#1955

* Disable DGEMMINCOPY as well for now

OpenMathLib#1955

* init

* Fix errors in cpu enumeration with glibc 2.6

for OpenMathLib#2114

* Change two http links to https

Closes OpenMathLib#2109

* remove redundant code OpenMathLib#2113

* Set up CI with Azure Pipelines

[skip ci]

* TST: add native POWER8 to CI

* add native POWER8 testing to
Travis CI matrix with ppc64le
os entry

* Update link to IBM MASS library, update cpu support status

* first try migrating one of the arm builds from travis

* fix tabbing in azure commands

* Update azure-pipelines.yml

take out offending lines (although stolen from https://github.com/conda-forge/opencv-feedstock azure-pipelines fiie)

* Update azure-pipelines.yml

* Update azure-pipelines.yml

* Update azure-pipelines.yml

* Update azure-pipelines.yml

* DOC: Add Azure CI status badge

* Add ARMV6 build to azure CI setup (OpenMathLib#2122)

using aytekinar's Alpine image and docker script from the Travis setup

[skip ci]

* TST: Azure manylinux1 & clean-up

* remove some of the steps & comments
from the original Azure yml template

* modify the trigger section to use
develop since OpenBLAS primarily uses
this branch; use the same batching
behavior as downstream projects NumPy/
SciPy

* remove Travis emulated ARMv6 gcc build
because this now happens in Azure

* use documented Ubuntu vmImage name for Azure
and add in a manylinux1 test run to the matrix

[skip appveyor]

* Add NO_AFFINITY to available options on Linux, and set it to ON

to match the gmake default. Fixes second part of OpenMathLib#2114

* Replace ISMIN and ISAMIN kernels on all x86_64 platforms (OpenMathLib#2125)

* Mark iamax_sse.S as unsuitable for MIN due to issue OpenMathLib#2116
* Use iamax.S rather than iamax_sse.S for ISMIN/ISAMIN on all x86_64 as workaround for OpenMathLib#2116

* Move ARMv8 gcc build from Travis to Azure

* Move ARMv8 gcc build from Travis to Azure

* Update .travis.yml

* Test drone CI

* install make

* remove sudo

* Install gcc

* Install perl

* Install gfortran and add a clang job

* gfortran->gcc-gfortran

* Switch to ubuntu and parallel jobs

* apt update

* Fix typo

* update yes

* no need of gcc in clang build

* Add a cmake build as well

* Add cmake builds and print options

* build without lapack on cmake

* parallel build

* See if ubuntu 19.04 fixes the ICE

* Remove qemu armv8 builds

* arm32 build

* Fix typo

* TST: add SkylakeX AVX512 CI test

* adapt the C-level reproducer code for some
recent SkylakeX AVX512 kernel issues, provided
by Isuru Fernando and modified by Martin Kroeker,
for usage in the utest suite

* add an Intel SDE SkylakeX emulation utest run to
the Azure CI matrix; a custom Docker build was required
because Ubuntu image provided by Azure does not support
AVX512VL instructions

* Add option USE_LOCKING for single-threaded build with locking support

for calling from concurrent threads

* Add option USE_LOCKING for single-threaded build with locking support

* Add option USE_LOCKING for SMP-like locking in USE_THREAD=0 builds

* Add option USE_LOCKING but keep default settings intact

* Remove unrelated change

* Do not try ancient PGI hacks with recent versions of that compiler

should fix OpenMathLib#2139

* Build and run utests in any case, they do their own checks for fortran availability

* Add softfp support in min/max kernels

fix for OpenMathLib#1912

* Revert "Add softfp support in min/max kernels"

* Separate implementations of AMAX and IAMAX on arm

As noted in OpenMathLib#1912 and comment on OpenMathLib#1942, the combined implementation happens to "do the right thing" on hardfp, but cannot return both value and index on softfp where they would have to share the return register

* Ensure correct output for DAMAX with softfp

* Use generic kernels for complex (I)AMAX to support softfp

* improved zgemm power9 based on power8

* upload thread safety test folder

* hook up c++ thread safety test (main Makefile)

*  add c++ thread test option to Makefile.rule

* Document NO_AVX512 

for OpenMathLib#2151

* sgemm pipeline improved, zgemm rewritten without inner packs, ABI lxvx v20 fixed with vs52

* Fix detection of AVX512 capable compilers in getarch

21eda8b introduced a check in getarch.c to test if the compiler is capable of
AVX512. This check currently fails, since the used __AVX2__ macro is only
defined if getarch itself was compiled with AVX2/AVX512 support. Make sure this
is the case by building getarch with -march=native on x86_64. It is only
supposed to run on the build host anyway.

* c_check: Unlink correct file

* power9 zgemm ztrmm optimized

* conflict resolve

* Add gfortran workaround for ABI violations in LAPACKE

for OpenMathLib#2154 (see gcc bug 90329)

* Add gfortran workaround for ABI violations

for OpenMathLib#2154 (see gcc bug 90329)

* Add gfortran workaround for potential ABI violation 

for OpenMathLib#2154

* Update fc.cmake

* Remove any inadvertent use of -march=native from DYNAMIC_ARCH builds

from OpenMathLib#2143, -march=native precludes use of more specific options like -march=skylake-avx512 in individual kernels, and defeats the purpose of dynamic arch anyway.

* Avoid unintentional activation of TLS code via USE_TLS=0

fixes OpenMathLib#2149

* Do not force gcc options on non-gcc compilers

fixes compile failure with pgi 18.10 as reported on OpenBLAS-users

* Update Makefile.x86_64

* Zero ecx with a mov instruction

PGI assembler does not like the initialization in the constraints.

* Fix mov syntax

* new sgemm 8x16

* Update dtrmm_kernel_16x4_power8.S

* PGI compiler does not like -march=native

* Fix build on FreeBSD/powerpc64.

Signed-off-by: Piotr Kubaj <pkubaj@anongoth.pl>

* Fix build for PPC970 on FreeBSD pt. 1

FreeBSD needs DCBT_ARG=0 as well.

* Fix build for PPC970 on FreeBSD pt.2

FreeBSD needs those macros too.

* cgemm/ctrmm power9

* Utest needs CBLAS but not necessarily FORTRAN

* Add mingw builds to Appveyor config

* Add getarch flags to disable AVX on x86

(and other small fixes to match Makefile behaviour)

* Make disabling DYNAMIC_ARCH on unsupported systems work

needs to be unset in the cache for the change to have any effect

* Mingw32 needs leading underscore on object names

(also copy BUNDERSCORE settings for FORTRAN from the corresponding Makefile)
@samcom12
Copy link

I forked the repo and built it with the suggested change. Everything works now! Thanks for the help.

Linking info :

[sajid@xrmlite lib]$ ldd libopenblas_haswell-r0.3.6.dev.so
        linux-vdso.so.1 =>  (0x00007ffcb95fd000)
        libm.so.6 => /lib64/libm.so.6 (0x00002af99ad23000)
        libifport.so.5 => /opt/intel/compilers_and_libraries_2019.1.144/linux/compiler/lib/intel64/libifport.so.5 (0x00002af99b025000)
        libifcoremt.so.5 => /opt/intel/compilers_and_libraries_2019.1.144/linux/compiler/lib/intel64/libifcoremt.so.5 (0x00002af99b253000)
        libimf.so => /opt/intel/compilers_and_libraries_2019.1.144/linux/compiler/lib/intel64/libimf.so (0x00002af99b5e8000)
        libsvml.so => /opt/intel/compilers_and_libraries_2019.1.144/linux/compiler/lib/intel64/libsvml.so (0x00002af99bb88000)
        libintlc.so.5 => /opt/intel/compilers_and_libraries_2019.1.144/linux/compiler/lib/intel64/libintlc.so.5 (0x00002af99d52b000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00002af99d79e000)
        libc.so.6 => /lib64/libc.so.6 (0x00002af99d9ba000)
        libgcc_s.so.1 => /home/sajid/packages/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/gcc-8.2.0-sxbf4jq6ghmoybsjlpqz2dm2qbbxzfyn/lib64/libgcc_s.so.1 (0x00002af99dd87000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00002af99dfa0000)
        /lib64/ld-linux-x86-64.so.2 (0x00005645c03cb000)

A simple test case which was failing before, works after the change in build recipe.

I'm also attaching the build-env and build-log for reference.

What changes did you make in the spack OpenBLAS recipe?
I'm getting a similar issue while building py-scipy with spack and intel-2020.

@martin-frbg
Copy link
Collaborator

The change that was discussed back then got integrated into OpenBLAS two years ago, I do not think there should be a need to modify the spack recipe itself (unless it builds an ancient version of OpenBLAS). And all that was changed was to use ifort rather than icc for the final link of the shared library, so that the various fortran support libraries got pulled in automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants