sfilippone/psblas3

Error: Type mismatch between actual argument at (1) and actual argument at (2) (LOGICAL(4)/CHARACTER(*))

Closed this issue · 3 comments

Build fails with:

/opt/local/bin/mpif90-mpich-gcc12   -I../ -I. -I. -DHAVE_AMD -DHAVE_LAPACK -DHAVE_FLUSH_STMT -DOPENMP -DLPK8 -DIPK4 -DMPI_MOD  -pipe -Os -m32 -fopenmp  -c penv/psi_penv_mod.F90 -o penv/psi_penv_mod.o
penv/psi_penv_mod.F90:644:19:

  644 |     call mpi_isend(node%logbuf,size(node%logbuf),mpi_logical,&
      |                   1
......
  682 |     call mpi_isend(node%charbuf,size(node%charbuf),mpi_character,&
      |                   2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (LOGICAL(4)/CHARACTER(*)).
penv/psi_penv_mod.F90:606:19:

  606 |     call mpi_isend(node%dcomplbuf,size(node%dcomplbuf),psb_mpi_c_dpk_,&
      |                   1
......
  682 |     call mpi_isend(node%charbuf,size(node%charbuf),mpi_character,&
      |                   2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/CHARACTER(*)).
penv/psi_penv_mod.F90:569:19:

  569 |     call mpi_isend(node%complexbuf,size(node%complexbuf),psb_mpi_c_spk_,&
      |                   1
......
  682 |     call mpi_isend(node%charbuf,size(node%charbuf),mpi_character,&
      |                   2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(4)/CHARACTER(*)).
penv/psi_penv_mod.F90:532:19:

  532 |     call mpi_isend(node%doublebuf,size(node%doublebuf),psb_mpi_r_dpk_,&
      |                   1
......
  682 |     call mpi_isend(node%charbuf,size(node%charbuf),mpi_character,&
      |                   2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/CHARACTER(*)).
penv/psi_penv_mod.F90:495:19:

  495 |     call mpi_isend(node%realbuf,size(node%realbuf),psb_mpi_r_spk_,&
      |                   1
......
  682 |     call mpi_isend(node%charbuf,size(node%charbuf),mpi_character,&
      |                   2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/CHARACTER(*)).
penv/psi_penv_mod.F90:458:19:

  458 |     call mpi_isend(node%int2buf,size(node%int2buf),psb_mpi_i2pk_,&
      |                   1
......
  682 |     call mpi_isend(node%charbuf,size(node%charbuf),mpi_character,&
      |                   2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(2)/CHARACTER(*)).
penv/psi_penv_mod.F90:421:19:

  421 |     call mpi_isend(node%int8buf,size(node%int8buf),psb_mpi_epk_,&
      |                   1
......
  682 |     call mpi_isend(node%charbuf,size(node%charbuf),mpi_character,&
      |                   2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(8)/CHARACTER(*)).
penv/psi_penv_mod.F90:382:19:

  382 |     call mpi_isend(node%int4buf,size(node%int4buf),psb_mpi_mpk_,&
      |                   1
......
  682 |     call mpi_isend(node%charbuf,size(node%charbuf),mpi_character,&
      |                   2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/CHARACTER(*)).
make[2]: *** [penv/psi_penv_mod.o] Error 1

We can probably handle this locally in Macports, but perhaps worth fixing? There is a flag for this, -fallow-argument-mismatch.

Sorry for the delay.
Yes, -fallow-argument-mismatch is the one to use; I have modified the configure script in the development branch to include the option automatically on recent GNU releases; can you test it works for y ou?
Obviously the true solution would be to switch to the MPIF08 module, and I have the basics in place for version 4, but some combinations of MPI/base compiler are tricky.
Hope this helps

@sfilippone Thank you for responding. Yes, that flag works. We have added it in Macports via:

https://github.com/macports/macports-ports/blob/149027944f2a14321930ae7bfded5430d78142a1/math/psblas3/Portfile#L45-L46

Once psblas3 switches to a better solution, we will drop that from the portfile.

As I mentioned, my plan is to switch to MPIF08 with PSBLAS4; to do that, I am waiting for some compiler behaviour to be fixed.
Thanks.