猿代码 — 科研/AI模型/高性能计算
0

Error: Type mismatch between actual argument at (1) and actual argument

摘要: 1)问题call mpi_irecv( cellDatas(1,ibegg), 1, newType(ic), iobj, itag, mpi_comm_world, requests(ic), ierror) | 2Error: Type mismatch between actual argument at (1) and actual argument at (2 ...
1)问题
call mpi_irecv( cellDatas(1,ibegg), 1, newType(ic), iobj, itag, mpi_comm_world, requests(ic), ierror)
      |                      2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/INTEGER(4)).

2)问题分析
MPI_Irecv(Cin, 1, MPI_INT, my_rank - 1, 0, MPI_COMM_WORLD, &recv_request);

cellDatas是real, newType是整型。

  real, intent(inout) :: cellDatas(:,:)


  integer, allocatable :: newType(:), requests(:), statuses(:,:)

3)
int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
              MPI_Comm comm, MPI_Request *request)
int MPI_Irecv_c(void *buf, MPI_Count count, MPI_Datatype datatype, int source,
                int tag, MPI_Comm comm, MPI_Request *request)
4)

newType(ic)可能是单精度,也可能是双精度。做了这样一个区分。

5)
还报错
   93 |       call mpi_irecv(cellDatas(1,ibegg), 1, mpi_realType, iobj, itag, mpi_comm_world, requests(ic), ierror)
      |                     1
......
  187 |       call mpi_irecv(cellDatas(1,ibegg), 1, mpi_realType, iobj, itag, mpi_comm_world, requests(ic), ierror)
      |                     2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/INTEGER(4)).


6)

 gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/9/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)


这个版本没有问题。

7)换版本








说点什么...

已有0条评论

最新评论...

本文作者
2024-1-24 17:08
  • 0
    粉丝
  • 320
    阅读
  • 0
    回复
资讯幻灯片
热门评论
热门专题
排行榜
Copyright   ©2015-2023   猿代码-超算人才智造局 高性能计算|并行计算|人工智能      ( 京ICP备2021026424号-2 )