|
Packit Service |
c5cf8c |
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
|
|
Packit Service |
c5cf8c |
/*
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
* Copyright (C) 1997 University of Chicago.
|
|
Packit Service |
c5cf8c |
* See COPYRIGHT notice in top-level directory.
|
|
Packit Service |
c5cf8c |
*/
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#include "mpioimpl.h"
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#ifdef HAVE_WEAK_SYMBOLS
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#if defined(HAVE_PRAGMA_WEAK)
|
|
Packit Service |
c5cf8c |
#pragma weak MPIO_Request_f2c = PMPIO_Request_f2c
|
|
Packit Service |
c5cf8c |
#elif defined(HAVE_PRAGMA_HP_SEC_DEF)
|
|
Packit Service |
c5cf8c |
#pragma _HP_SECONDARY_DEF PMPIO_Request_f2c MPIO_Request_f2c
|
|
Packit Service |
c5cf8c |
#elif defined(HAVE_PRAGMA_CRI_DUP)
|
|
Packit Service |
c5cf8c |
#pragma _CRI duplicate MPIO_Request_f2c as PMPIO_Request_f2c
|
|
Packit Service |
c5cf8c |
/* end of weak pragmas */
|
|
Packit Service |
c5cf8c |
#endif
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* Include mapping from MPI->PMPI */
|
|
Packit Service |
c5cf8c |
#define MPIO_BUILD_PROFILING
|
|
Packit Service |
c5cf8c |
#include "mpioprof.h"
|
|
Packit Service |
c5cf8c |
#endif
|
|
Packit Service |
c5cf8c |
#include "adio_extern.h"
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/*@
|
|
Packit Service |
c5cf8c |
MPIO_Request_f2c - Translates a Fortran I/O-request handle to
|
|
Packit Service |
c5cf8c |
a C I/O-request handle
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
Input Parameters:
|
|
Packit Service |
c5cf8c |
. request - Fortran I/O-request handle (integer)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
Return Value:
|
|
Packit Service |
c5cf8c |
C I/O-request handle (handle)
|
|
Packit Service |
c5cf8c |
@*/
|
|
Packit Service |
c5cf8c |
#ifdef HAVE_MPI_GREQUEST
|
|
Packit Service |
c5cf8c |
MPIO_Request MPIO_Request_f2c(MPI_Fint request)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
return ((MPIO_Request) request);
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
#else
|
|
Packit Service |
c5cf8c |
MPIO_Request MPIO_Request_f2c(MPI_Fint request)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int error_code;
|
|
Packit Service |
c5cf8c |
static char myname[] = "MPIO_REQUEST_F2C";
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#ifndef INT_LT_POINTER
|
|
Packit Service |
c5cf8c |
return (MPIO_Request) request;
|
|
Packit Service |
c5cf8c |
#else
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
ROMIO_THREAD_CS_ENTER();
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if (!request) {
|
|
Packit Service |
c5cf8c |
return MPIO_REQUEST_NULL;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
/* --BEGIN ERROR HANDLING-- */
|
|
Packit Service |
c5cf8c |
if ((request < 0) || (request > ADIOI_Reqtable_ptr)) {
|
|
Packit Service |
c5cf8c |
error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
|
|
Packit Service |
c5cf8c |
myname, __LINE__, MPI_ERR_REQUEST, "**request", 0);
|
|
Packit Service |
c5cf8c |
error_code = MPIO_Err_return_file(MPI_FILE_NULL, error_code);
|
|
Packit Service |
c5cf8c |
return MPIO_REQUEST_NULL;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
/* --END ERROR HANDLING-- */
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
ROMIO_THREAD_CS_EXIT();
|
|
Packit Service |
c5cf8c |
return ADIOI_Reqtable[request];
|
|
Packit Service |
c5cf8c |
#endif
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
#endif
|