MPI Forum Meetings logo

MPI Forum: mpi3-fortran Mailing List Archives

all MPI Forum: mpi3-fortran mailing list

Subject: [MPI3 Fortran] Start discussing new Fortran binding
From: Craig E. Rasmussen (rasmussn_at_[hidden])
Date: 2008-02-13 17:07:10


I propose that we have a phone call next week sometime to begin to discuss
potential new Fortran bindings. I have put some ideas on the wiki as a
starting point for discussion (text copied below). I'll add more in the
next couple of days.

Cheers,
Craig

------------------

! import C interop and MPI interfaces

    use, intrinsic :: ISO_C_BINDING
    use :: MPI_C_BINDING ! this needs to be given a name

    integer(C_INT) :: rank, size, err ! this module needs to be
given a size (C_INT here)

! I think we should provide better interfaces to command line arguments.
! It can be done through GET_COMMAND and GET_COMMAND_ARGUMENT.
! MPI_Init should be able to pass back something like modified C argc and
argv arguments.

    err = MPI_Init()

! We need to figure out the type of MPI handles.
! Currently I'm leaning toward TYPE(C_PTR) rather than
! the INTEGER(MPI_HANDLE_KIND) Jeff and I used in our paper.

    err = MPI_Comm_rank(MPI_COMM_WORLD, rank)
    err = MPI_Comm_size(MPI_COMM_WORLD, size)

    err = MPI_Finalize()