Lapacke + OpenBlAS, conflicting declarations

Post here if you have a question about linking your program with LAPACK or ScaLAPACK library

Lapacke + OpenBlAS, conflicting declarations

Postby niklasfi » Thu Jul 25, 2013 10:53 am

Hello,

I have successfully compiled LAPACK and OpenBLAS, however when I include the header <cblas.h> anywhere I get these errors:

Code: Select all
[100%] Building C object CMakeFiles/test.dir/test.c.o
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:11654:6: error: conflicting types for 'sgetrf_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:654:5: note: previous declaration of 'sgetrf_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:11656:6: error: conflicting types for 'dgetrf_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:655:5: note: previous declaration of 'dgetrf_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:11658:6: error: conflicting types for 'cgetrf_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:657:5: note: previous declaration of 'cgetrf_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:11660:6: error: conflicting types for 'zgetrf_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:658:5: note: previous declaration of 'zgetrf_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:11686:6: error: conflicting types for 'spotrf_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:696:5: note: previous declaration of 'spotrf_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:11688:6: error: conflicting types for 'dpotrf_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:697:5: note: previous declaration of 'dpotrf_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:11690:6: error: conflicting types for 'cpotrf_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:699:5: note: previous declaration of 'cpotrf_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:11692:6: error: conflicting types for 'zpotrf_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:700:5: note: previous declaration of 'zpotrf_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:11770:6: error: conflicting types for 'sgetrs_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:668:5: note: previous declaration of 'sgetrs_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:11773:6: error: conflicting types for 'dgetrs_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:669:5: note: previous declaration of 'dgetrs_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:11776:6: error: conflicting types for 'cgetrs_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:671:5: note: previous declaration of 'cgetrs_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:11780:6: error: conflicting types for 'zgetrs_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:672:5: note: previous declaration of 'zgetrs_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:11824:6: error: conflicting types for 'spotrs_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:703:5: note: previous declaration of 'spotrs_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:11827:6: error: conflicting types for 'dpotrs_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:704:5: note: previous declaration of 'dpotrs_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:11830:6: error: conflicting types for 'cpotrs_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:706:5: note: previous declaration of 'cpotrs_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:11834:6: error: conflicting types for 'zpotrs_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:707:5: note: previous declaration of 'zpotrs_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:12685:6: error: conflicting types for 'spotri_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:738:5: note: previous declaration of 'spotri_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:12687:6: error: conflicting types for 'dpotri_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:739:5: note: previous declaration of 'dpotri_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:12689:6: error: conflicting types for 'cpotri_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:741:5: note: previous declaration of 'cpotri_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:12691:6: error: conflicting types for 'zpotri_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:742:5: note: previous declaration of 'zpotri_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:12739:6: error: conflicting types for 'strtri_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:731:5: note: previous declaration of 'strtri_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:12741:6: error: conflicting types for 'dtrtri_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:732:5: note: previous declaration of 'dtrtri_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:12743:6: error: conflicting types for 'ctrtri_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:734:5: note: previous declaration of 'ctrtri_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:12746:6: error: conflicting types for 'ztrtri_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:735:5: note: previous declaration of 'ztrtri_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:12882:6: error: conflicting types for 'sgesv_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:675:5: note: previous declaration of 'sgesv_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:12885:6: error: conflicting types for 'dgesv_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:676:5: note: previous declaration of 'dgesv_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:12888:6: error: conflicting types for 'cgesv_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:678:5: note: previous declaration of 'cgesv_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:12891:6: error: conflicting types for 'zgesv_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:679:5: note: previous declaration of 'zgesv_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:15128:6: error: conflicting types for 'sgesvd_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:682:5: note: previous declaration of 'sgesvd_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:15132:6: error: conflicting types for 'dgesvd_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:683:5: note: previous declaration of 'dgesvd_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:15136:6: error: conflicting types for 'cgesvd_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:685:5: note: previous declaration of 'cgesvd_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:15142:6: error: conflicting types for 'zgesvd_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:686:5: note: previous declaration of 'zgesvd_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:15685:6: error: conflicting types for 'sgetf2_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:647:5: note: previous declaration of 'sgetf2_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:15687:6: error: conflicting types for 'dgetf2_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:648:5: note: previous declaration of 'dgetf2_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:15689:6: error: conflicting types for 'cgetf2_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:650:5: note: previous declaration of 'cgetf2_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:15691:6: error: conflicting types for 'zgetf2_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:651:5: note: previous declaration of 'zgetf2_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:15693:6: error: conflicting types for 'slaswp_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:661:5: note: previous declaration of 'slaswp_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:15695:6: error: conflicting types for 'dlaswp_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:662:5: note: previous declaration of 'dlaswp_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:15697:6: error: conflicting types for 'claswp_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:664:5: note: previous declaration of 'claswp_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:15700:6: error: conflicting types for 'zlaswp_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:665:5: note: previous declaration of 'zlaswp_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:15835:6: error: conflicting types for 'slauum_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:717:5: note: previous declaration of 'slauum_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:15837:6: error: conflicting types for 'dlauum_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:718:5: note: previous declaration of 'dlauum_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:15839:6: error: conflicting types for 'clauum_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:720:5: note: previous declaration of 'clauum_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:15841:6: error: conflicting types for 'zlauum_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:721:5: note: previous declaration of 'zlauum_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:16292:6: error: conflicting types for 'csyr_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:340:6: note: previous declaration of 'csyr_' was here
In file included from /home/niklas/hpmc-final/src/test.c:20:0:
/home/niklas/hpmc-final/src/../lapack-3.4.2/lapacke/include/lapacke.h:16295:6: error: conflicting types for 'zsyr_'
In file included from /home/niklas/hpmc-final/src/../OpenBLAS/common.h:568:0,
                 from /home/niklas/hpmc-final/src/../OpenBLAS/cblas.h:5,
                 from /home/niklas/hpmc-final/src/test.c:15:
/home/niklas/hpmc-final/src/../OpenBLAS/common_interface.h:342:6: note: previous declaration of 'zsyr_' was here
make[2]: *** [CMakeFiles/test.dir/test.c.o] Error 1
make[1]: *** [CMakeFiles/test.dir/all] Error 2
make: *** [all] Error 2


It seems OpenBLAS/common_interface.h and lapacke.h declare conflicting interfaces. I only get this problem if I explicitly include the cblas.h version from the OpenBLAS installation. If I use the reference blas header file the compilation is successful. However I need the OpenBLAS header since I want to make use of openblas_set_num_threads which is only declared there.

As an example I have copied the different declarations of zsyr:
Code: Select all
//lapacke.h
void LAPACK_zsyr( char* uplo, lapack_int* n, lapack_complex_double* alpha,
                      const lapack_complex_double* x, lapack_int* incx,
                      lapack_complex_double* a, lapack_int* lda );
//common_interface.h
void BLASFUNC(zsyr) (char *, blasint *, double  *, double *, blasint *,
                    double *, blasint *);

One can see that one version uses double* and the other a complex type is that how it is meant to be?

I would be great if someone could help,
Niklas
niklasfi
 
Posts: 2
Joined: Thu Jul 25, 2013 10:41 am

Re: Lapacke + OpenBlAS, conflicting declarations

Postby Julien Langou » Tue Jul 30, 2013 3:46 pm

Hi Niklas, well .. so I have opened common_interface.h from OpenBLAS. So what happens is that for any complex function (ZSYR, ZGEMM, you name it), OpenBLAS defines an array of complex number as being an array of double precision numbers, this explains the double *. Of course, I guess it is understood that we need twice as many double as complex to make an array of complex with an array of double. Sure. So the double *. Now that's an issue and not consistent with lapacke.h which uses lapack_complex_double* . I am also just realizing that the original cblas.h had void *. Not sure what else to say. Maybe you can change BLASFUNC in OpenBLAS so that it is something like OPENBLAS_ as opposed to LAPACK_ ? No idea. Cheers, Julien.
Julien Langou
 
Posts: 824
Joined: Thu Dec 09, 2004 12:32 pm
Location: Denver, CO, USA


Return to Linking Problem

Who is online

Users browsing this forum: No registered users and 1 guest