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

Compilation error with openblas #296

Open
mariavd opened this issue Feb 10, 2023 · 1 comment
Open

Compilation error with openblas #296

mariavd opened this issue Feb 10, 2023 · 1 comment
Assignees

Comments

@mariavd
Copy link
Contributor

mariavd commented Feb 10, 2023

I noticed a compilation problem when using openblas-0.3.20-gcc-11.2.1-a3n26so (on Alma Linux) but I don't have the time to investigate further. I am copying the output in case somebody else gets stuck. My workaround was to continue without blas because the problematic functions are defined differently with/without it.

[ 59%] Building Fortran object src/libgimic/CMakeFiles/gimic2.dir/jtensor.F90.o
/opt/gimic/20230210/src/libgimic/jtensor.F90:197:55:

  165 |         diapam = ddot(vec_size, this%denbf, 1, this%bfvec, 1)
      |                                               2
......
  197 |                 prsp1 = -ddot(vec_size, this%dendb, 1, this%drvec(1, m), 1)
      |                                                       1
Error: Element of assumed-shape or pointer array as actual argument at (1) cannot correspond to actual argument at (2)
/opt/gimic/20230210/src/libgimic/jtensor.F90:198:54:

  165 |         diapam = ddot(vec_size, this%denbf, 1, this%bfvec, 1)
      |                                               2
......
  198 |                 prsp2 = ddot(vec_size, this%denbf, 1, this%d2fvec(1, k), 1)
      |                                                      1
Error: Element of assumed-shape or pointer array as actual argument at (1) cannot correspond to actual argument at (2)
/opt/gimic/20230210/src/libgimic/jtensor.F90:205:49:

  165 |         diapam = ddot(vec_size, this%denbf, 1, this%bfvec, 1)
      |                                               2
......
  205 |               ppd = ddot(vec_size, this%pdbf, 1, this%drvec(1, m), 1)
      |                                                 1
Error: Element of assumed-shape or pointer array as actual argument at (1) cannot correspond to actual argument at (2)
make[2]: *** [src/libgimic/CMakeFiles/gimic2.dir/build.make:194: src/libgimic/CMakeFiles/gimic2.dir/jtensor.F90.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:241: src/libgimic/CMakeFiles/gimic2.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

The first of the problematic functions where the tensor is contracted looks like this

#ifdef HAVE_BLAS
        vec_size = size(this%bfvec)
        call dgemv('n', vec_size, vec_size, 1.0d0, this%aodens, vec_size, this%bfvec, 1, 0.0d0, this%denbf, 1)
        diapam = ddot(vec_size, this%denbf, 1, this%bfvec, 1)
#else
        this%denbf=matmul(this%bfvec, this%aodens)
        diapam=dot_product(this%denbf, this%bfvec)
#endif

Googling hints that an array element might be passed but then inside the subroutine, there is an attempt to access the whole array. Sadly, I don't have time to take care of it.

@heikef
Copy link
Contributor

heikef commented Jun 10, 2023

Assigning @bast hope this is OK for you. Perhaps this is related to the other problems we face....

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