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

Compile error in Blackbear #170

Open
dschwen opened this issue Mar 27, 2024 · 3 comments
Open

Compile error in Blackbear #170

dschwen opened this issue Mar 27, 2024 · 3 comments

Comments

@dschwen
Copy link
Contributor

dschwen commented Mar 27, 2024

These BLAS/Lapack forward declarations conflict with declaration we pull in through PETSc:

// BLAS/lapack defs
extern "C" {
void dgetrf_(const int & m, const int & n, double* A, const int & lda, int* ipiv, int & info);
void dgetri_(const int & n, double* A, const int & lda, int* ipiv, double* work, const int & lwork, int & info);
void dgesv_(const int & n, const int & nrhs, double * A, const int & lda, int * ipiv, double * b, const int & ldb, int & info);
void dgemv_(const char * trans, const int & m, const int & n, const double & alpha, const double * A, const int & lda, const double * x, const int & incx, const double & beta, double * y, const int & incy);
void dgemm_(const char * transa, const char * transb, const int & m, const int & n, const int & k, const double & alpha, const double * A, const int & lda, const double * B, const int & ldb, const double & beta, double * C, const int & ldc);
void dger_(const int & m, const int & n, const double & alpha, const double * x, const int & incx, const double * y, const int & incy, double * A, const int & lda);
void dgecon_(const char * norm, const int & n, double * A, const int & lda, const double & anrom, double & rcond, double * work, int * lwork, int & info);
void dgttrf_(const int & N, double * DL, double * D, double * DU, double * DU2, int * IPIV, int & INFO);
void dgttrs_(const char * TRANS, const int & N, const int & NRHS, double * DL, double * D, double * DU, double * DU2, int * IPIV, double * B, const int & LDB, int & info);
void dsyev_(const char * JOBZ, const char * UPLO, const int & N, double * A, const int & LDA, double * W, double * WORK, const int & LWORK, const int & INFO);
}

See compile error here: https://civet.inl.gov/job/2140682/

Compiling C++ (in opt mode) /data/civet0/build/blackbear/moose/framework/build/unity_src/distributions_Unity.C...
In file included from /data/civet0/build/blackbear/contrib/neml/include/math/rotations.h:5,
                 from /data/civet0/build/blackbear/contrib/neml/include/elasticity.h:7,
                 from /data/civet0/build/blackbear/contrib/neml/include/models.h:5,
                 from /data/civet0/build/blackbear/contrib/neml/include/parse.h:5,
                 from /data/civet0/build/blackbear/moose/framework/src/utils/InputParameters.C:24,
                 from /data/civet0/build/blackbear/moose/framework/build/unity_src/utils_Unity.C:28:
/data/civet0/build/blackbear/contrib/neml/include/math/nemlmath.h:19:8: error: conflicting declaration of C function 'void dgetrf_(const int&, const int&, double*, const int&, int*, int&)'
   19 |   void dgetrf_(const int & m, const int & n, double* A, const int & lda, int* ipiv, int & info);
      |        ^~~~~~~
In file included from /opt/petsc/include/petscblaslapack.h:72,
                 from /data/civet0/build/blackbear/moose/framework/src/utils/ColumnMajorMatrix.C:19,
                 from /data/civet0/build/blackbear/moose/framework/build/unity_src/utils_Unity.C:9:
/opt/petsc/include/petscblaslapack_mangle.h:53:47: note: previous declaration 'void dgetrf_(const PetscBLASInt*, const PetscBLASInt*, PetscReal*, const PetscBLASInt*, PetscBLASInt*, PetscBLASInt*)'

Ping @bwspenc

@bwspenc
Copy link
Contributor

bwspenc commented Mar 27, 2024

This must be something that just cropped up, right? What changed?

@reverendbedford
Copy link
Collaborator

reverendbedford commented Mar 27, 2024 via email

@bwspenc
Copy link
Contributor

bwspenc commented Apr 16, 2024

It turns out that this was due to a MOOSE change that added a #include "parse.h" to pull in the framework/contrib/hit/parse.h file, which has the same name as neml/include/parse.h. That was fixed yesterday, and blackbear builds again.

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