Quantcast
Channel: Clusters and HPC Technology
Viewing all articles
Browse latest Browse all 927

MPI_ISend bug on Fortran allocatable character

$
0
0

I am encountering what I believe to be a bug associated with allocatable character arrays and MPI_ISend. Sending allocatable character array with MPI_ISend and receiving with MPI_Recv returns junk. See test program below, compiled with -assume realloc_lhs. Same code with GNU compiler and OpenMPI receives and prints the expected result. Are there any other compiler flags that I should be working with that would influence compiler behavior here? Statically declaring the send string produces the expected result. This is commented out in the example below.

Intel Fortran Linux 17.0.1 20161005
Intel MPI Linux 5.1.3

program main
    use mpi_f08
    implicit none

    integer                      :: ierr
    !character(11)               :: send_char
    character(:),   allocatable  :: send_char
    character(11)                :: recv_char
    type(mpi_request)            :: handle

    call MPI_Init(ierr)

    send_char = 'test string'

    call MPI_ISend(send_char,11,MPI_CHARACTER,0,0,MPI_COMM_WORLD,handle,ierr)
    call MPI_Recv(recv_char, 11,MPI_CHARACTER,0,0,MPI_COMM_WORLD,MPI_STATUS_IGNORE,ierr)
    call MPI_Wait(handle,MPI_STATUS_IGNORE,ierr)

    print*, recv_char

end program main

Thread Topic: 

Bug Report

Viewing all articles
Browse latest Browse all 927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>