1! -*- f90 -*- 2! 3! Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved. 4! Copyright (c) 2009-2012 Los Alamos National Security, LLC. 5! All Rights reserved. 6! $COPYRIGHT$ 7 8#include "ompi/mpi/fortran/configure-fortran-output.h" 9 10subroutine MPI_File_create_errhandler_f08(file_errhandler_fn,errhandler,ierror) 11 use, intrinsic :: iso_c_binding, only: c_funptr, c_funloc 12 use :: mpi_f08_types, only : MPI_Errhandler 13 use :: mpi_f08_interfaces_callbacks, only : MPI_File_errhandler_function 14 use :: mpi_f08, only : ompi_file_create_errhandler_f 15 implicit none 16 PROCEDURE(MPI_File_errhandler_function) :: file_errhandler_fn 17 TYPE(MPI_Errhandler), INTENT(OUT) :: errhandler 18 INTEGER, OPTIONAL, INTENT(OUT) :: ierror 19 integer :: c_ierror 20 type(c_funptr) :: fn 21 22 fn = c_funloc(file_errhandler_fn) 23 call ompi_file_create_errhandler_f(fn,errhandler%MPI_VAL,c_ierror) 24 if (present(ierror)) ierror = c_ierror 25 26end subroutine MPI_File_create_errhandler_f08 27