00001
00002
00003
00004
00005
00006
00007
00008 #include "adio.h"
00009 #include "mpio.h"
00010
00011
00012 #if defined(MPIO_BUILD_PROFILING) || defined(HAVE_WEAK_SYMBOLS)
00013
00014 #if defined(HAVE_WEAK_SYMBOLS)
00015 #if defined(HAVE_PRAGMA_WEAK)
00016 #if defined(FORTRANCAPS)
00017 extern FORTRAN_API void FORT_CALL MPI_TYPE_CREATE_SUBARRAY(MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *);
00018 #pragma weak MPI_TYPE_CREATE_SUBARRAY = PMPI_TYPE_CREATE_SUBARRAY
00019 #elif defined(FORTRANDOUBLEUNDERSCORE)
00020 extern FORTRAN_API void FORT_CALL mpi_type_create_subarray__(MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *);
00021 #pragma weak mpi_type_create_subarray__ = pmpi_type_create_subarray__
00022 #elif !defined(FORTRANUNDERSCORE)
00023 extern FORTRAN_API void FORT_CALL mpi_type_create_subarray(MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *);
00024 #pragma weak mpi_type_create_subarray = pmpi_type_create_subarray
00025 #else
00026 extern FORTRAN_API void FORT_CALL mpi_type_create_subarray_(MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *);
00027 #pragma weak mpi_type_create_subarray_ = pmpi_type_create_subarray_
00028 #endif
00029
00030 #elif defined(HAVE_PRAGMA_HP_SEC_DEF)
00031 #if defined(FORTRANCAPS)
00032 #pragma _HP_SECONDARY_DEF PMPI_TYPE_CREATE_SUBARRAY MPI_TYPE_CREATE_SUBARRAY
00033 #elif defined(FORTRANDOUBLEUNDERSCORE)
00034 #pragma _HP_SECONDARY_DEF pmpi_type_create_subarray__ mpi_type_create_subarray__
00035 #elif !defined(FORTRANUNDERSCORE)
00036 #pragma _HP_SECONDARY_DEF pmpi_type_create_subarray mpi_type_create_subarray
00037 #else
00038 #pragma _HP_SECONDARY_DEF pmpi_type_create_subarray_ mpi_type_create_subarray_
00039 #endif
00040
00041 #elif defined(HAVE_PRAGMA_CRI_DUP)
00042 #if defined(FORTRANCAPS)
00043 #pragma _CRI duplicate MPI_TYPE_CREATE_SUBARRAY as PMPI_TYPE_CREATE_SUBARRAY
00044 #elif defined(FORTRANDOUBLEUNDERSCORE)
00045 #pragma _CRI duplicate mpi_type_create_subarray__ as pmpi_type_create_subarray__
00046 #elif !defined(FORTRANUNDERSCORE)
00047 #pragma _CRI duplicate mpi_type_create_subarray as pmpi_type_create_subarray
00048 #else
00049 #pragma _CRI duplicate mpi_type_create_subarray_ as pmpi_type_create_subarray_
00050 #endif
00051
00052
00053 #endif
00054
00055 #include "mpioprof.h"
00056 #endif
00057
00058 #ifdef FORTRANCAPS
00059 #define mpi_type_create_subarray_ PMPI_TYPE_CREATE_SUBARRAY
00060 #elif defined(FORTRANDOUBLEUNDERSCORE)
00061 #define mpi_type_create_subarray_ pmpi_type_create_subarray__
00062 #elif !defined(FORTRANUNDERSCORE)
00063 #if defined(HPUX) || defined(SPPUX)
00064 #pragma _HP_SECONDARY_DEF pmpi_type_create_subarray pmpi_type_create_subarray_
00065 #endif
00066 #define mpi_type_create_subarray_ pmpi_type_create_subarray
00067 #else
00068 #if defined(HPUX) || defined(SPPUX)
00069 #pragma _HP_SECONDARY_DEF pmpi_type_create_subarray_ pmpi_type_create_subarray
00070 #endif
00071 #define mpi_type_create_subarray_ pmpi_type_create_subarray_
00072 #endif
00073
00074 #else
00075
00076 #ifdef FORTRANCAPS
00077 #define mpi_type_create_subarray_ MPI_TYPE_CREATE_SUBARRAY
00078 #elif defined(FORTRANDOUBLEUNDERSCORE)
00079 #define mpi_type_create_subarray_ mpi_type_create_subarray__
00080 #elif !defined(FORTRANUNDERSCORE)
00081 #if defined(HPUX) || defined(SPPUX)
00082 #pragma _HP_SECONDARY_DEF mpi_type_create_subarray mpi_type_create_subarray_
00083 #endif
00084 #define mpi_type_create_subarray_ mpi_type_create_subarray
00085 #else
00086 #if defined(HPUX) || defined(SPPUX)
00087 #pragma _HP_SECONDARY_DEF mpi_type_create_subarray_ mpi_type_create_subarray
00088 #endif
00089 #endif
00090 #endif
00091
00092 #ifdef MPIHP
00093
00094 void mpi_type_create_subarray_(int *ndims,int *array_of_sizes,
00095 int *array_of_subsizes,int *array_of_starts,
00096 int *order,MPI_Fint *oldtype,
00097 MPI_Fint *newtype, int *ierr );
00098
00099 void mpi_type_create_subarray_(int *ndims,int *array_of_sizes,
00100 int *array_of_subsizes,int *array_of_starts,
00101 int *order,MPI_Fint *oldtype,
00102 MPI_Fint *newtype, int *ierr )
00103 {
00104 MPI_Datatype oldtype_c, newtype_c;
00105
00106 oldtype_c = MPI_Type_f2c(*oldtype);
00107
00108 *ierr = MPI_Type_create_subarray(*ndims,array_of_sizes,array_of_subsizes,array_of_starts,*order,oldtype_c,&newtype_c);
00109 *newtype = MPI_Type_c2f(newtype_c);
00110 }
00111
00112 #else
00113
00114
00115 FORTRAN_API void FORT_CALL mpi_type_create_subarray_(MPI_Fint *ndims,MPI_Fint *array_of_sizes,
00116 MPI_Fint *array_of_subsizes,MPI_Fint *array_of_starts,
00117 MPI_Fint *order,MPI_Fint *oldtype,
00118 MPI_Fint *newtype, MPI_Fint *ierr );
00119
00120 FORTRAN_API void FORT_CALL mpi_type_create_subarray_(MPI_Fint *ndims,MPI_Fint *array_of_sizes,
00121 MPI_Fint *array_of_subsizes,MPI_Fint *array_of_starts,
00122 MPI_Fint *order,MPI_Fint *oldtype,
00123 MPI_Fint *newtype, MPI_Fint *ierr )
00124 {
00125 *ierr = MPI_Type_create_subarray(*ndims,array_of_sizes,array_of_subsizes,array_of_starts,*order,*oldtype,newtype);
00126 }
00127 #endif