Changeset 5682

Show
Ignore:
Timestamp:
11/04/09 11:05:15 (3 weeks ago)
Author:
jayesh
Message:

1) Adding manually defined types and types defined from other types into the dictionary so that routines defining fortran types can use them. (2) Also added sanity checks when defining types from other types - Without the fix, types unavailable in the type dictionary where defined to be 0 in fortran/fortran90. This fixes ticket 922

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • mpich2/trunk/winconfigure.wsf

    r5633 r5682  
    662662        'missing_datatypes = missing_datatypes & "MPI_WCHAR_T" & vbCrLf 
    663663        'MPI_WCHAR_T           = "0x" + mpi_datatype_prefix + len_wchar_t     + "0e" 
    664         MPI_WCHAR_T = dtypes.Item("MPI_WCHAR") 
     664        if dtypes.Exists("MPI_WCHAR") then 
     665            MPI_WCHAR_T = dtypes.Item("MPI_WCHAR") 
     666            dtypes.Add "MPI_WCHAR_T", MPI_WCHAR_T 
     667        else 
     668            missing_datatypes = missing_datatypes & "MPI_WCHAR_T" & vbCrLf 
     669            MPI_WCHAR_T       = "0x" + mpi_datatype_prefix + len_wchar       + "0e" 
     670        end if 
    665671end if 
    666672if dtypes.Exists("MPI_SHORT") then 
     
    693699        'missing_datatypes = missing_datatypes & "MPI_UNSIGNED" & vbCrLf 
    694700        'MPI_UNSIGNED          = "0x" + mpi_datatype_prefix + len_int         + "06" 
    695         MPI_UNSIGNED = dtypes.Item("MPI_UNSIGNED_INT") 
     701        if dtypes.Exists("MPI_UNSIGNED_INT") then 
     702            MPI_UNSIGNED = dtypes.Item("MPI_UNSIGNED_INT") 
     703            dtypes.Add "MPI_UNSIGNED", MPI_UNSIGNED 
     704        else 
     705            missing_datatypes = missing_datatypes & "MPI_UNSIGNED" & vbCrLf 
     706            MPI_UNSIGNED      = "0x" + mpi_datatype_prefix + len_int         + "06" 
     707        end if 
    696708end if 
    697709if dtypes.Exists("MPI_LONG") then 
     
    718730        'missing_datatypes = missing_datatypes & "MPI_LONG_LONG_INT" & vbCrLf 
    719731        'MPI_LONG_LONG_INT     = "0x" + mpi_datatype_prefix + len_long_long   + "09" 
    720         MPI_LONG_LONG_INT = dtypes.Item("MPI_LONG_LONG") 
     732        if dtypes.Exists("MPI_LONG_LONG") then 
     733            MPI_LONG_LONG_INT = dtypes.Item("MPI_LONG_LONG") 
     734            dtypes.Add "MPI_LONG_LONG_INT", MPI_LONG_LONG_INT 
     735        else 
     736            missing_datatypes = missing_datatypes & "MPI_LONG_LONG_INT" & vbCrLf 
     737            MPI_LONG_LONG_INT = "0x" + mpi_datatype_prefix + len_long_long   + "09" 
     738        end if 
    721739end if 
    722740if dtypes.Exists("MPI_UNSIGNED_LONG_LONG") then 
     
    834852        'MPI_FLOAT_INT         = "0x" + mpi_datatype_prefix + len_float_int       + "12" 
    835853        MPI_FLOAT_INT         = "0x8c000000" 
     854        dtypes.Add "MPI_FLOAT_INT", MPI_FLOAT_INT 
    836855end if 
    837856if dtypes.Exists("MPI_DOUBLE_INT") then 
     
    841860        'MPI_DOUBLE_INT        = "0x" + mpi_datatype_prefix + len_double_int      + "13" 
    842861        MPI_DOUBLE_INT        = "0x8c000001" 
     862        dtypes.Add "MPI_DOUBLE_INT", MPI_DOUBLE_INT 
    843863end if 
    844864if dtypes.Exists("MPI_LONG_INT") then 
     
    848868        'MPI_LONG_INT          = "0x" + mpi_datatype_prefix + len_long_int        + "14" 
    849869        MPI_LONG_INT          = "0x8c000002" 
     870        dtypes.Add "MPI_LONG_INT", MPI_LONG_INT 
    850871end if 
    851872if dtypes.Exists("MPI_SHORT_INT") then 
     
    855876        'MPI_SHORT_INT         = "0x" + mpi_datatype_prefix + len_short_int       + "15" 
    856877        MPI_SHORT_INT         = "0x8c000003" 
     878        dtypes.Add "MPI_SHORT_INT", MPI_SHORT_INT 
    857879end if 
    858880if dtypes.Exists("MPI_2INT") then 
     
    868890        'MPI_LONG_DOUBLE_INT   = "0x" + mpi_datatype_prefix + len_long_double_int + "17" 
    869891        MPI_LONG_DOUBLE_INT   = "0x8c000004" 
     892        dtypes.Add "MPI_LONG_DOUBLE_INT", MPI_LONG_DOUBLE_INT 
    870893end if 
    871894if dtypes.Exists("MPI_CHARACTER") then 
     
    10311054    MPI_C_FLOAT_COMPLEX = "0x" + mpi_datatype_prefix + len_float__Complex + "40" 
    10321055end if 
     1056if dtypes.Exists("MPI_C_COMPLEX") then 
     1057    MPI_C_COMPLEX = dtypes.Item("MPI_C_COMPLEX") 
     1058else 
     1059    if dtypes.Exists("MPI_C_FLOAT_COMPLEX") then 
     1060        MPI_C_COMPLEX = dtypes.Item("MPI_C_FLOAT_COMPLEX") 
     1061        dtypes.Add "MPI_C_COMPLEX", MPI_C_COMPLEX 
     1062    else 
     1063        missing_datatypes = missing_datatypes & "MPI_C_COMPLEX" & vbCrLf 
     1064        MPI_C_COMPLEX = "0x" + mpi_datatype_prefix + len_float__Complex + "40" 
     1065    end if 
     1066end if 
    10331067if dtypes.Exists("MPI_C_DOUBLE_COMPLEX") then 
    10341068    MPI_C_DOUBLE_COMPLEX = dtypes.Item("MPI_C_DOUBLE_COMPLEX") 
     
    10501084    MPI_AINT_W32 = "0x" + mpi_datatype_prefix + len_mpi_aint32 + "43" 
    10511085end if 
     1086dtypes.Add "MPI_AINT_W32", MPI_AINT_W32 
     1087 
    10521088if dtypes64.Exists("MPI_AINT_DATATYPE") then 
    10531089    MPI_AINT_W64 = dtypes64.Item("MPI_AINT_DATATYPE") 
     
    10561092    MPI_AINT_W64 = "0x" + mpi_datatype_prefix + len_mpi_aint64 + "43" 
    10571093end if 
     1094dtypes64.Add "MPI_AINT_W64", MPI_AINT_W64 
     1095 
    10581096' Note that in configure.in MPI_OFFSET is named as MPI_OFFSET_DATATYPE - due to name collision 
    10591097if dtypes.Exists("MPI_OFFSET_DATATYPE") then 
     
    10631101    MPI_OFFSET_W64 = "0x" + mpi_datatype_prefix + len_mpi_offset + "44" 
    10641102end if 
     1103dtypes.Add "MPI_OFFSET_W64", MPI_OFFSET_W64 
     1104dtypes64.Add "MPI_OFFSET_W64", MPI_OFFSET_W64 
    10651105 
    10661106 
     
    11741214F77_C_DOUBLE_COMPLEX    = HexToInt(dtypes.Item("MPI_C_DOUBLE_COMPLEX")) 
    11751215F77_C_LONG_DOUBLE_COMPLEX      = HexToInt(dtypes.Item("MPI_C_LONG_DOUBLE_COMPLEX")) 
    1176 F77_AINT                = HexToInt(dtypes.Item("MPI_AINT")) 
    1177 F77_OFFSET              = HexToInt(dtypes.Item("MPI_OFFSET")) 
     1216F77_AINT_W32                = HexToInt(dtypes.Item("MPI_AINT_W32")) 
     1217F77_AINT_W64                = HexToInt(dtypes64.Item("MPI_AINT_W64")) 
     1218F77_OFFSET_W64              = HexToInt(dtypes.Item("MPI_OFFSET_W64")) 
    11781219 
    11791220if false then 
     
    19011942                                str = Replace(str, "@MPI_F77_C_LONG_DOUBLE_COMPLEX@", F77_C_LONG_DOUBLE_COMPLEX) 
    19021943                        Case "@MPI_F77_AINT@" 
    1903                                 str = Replace(str, "@MPI_F77_AINT@", F77_AINT) 
     1944                                If b64 Then 
     1945                                    str = Replace(str, "@MPI_F77_AINT@", F77_AINT_W64) 
     1946                                Else 
     1947                                    str = Replace(str, "@MPI_F77_AINT@", F77_AINT_W32) 
     1948                                End If 
    19041949                        Case "@MPI_F77_OFFSET@" 
    1905                                 str = Replace(str, "@MPI_F77_OFFSET@", F77_OFFSET) 
     1950                                str = Replace(str, "@MPI_F77_OFFSET@", F77_OFFSET_W64) 
    19061951                        Case "@MPI_STATUS_SIZE@" 
    19071952                                str = Replace(str, "@MPI_STATUS_SIZE@", "5")