Skip to content

Compilation error with openblas #296

@mariavd

Description

@mariavd

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions