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