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