0
私はFortranでMPIを使い、配列から散布を試みています。これはコードです:'mpi_scatter'の特定のサブルーチンがありません
program test_scatter
use mpi
implicit none
integer :: ierr, rank, size, comm, i, j
integer, parameter :: dim = 5, dim_nodos = 4
real, dimension(dim, dim) :: panel_pos
real, dimension(dim_nodos) :: nodos
real :: rev_buf
forall(i = 1:dim_nodos) nodos(i) = i
comm = MPI_COMM_WORLD
call MPI_INIT(ierr)
call MPI_COMM_SIZE(comm, size, ierr)
call MPI_COMM_RANK(comm, rank, ierr)
call MPI_Bcast(panel_pos, dim*dim, MPI_REAL, 1, comm, ierr)
call MPI_Scatter(nodos, 1, MPI_REAL, rev_buf, 1, 1, comm, ierr)
print *, panel_pos, 'from rank', rank
! Finalizar MPI
call MPI_FINALIZE(ierr)
end program test_scatter
私が使用してコンパイルしよう:
mpif90 test_scatter.F90 -o test_scatter.e
をしかし、私はこのエラーを取得する:
call MPI_Scatter(nodos, 1, MPI_REAL, rev_buf, 1, 1, comm, ierr) 1 Error: There is no specific subroutine for the generic ‘mpi_scatter’ at (1)
私はDebianのテストを持っています。システムは最新です。私はOpenMPIを次のようにインストールします:
$ sudo apt-get install openmpi-bin openmpi-common openmpi-doc libopenmpi-dev
どうしましたか?
をあなたのタイトルはおそらく誤理解を示唆するように、それは「何のサブルーチン」ではないではありません、それは「何_specific_ませんサブルーチン"。特に、あなたはrecieptで型を与えていないようです。あなたの文書を慎重にチェックしてください。 – francescalus
受信したデータの種類を忘れてしまっただけです。あなたの呼び出しは '' MPI_Scatter(nodos、1、MPI_REAL、rev_buf、1、MPI_REAL、1、comm、ierr) 'を呼び出すべきです(NBは追加の' MPI_REAL') – Gilles