Changeset 3650


Ignore:
Timestamp:
05/03/10 15:11:40 (15 years ago)
Author:
jschierm
Message:

Scotch: implement gpart functionality and reset more static variables.

Location:
issm/trunk/externalpackages/scotch
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/externalpackages/scotch/gmap_mex.c

    r3648 r3650  
    1919
    2020void GmapUsage( void );
    21 
    22 
    23 /* Input Arguments */
    24 
    25 #define ADJMAT_IN  prhs[0]
    26 #define VERTLB_IN  prhs[1]
    27 #define VERTWT_IN  prhs[2]
    28 #define EDGEWT_IN  prhs[3]
    29 #define ARCHTYP_IN prhs[4]
    30 #define ARCHPAR_IN prhs[5]
    31 #define REQ_ARGS     6
    32 
    33 /* Output Arguments */
    34 
    35 #define MAPTAB_OUT plhs[0]
    3621
    3722
     
    7358        int     (*maptabi)[2]=NULL;
    7459        double* maptabd=NULL;
    75         int     i,j,k,ierr;
     60        int     i,j,k,imi=0,imo=0,isi=0,ierr;
    7661
    7762        /* Check for proper number of arguments */
     
    8974        and in the x-layer is inefficient, but it makes the x-layer more general)  */
    9075
    91         if (!mxIsNumeric(ADJMAT_IN) || (!mxIsEmpty(ADJMAT_IN) && !mxIsSparse(ADJMAT_IN))) {
     76        argvm = (char **) calloc(nrhs,sizeof(char *));
     77
     78        if (!(mxIsNumeric(prhs[imi]) &&
     79                  (mxGetM(prhs[imi]) == 1 && mxGetN(prhs[imi]) == 1))) {
     80                argvm[isi] = (char *) calloc(4+1,sizeof(char));
     81                strcpy(argvm[isi],"gmap");
     82                mexPrintf("%s -- Using \"%s\" entry point.\n",
     83                                  THISFUNCTION,argvm[isi]);
     84                isi++;
     85        }
     86        else {
     87                argvm[isi] = (char *) calloc(5+1,sizeof(char));
     88                strcpy(argvm[isi],"gpart");
     89                mexPrintf("%s -- Using \"%s\" entry point.\n",
     90                                  THISFUNCTION,argvm[isi]);
     91                isi++;
     92
     93                argvm[isi] = (char *) calloc(17,sizeof(char));
     94                sprintf(argvm[isi],"%d",(int)mxGetScalar(prhs[imi]));
     95                mexPrintf("%s -- Number of parts is %s.\n",
     96                                  THISFUNCTION,argvm[isi]);
     97                isi++;
     98                imi++;
     99        }
     100
     101        if (!mxIsNumeric(prhs[imi]) || (!mxIsEmpty(prhs[imi]) && !mxIsSparse(prhs[imi]))) {
    92102                mexPrintf("%s -- Adjacency matrix must be numeric and sparse.\n",THISFUNCTION);
    93103                mexErrMsgTxt(" ");
    94104        }
    95105        else {
    96                 nvert =mxGetM(ADJMAT_IN);
    97                 nedge2=mxGetNzmax(ADJMAT_IN);
    98                 if (mxGetNzmax(ADJMAT_IN)) {
    99                         ir    =mxGetIr(ADJMAT_IN);
    100                         adjir = (int *) malloc(mxGetNzmax(ADJMAT_IN)*sizeof(int));
    101                         for (i=0; i<mxGetNzmax(ADJMAT_IN); i++)
     106                nvert =mxGetM(prhs[imi]);
     107                nedge2=mxGetNzmax(prhs[imi]);
     108                if (mxGetNzmax(prhs[imi])) {
     109                        ir    =mxGetIr(prhs[imi]);
     110                        adjir = (int *) malloc(mxGetNzmax(prhs[imi])*sizeof(int));
     111                        for (i=0; i<mxGetNzmax(prhs[imi]); i++)
    102112                                adjir[i]=(int)ir[i];
    103113                }
    104                 if (mxGetN(ADJMAT_IN)) {
    105                         jc    =mxGetJc(ADJMAT_IN);
    106                         adjjc = (int *) malloc((mxGetN(ADJMAT_IN)+1)*sizeof(int));
    107                         for (i=0; i<(mxGetN(ADJMAT_IN)+1); i++)
     114                if (mxGetN(prhs[imi])) {
     115                        jc    =mxGetJc(prhs[imi]);
     116                        adjjc = (int *) malloc((mxGetN(prhs[imi])+1)*sizeof(int));
     117                        for (i=0; i<(mxGetN(prhs[imi])+1); i++)
    108118                                adjjc[i]=(int)jc[i];
    109119                }
    110120                mexPrintf("%s -- Adjacency matrix is of size %d by %d with %d non-zeroes.\n",
    111                                   THISFUNCTION,mxGetM(ADJMAT_IN),mxGetN(ADJMAT_IN),mxGetNzmax(ADJMAT_IN));
    112         }
    113 
    114         if (!mxIsNumeric(VERTLB_IN)) {
     121                                  THISFUNCTION,mxGetM(prhs[imi]),mxGetN(prhs[imi]),mxGetNzmax(prhs[imi]));
     122        }
     123        imi++;
     124
     125        if (!mxIsNumeric(prhs[imi])) {
    115126                mexPrintf("%s -- Vertex label vector must be numeric.\n",THISFUNCTION);
    116127                mexErrMsgTxt(" ");
    117128        }
    118129        else {
    119                 if (mxGetM(VERTLB_IN)*mxGetN(VERTLB_IN)) {
    120                         vld=mxGetPr(VERTLB_IN);
    121                         vli = (int *) malloc(mxGetM(VERTLB_IN)*mxGetN(VERTLB_IN)*sizeof(int));
    122                         for (i=0; i<mxGetM(VERTLB_IN)*mxGetN(VERTLB_IN); i++)
     130                if (mxGetM(prhs[imi])*mxGetN(prhs[imi])) {
     131                        vld=mxGetPr(prhs[imi]);
     132                        vli = (int *) malloc(mxGetM(prhs[imi])*mxGetN(prhs[imi])*sizeof(int));
     133                        for (i=0; i<mxGetM(prhs[imi])*mxGetN(prhs[imi]); i++)
    123134                                vli[i]=(int)vld[i];
    124135                }
    125136                mexPrintf("%s -- Vertex label vector is of size %d by %d.\n",
    126                                   THISFUNCTION,mxGetM(VERTLB_IN),mxGetN(VERTLB_IN));
    127         }
    128 
    129         if (!mxIsNumeric(VERTWT_IN)) {
     137                                  THISFUNCTION,mxGetM(prhs[imi]),mxGetN(prhs[imi]));
     138        }
     139        imi++;
     140
     141        if (!mxIsNumeric(prhs[imi])) {
    130142                mexPrintf("%s -- Vertex weight vector must be numeric.\n",THISFUNCTION);
    131143                mexErrMsgTxt(" ");
    132144        }
    133145        else {
    134                 if (mxGetM(VERTWT_IN)*mxGetN(VERTWT_IN)) {
    135                         vwd=mxGetPr(VERTWT_IN);
    136                         vwi = (int *) malloc(mxGetM(VERTWT_IN)*mxGetN(VERTWT_IN)*sizeof(int));
    137                         for (i=0; i<mxGetM(VERTWT_IN)*mxGetN(VERTWT_IN); i++)
     146                if (mxGetM(prhs[imi])*mxGetN(prhs[imi])) {
     147                        vwd=mxGetPr(prhs[imi]);
     148                        vwi = (int *) malloc(mxGetM(prhs[imi])*mxGetN(prhs[imi])*sizeof(int));
     149                        for (i=0; i<mxGetM(prhs[imi])*mxGetN(prhs[imi]); i++)
    138150                                vwi[i]=(int)vwd[i];
    139151                }
    140152                mexPrintf("%s -- Vertex weight vector is of size %d by %d.\n",
    141                                   THISFUNCTION,mxGetM(VERTWT_IN),mxGetN(VERTWT_IN));
    142         }
    143 
    144         if (!mxIsNumeric(EDGEWT_IN) || (!mxIsEmpty(EDGEWT_IN) && !mxIsSparse(EDGEWT_IN))) {
     153                                  THISFUNCTION,mxGetM(prhs[imi]),mxGetN(prhs[imi]));
     154        }
     155        imi++;
     156
     157        if (!mxIsNumeric(prhs[imi]) || (!mxIsEmpty(prhs[imi]) && !mxIsSparse(prhs[imi]))) {
    145158                mexPrintf("%s -- Edge weight matrix must be numeric and sparse.\n",THISFUNCTION);
    146159                mexErrMsgTxt(" ");
    147160        }
    148161        else {
    149                 if (mxGetM(EDGEWT_IN)) {
    150                         ewd=mxGetPr(EDGEWT_IN);
    151                         ewi = (int *) malloc(mxGetM(EDGEWT_IN)*sizeof(int));
    152                         for (i=0; i<mxGetNzmax(EDGEWT_IN); i++)
     162                if (mxGetM(prhs[imi])) {
     163                        ewd=mxGetPr(prhs[imi]);
     164                        ewi = (int *) malloc(mxGetM(prhs[imi])*sizeof(int));
     165                        for (i=0; i<mxGetNzmax(prhs[imi]); i++)
    153166                                ewi[i]=(int)ewd[i];
    154167                }
    155168                mexPrintf("%s -- Edge weight matrix is of size %d by %d with %d non-zeroes.\n",
    156                                   THISFUNCTION,mxGetM(EDGEWT_IN),mxGetN(EDGEWT_IN),mxGetNzmax(EDGEWT_IN));
    157         }
    158 
    159         if (!mxIsChar(ARCHTYP_IN)) {
    160                 mexPrintf("%s -- Architecture type must be character.\n",THISFUNCTION);
    161                 mexErrMsgTxt(" ");
    162         }
    163         else {
    164                 if (mxGetM(ARCHTYP_IN)*mxGetN(ARCHTYP_IN)) {
    165                         archtyp = (char *) calloc(mxGetM(ARCHTYP_IN)*mxGetN(ARCHTYP_IN)+1,sizeof(char));
    166                         mxGetString(ARCHTYP_IN,archtyp,mxGetM(ARCHTYP_IN)*mxGetN(ARCHTYP_IN)+1);
    167                 }
    168                 mexPrintf("%s -- Architecture type is \"%s\".\n",
    169                                   THISFUNCTION,archtyp);
    170         }
    171 
    172         if (!mxIsNumeric(ARCHPAR_IN)) {
    173                 mexPrintf("%s -- Architecture parameter vector must be numeric.\n",THISFUNCTION);
    174                 mexErrMsgTxt(" ");
    175         }
    176         else {
    177                 napar =mxGetM(ARCHPAR_IN)*mxGetN(ARCHPAR_IN);
    178                 if (mxGetM(ARCHPAR_IN)*mxGetN(ARCHPAR_IN)) {
    179                         apd=mxGetPr(ARCHPAR_IN);
    180                         api = (int *) malloc(mxGetM(ARCHPAR_IN)*mxGetN(ARCHPAR_IN)*sizeof(int));
    181                         for (i=0; i<mxGetM(ARCHPAR_IN)*mxGetN(ARCHPAR_IN); i++)
    182                                 api[i]=(int)apd[i];
    183                 }
    184                 mexPrintf("%s -- Architecture parameter vector is of size %d by %d.\n",
    185                                   THISFUNCTION,mxGetM(ARCHPAR_IN),mxGetN(ARCHPAR_IN));
    186         }
    187 
    188         argcm=nrhs+1-REQ_ARGS;
     169                                  THISFUNCTION,mxGetM(prhs[imi]),mxGetN(prhs[imi]),mxGetNzmax(prhs[imi]));
     170        }
     171        imi++;
     172
     173        if (!((strlen (argvm[0]) >= 5) &&
     174                  (strncmp (argvm[0] + strlen (argvm[0]) - 5, "gpart", 5) == 0))) {
     175                if (!mxIsChar(prhs[imi])) {
     176                        mexPrintf("%s -- Architecture type must be character.\n",THISFUNCTION);
     177                        mexErrMsgTxt(" ");
     178                }
     179                else {
     180                        if (mxGetM(prhs[imi])*mxGetN(prhs[imi])) {
     181                                archtyp = (char *) calloc(mxGetM(prhs[imi])*mxGetN(prhs[imi])+1,sizeof(char));
     182                                mxGetString(prhs[imi],archtyp,mxGetM(prhs[imi])*mxGetN(prhs[imi])+1);
     183                        }
     184                        mexPrintf("%s -- Architecture type is \"%s\".\n",
     185                                          THISFUNCTION,archtyp);
     186                }
     187                imi++;
     188
     189                if (!mxIsNumeric(prhs[imi])) {
     190                        mexPrintf("%s -- Architecture parameter vector must be numeric.\n",THISFUNCTION);
     191                        mexErrMsgTxt(" ");
     192                }
     193                else {
     194                        napar =mxGetM(prhs[imi])*mxGetN(prhs[imi]);
     195                        if (mxGetM(prhs[imi])*mxGetN(prhs[imi])) {
     196                                apd=mxGetPr(prhs[imi]);
     197                                api = (int *) malloc(mxGetM(prhs[imi])*mxGetN(prhs[imi])*sizeof(int));
     198                                for (i=0; i<mxGetM(prhs[imi])*mxGetN(prhs[imi]); i++)
     199                                        api[i]=(int)apd[i];
     200                        }
     201                        mexPrintf("%s -- Architecture parameter vector is of size %d by %d.\n",
     202                                          THISFUNCTION,mxGetM(prhs[imi]),mxGetN(prhs[imi]));
     203                }
     204                imi++;
     205        }
     206
     207        while (imi < nrhs) {
     208                if (!mxIsChar(prhs[imi])) {
     209                        mexPrintf("%s -- prhs[%d] must be character.\n",THISFUNCTION,imi);
     210                        mexErrMsgTxt(" ");
     211                }
     212                else {
     213                        argvm[isi] = (char *) calloc(mxGetM(prhs[imi])*mxGetN(prhs[imi])+1,sizeof(char));
     214                        mxGetString(prhs[imi],argvm[isi],mxGetM(prhs[imi])*mxGetN(prhs[imi])+1);
     215                }
     216                isi++;
     217                imi++;
     218        }
     219        argcm=isi;
    189220        mexPrintf("argcm=%d\n",argcm);
    190         argvm = (char **) malloc(argcm*sizeof(char *));
    191         argvm[0] = (char *) calloc(4+1,sizeof(char));
    192         strcpy(argvm[0],"gmap");
    193         for (i=REQ_ARGS; i<nrhs; i++)
    194                 if (!mxIsChar(prhs[i])) {
    195                         mexPrintf("%s -- prhs[%d] must be character.\n",THISFUNCTION,i);
    196                         mexErrMsgTxt(" ");
    197                 }
    198                 else {
    199                         argvm[i+1-REQ_ARGS] = (char *) calloc(mxGetM(prhs[i])*mxGetN(prhs[i])+1,sizeof(char));
    200                         mxGetString(prhs[i],argvm[i+1-REQ_ARGS],mxGetM(prhs[i])*mxGetN(prhs[i])+1);
    201                 }
    202221        for (i=0; i<argcm; i++)
    203222                mexPrintf("argvm[%d]=\"%s\"\n",i,argvm[i]);
     
    228247
    229248        if (maptabi) {
    230                 MAPTAB_OUT=mxCreateDoubleMatrix(nvert, 2, mxREAL);
    231                 maptabd = mxGetPr(MAPTAB_OUT);
     249                plhs[imo]=mxCreateDoubleMatrix(nvert, 2, mxREAL);
     250                maptabd = mxGetPr(plhs[imo]);
    232251                k=0;
    233252                for (j=0; j<2; j++)
     
    237256        }
    238257        else {
    239                 MAPTAB_OUT=mxCreateDoubleMatrix(0, 2, mxREAL);
    240         }
     258                plhs[imo]=mxCreateDoubleMatrix(0, 2, mxREAL);
     259        }
     260        imo++;
    241261
    242262        if (argvm)
  • issm/trunk/externalpackages/scotch/gmapx.c

    r3644 r3650  
    220220    errorProg ("gmap");
    221221
     222  intRandResetStatic ();
    222223  intRandInit ();
    223224
  • issm/trunk/externalpackages/scotch/scotch.patch

    r3639 r3650  
    1 Only in new2: bin
    2 Only in new2: include
    3 Only in new2: lib
    4 diff -rc src/src/libscotch/arch.c new2/src/libscotch/arch.c
     1Only in new3: bin
     2Only in new3: include
     3Only in new3: lib
     4diff -rc src/src/libscotch/arch.c new3/src/libscotch/arch.c
    55*** src/src/libscotch/arch.c    2008-09-27 07:48:01.000000000 -0700
    6 --- new2/src/libscotch/arch.c   2010-04-26 10:35:09.779996545 -0700
     6--- new3/src/libscotch/arch.c   2010-04-30 10:28:22.088131040 -0700
    77***************
    88*** 173,187 ****
     
    6868        memset     (archptr, 0, sizeof (Arch));     /* Initialize architecture body */
    6969        return     (1);
    70 diff -rc src/src/libscotch/arch_cmplt.c new2/src/libscotch/arch_cmplt.c
     70diff -rc src/src/libscotch/arch_cmplt.c new3/src/libscotch/arch_cmplt.c
    7171*** src/src/libscotch/arch_cmplt.c      2008-05-22 06:44:41.000000000 -0700
    72 --- new2/src/libscotch/arch_cmplt.c     2010-04-26 10:35:09.786996551 -0700
     72--- new3/src/libscotch/arch_cmplt.c     2010-04-30 10:28:22.093131042 -0700
    7373***************
    7474*** 90,99 ****
     
    120120      return     (1);
    121121    }
    122 diff -rc src/src/libscotch/arch_cmplt.h new2/src/libscotch/arch_cmplt.h
     122diff -rc src/src/libscotch/arch_cmplt.h new3/src/libscotch/arch_cmplt.h
    123123*** src/src/libscotch/arch_cmplt.h      2008-05-22 06:44:41.000000000 -0700
    124 --- new2/src/libscotch/arch_cmplt.h     2010-04-26 10:35:09.794996558 -0700
     124--- new3/src/libscotch/arch_cmplt.h     2010-04-30 10:28:22.098131044 -0700
    125125***************
    126126*** 87,93 ****
     
    137137  #define archCmpltArchFree           NULL
    138138  ArchDomNum                  archCmpltDomNum     (const ArchCmplt * const, const ArchCmpltDom * const);
    139 diff -rc src/src/libscotch/arch_cmpltw.c new2/src/libscotch/arch_cmpltw.c
     139diff -rc src/src/libscotch/arch_cmpltw.c new3/src/libscotch/arch_cmpltw.c
    140140*** src/src/libscotch/arch_cmpltw.c     2008-08-27 14:22:22.000000000 -0700
    141 --- new2/src/libscotch/arch_cmpltw.c    2010-04-26 10:35:09.801996564 -0700
     141--- new3/src/libscotch/arch_cmpltw.c    2010-04-30 10:28:22.103131046 -0700
    142142***************
    143143*** 200,211 ****
     
    209209        return     (1);
    210210      }
    211 diff -rc src/src/libscotch/arch_cmpltw.h new2/src/libscotch/arch_cmpltw.h
     211diff -rc src/src/libscotch/arch_cmpltw.h new3/src/libscotch/arch_cmpltw.h
    212212*** src/src/libscotch/arch_cmpltw.h     2008-05-22 06:44:41.000000000 -0700
    213 --- new2/src/libscotch/arch_cmpltw.h    2010-04-26 10:35:09.809996571 -0700
     213--- new3/src/libscotch/arch_cmpltw.h    2010-04-30 10:28:22.108131048 -0700
    214214***************
    215215*** 86,92 ****
     
    226226  int                         archCmpltwArchFree  (ArchCmpltw * restrict const);
    227227  ArchDomNum                  archCmpltwDomNum    (const ArchCmpltw * const, const ArchCmpltwDom * const);
    228 diff -rc src/src/libscotch/arch_deco.c new2/src/libscotch/arch_deco.c
     228diff -rc src/src/libscotch/arch_deco.c new3/src/libscotch/arch_deco.c
    229229*** src/src/libscotch/arch_deco.c       2008-09-28 06:35:27.000000000 -0700
    230 --- new2/src/libscotch/arch_deco.c      2010-04-26 10:35:09.816996577 -0700
     230--- new3/src/libscotch/arch_deco.c      2010-04-30 10:28:22.153131068 -0700
    231231***************
    232232*** 211,217 ****
     
    267267    if ((sizeof (ArchDeco)    > sizeof (ArchDummy)) ||
    268268        (sizeof (ArchDecoDom) > sizeof (ArchDomDummy))) {
    269 diff -rc src/src/libscotch/arch_deco.h new2/src/libscotch/arch_deco.h
     269diff -rc src/src/libscotch/arch_deco.h new3/src/libscotch/arch_deco.h
    270270*** src/src/libscotch/arch_deco.h       2008-09-27 07:49:46.000000000 -0700
    271 --- new2/src/libscotch/arch_deco.h      2010-04-26 10:35:09.823996583 -0700
     271--- new3/src/libscotch/arch_deco.h      2010-04-30 10:28:22.158131070 -0700
    272272***************
    273273*** 113,119 ****
     
    284284  int                         archDecoArchFree    (ArchDeco * const);
    285285  Anum                        archDecoArchSize    (ArchDeco * const, const Anum);
    286 diff -rc src/src/libscotch/arch.h new2/src/libscotch/arch.h
     286diff -rc src/src/libscotch/arch.h new3/src/libscotch/arch.h
    287287*** src/src/libscotch/arch.h    2009-04-28 08:11:27.000000000 -0700
    288 --- new2/src/libscotch/arch.h   2010-04-26 10:35:09.831996590 -0700
     288--- new3/src/libscotch/arch.h   2010-04-30 10:28:22.163131072 -0700
    289289***************
    290290*** 175,181 ****
     
    301301  char *                      archName            (const Arch * const);
    302302  const ArchClass *           archClass           (const char * const);
    303 diff -rc src/src/libscotch/arch_hcub.c new2/src/libscotch/arch_hcub.c
     303diff -rc src/src/libscotch/arch_hcub.c new3/src/libscotch/arch_hcub.c
    304304*** src/src/libscotch/arch_hcub.c       2008-05-22 06:44:41.000000000 -0700
    305 --- new2/src/libscotch/arch_hcub.c      2010-04-26 10:35:09.838996596 -0700
     305--- new3/src/libscotch/arch_hcub.c      2010-04-30 10:28:22.169131075 -0700
    306306***************
    307307*** 88,95 ****
     
    349349      errorPrint ("archHcubArchLoad: bad input");
    350350      return     (1);
    351 diff -rc src/src/libscotch/arch_hcub.h new2/src/libscotch/arch_hcub.h
     351diff -rc src/src/libscotch/arch_hcub.h new3/src/libscotch/arch_hcub.h
    352352*** src/src/libscotch/arch_hcub.h       2008-05-22 06:44:41.000000000 -0700
    353 --- new2/src/libscotch/arch_hcub.h      2010-04-26 10:35:09.845996602 -0700
     353--- new3/src/libscotch/arch_hcub.h      2010-04-30 10:28:22.174131077 -0700
    354354***************
    355355*** 85,91 ****
     
    366366  #define archHcubArchFree            NULL
    367367  ArchDomNum                  archHcubDomNum      (const ArchHcub * const, const ArchHcubDom * const);
    368 diff -rc src/src/libscotch/arch_mesh.c new2/src/libscotch/arch_mesh.c
     368diff -rc src/src/libscotch/arch_mesh.c new3/src/libscotch/arch_mesh.c
    369369*** src/src/libscotch/arch_mesh.c       2008-05-22 06:44:41.000000000 -0700
    370 --- new2/src/libscotch/arch_mesh.c      2010-04-26 10:35:09.853996609 -0700
     370--- new3/src/libscotch/arch_mesh.c      2010-04-30 10:28:22.179131079 -0700
    371371***************
    372372*** 96,103 ****
     
    465465      return     (1);
    466466    }
    467 diff -rc src/src/libscotch/arch_mesh.h new2/src/libscotch/arch_mesh.h
     467diff -rc src/src/libscotch/arch_mesh.h new3/src/libscotch/arch_mesh.h
    468468*** src/src/libscotch/arch_mesh.h       2008-05-22 06:44:41.000000000 -0700
    469 --- new2/src/libscotch/arch_mesh.h      2010-04-26 10:35:09.860996615 -0700
     469--- new3/src/libscotch/arch_mesh.h      2010-04-30 10:28:22.184131082 -0700
    470470***************
    471471*** 96,102 ****
     
    496496  #define archMesh3ArchFree           NULL
    497497  ArchDomNum                  archMesh3DomNum     (const ArchMesh3 * const, const ArchMesh3Dom * const);
    498 diff -rc src/src/libscotch/arch_tleaf.c new2/src/libscotch/arch_tleaf.c
     498diff -rc src/src/libscotch/arch_tleaf.c new3/src/libscotch/arch_tleaf.c
    499499*** src/src/libscotch/arch_tleaf.c      2008-05-22 06:44:41.000000000 -0700
    500 --- new2/src/libscotch/arch_tleaf.c     2010-04-26 10:35:09.867996621 -0700
     500--- new3/src/libscotch/arch_tleaf.c     2010-04-30 10:28:22.189131084 -0700
    501501***************
    502502*** 92,99 ****
     
    554554      return     (1);
    555555    }
    556 diff -rc src/src/libscotch/arch_tleaf.h new2/src/libscotch/arch_tleaf.h
     556diff -rc src/src/libscotch/arch_tleaf.h new3/src/libscotch/arch_tleaf.h
    557557*** src/src/libscotch/arch_tleaf.h      2008-05-22 06:44:41.000000000 -0700
    558 --- new2/src/libscotch/arch_tleaf.h     2010-04-26 10:35:09.875996627 -0700
     558--- new3/src/libscotch/arch_tleaf.h     2010-04-30 10:28:22.194131086 -0700
    559559***************
    560560*** 89,95 ****
     
    571571  #define archTleafArchFree           NULL
    572572  ArchDomNum                  archTleafDomNum     (const ArchTleaf * const, const ArchTleafDom * const);
    573 diff -rc src/src/libscotch/arch_torus.c new2/src/libscotch/arch_torus.c
     573diff -rc src/src/libscotch/arch_torus.c new3/src/libscotch/arch_torus.c
    574574*** src/src/libscotch/arch_torus.c      2008-05-22 06:44:41.000000000 -0700
    575 --- new2/src/libscotch/arch_torus.c     2010-04-26 10:35:09.883996634 -0700
     575--- new3/src/libscotch/arch_torus.c     2010-04-30 10:28:22.199131088 -0700
    576576***************
    577577*** 90,97 ****
     
    670670      return     (1);
    671671    }
    672 diff -rc src/src/libscotch/arch_torus.h new2/src/libscotch/arch_torus.h
     672diff -rc src/src/libscotch/arch_torus.h new3/src/libscotch/arch_torus.h
    673673*** src/src/libscotch/arch_torus.h      2008-05-22 06:44:41.000000000 -0700
    674 --- new2/src/libscotch/arch_torus.h     2010-04-26 10:35:09.890996640 -0700
     674--- new3/src/libscotch/arch_torus.h     2010-04-30 10:28:22.204131090 -0700
    675675***************
    676676*** 96,102 ****
     
    701701  #define archTorus3ArchFree          NULL
    702702  ArchDomNum                  archTorus3DomNum    (const ArchTorus3 * const, const ArchTorus3Dom * const);
    703 diff -rc src/src/libscotch/common.c new2/src/libscotch/common.c
     703diff -rc src/src/libscotch/common.c new3/src/libscotch/common.c
    704704*** src/src/libscotch/common.c  2008-05-22 06:44:41.000000000 -0700
    705 --- new2/src/libscotch/common.c 2010-04-26 10:35:09.897996646 -0700
     705--- new3/src/libscotch/common.c 2010-04-30 10:28:22.209131092 -0700
    706706***************
    707707*** 100,106 ****
     
    720720+ #endif /* MATLAB */
    721721  }
    722 diff -rc src/src/libscotch/common.h new2/src/libscotch/common.h
     722diff -rc src/src/libscotch/common.h new3/src/libscotch/common.h
    723723*** src/src/libscotch/common.h  2009-02-06 14:20:55.000000000 -0800
    724 --- new2/src/libscotch/common.h 2010-04-06 15:51:57.604253000 -0700
     724--- new3/src/libscotch/common.h 2010-05-03 14:22:16.763394855 -0700
    725725***************
    726726*** 66,71 ****
     
    756756  **  Working definitions.
    757757  */
    758 diff -rc src/src/libscotch/common_integer.c new2/src/libscotch/common_integer.c
     758***************
     759*** 209,214 ****
     760--- 224,230 ----
     761  int                         intSave             (FILE * const, const INT);
     762  void                        intAscn             (INT * const, const INT, const INT);
     763  void                        intPerm             (INT * const, const INT);
     764+ void                        intRandResetStatic  (void);
     765  void                        intRandReset        (void);
     766  void                        intRandInit         (void);
     767  INT                         intRandVal          (INT);
     768diff -rc src/src/libscotch/common_integer.c new3/src/libscotch/common_integer.c
    759769*** src/src/libscotch/common_integer.c  2009-01-21 01:32:32.000000000 -0800
    760 --- new2/src/libscotch/common_integer.c 2010-04-27 11:27:22.228561248 -0700
     770--- new3/src/libscotch/common_integer.c 2010-05-03 14:21:44.014369358 -0700
     771***************
     772*** 191,196 ****
     773--- 191,205 ----
     774  static volatile int intrandflag = 0;              /*+ Flag set if generator already initialized +*/
     775  static unsigned int intrandseed = 1;              /*+ Random seed                               +*/
     776 
     777+ void
     778+ intRandResetStatic (void)
     779+ {
     780+   printf("intRandResetStatic begin -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed);
     781+   intrandflag = 0;              /*+ Flag set if generator already initialized +*/
     782+   intrandseed = 1;              /*+ Random seed                               +*/
     783+   printf("intRandResetStatic end   -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed);
     784+ }
     785+
     786  /* This routine initializes the pseudo-random
     787  ** generator if necessary. In order for multi-sequential
     788  ** programs to have exactly the same behavior on any
    761789***************
    762790*** 205,210 ****
    763 --- 205,211 ----
     791--- 214,220 ----
    764792  void
    765793  intRandInit (void)
     
    771799***************
    772800*** 216,221 ****
    773 --- 217,223 ----
     801--- 226,232 ----
    774802  #endif /* COMMON_RANDOM_RAND */
    775803      intrandflag = 1;                              /* Generator has been initialized */
     
    781809***************
    782810*** 228,233 ****
    783 --- 230,236 ----
     811--- 239,245 ----
    784812  void
    785813  intRandReset (void)
     
    791819***************
    792820*** 237,242 ****
    793 --- 240,246 ----
     821--- 249,255 ----
    794822    }
    795823    else
     
    799827 
    800828  /*********************/
    801 Only in new2/src/libscotch: common_integer_old.c
    802 diff -rc src/src/libscotch/common_memory.c new2/src/libscotch/common_memory.c
     829diff -rc src/src/libscotch/common_memory.c new3/src/libscotch/common_memory.c
    803830*** src/src/libscotch/common_memory.c   2009-01-03 02:16:11.000000000 -0800
    804 --- new2/src/libscotch/common_memory.c  2010-04-29 14:32:20.883655193 -0700
     831--- new3/src/libscotch/common_memory.c  2010-04-30 10:28:22.224131099 -0700
    805832***************
    806833*** 87,93 ****
     
    908935  }
    909936  #endif /* COMMON_MEMORY_TRACE */
    910 Only in new2/src/libscotch: common_memory_old.c
    911 diff -rc src/src/libscotch/dummysizes.c new2/src/libscotch/dummysizes.c
     937diff -rc src/src/libscotch/dummysizes.c new3/src/libscotch/dummysizes.c
    912938*** src/src/libscotch/dummysizes.c      2009-05-09 16:08:02.000000000 -0700
    913 --- new2/src/libscotch/dummysizes.c     2010-04-26 10:35:09.912996659 -0700
     939--- new3/src/libscotch/dummysizes.c     2010-04-30 10:28:22.229131101 -0700
    914940***************
    915941*** 267,271 ****
     
    922948+ #endif /* MATLAB */
    923949  }
    924 diff -rc src/src/libscotch/graph.c new2/src/libscotch/graph.c
     950diff -rc src/src/libscotch/graph.c new3/src/libscotch/graph.c
    925951*** src/src/libscotch/graph.c   2008-05-22 06:44:42.000000000 -0700
    926 --- new2/src/libscotch/graph.c  2010-04-26 10:35:09.920996666 -0700
     952--- new3/src/libscotch/graph.c  2010-04-30 10:28:22.234131103 -0700
    927953***************
    928954*** 135,141 ****
     
    945971      if ((grafptr->edlotax != NULL) &&
    946972          ((grafptr->flagval & GRAPHEDGEGROUP) == 0))
    947 diff -rc src/src/libscotch/graph.h new2/src/libscotch/graph.h
     973diff -rc src/src/libscotch/graph.h new3/src/libscotch/graph.h
    948974*** src/src/libscotch/graph.h   2008-06-01 02:49:11.000000000 -0700
    949 --- new2/src/libscotch/graph.h  2010-04-26 10:35:09.927996672 -0700
     975--- new3/src/libscotch/graph.h  2010-04-30 10:28:22.240131106 -0700
    950976***************
    951977*** 159,165 ****
     
    962988  int                         graphSave           (const Graph * const, FILE * const);
    963989  Gnum                        graphBase           (Graph * const, const Gnum);
    964 diff -rc src/src/libscotch/graph_io.c new2/src/libscotch/graph_io.c
     990diff -rc src/src/libscotch/graph_io.c new3/src/libscotch/graph_io.c
    965991*** src/src/libscotch/graph_io.c        2008-05-22 06:44:42.000000000 -0700
    966 --- new2/src/libscotch/graph_io.c       2010-04-26 10:35:09.936996680 -0700
     992--- new3/src/libscotch/graph_io.c       2010-04-30 10:28:22.245131108 -0700
    967993***************
    968994*** 86,92 ****
     
    12001226    }
    12011227 
    1202 diff -rc src/src/libscotch/graph_io_scot.c new2/src/libscotch/graph_io_scot.c
     1228diff -rc src/src/libscotch/graph_io_scot.c new3/src/libscotch/graph_io_scot.c
    12031229*** src/src/libscotch/graph_io_scot.c   2008-05-22 06:44:42.000000000 -0700
    1204 --- new2/src/libscotch/graph_io_scot.c  2010-04-26 10:35:09.944996687 -0700
     1230--- new3/src/libscotch/graph_io_scot.c  2010-04-30 10:28:22.251131111 -0700
    12051231***************
    12061232*** 89,95 ****
     
    12171243    }
    12181244 
    1219 diff -rc src/src/libscotch/library_arch.c new2/src/libscotch/library_arch.c
     1245diff -rc src/src/libscotch/library_arch.c new3/src/libscotch/library_arch.c
    12201246*** src/src/libscotch/library_arch.c    2008-05-22 06:44:42.000000000 -0700
    1221 --- new2/src/libscotch/library_arch.c   2010-04-26 10:35:09.952996693 -0700
     1247--- new3/src/libscotch/library_arch.c   2010-04-30 10:28:22.256131113 -0700
    12221248***************
    12231249*** 120,128 ****
     
    12521278 
    12531279  /*+ This routine saves the given opaque
    1254 diff -rc src/src/libscotch/library_arch_f.c new2/src/libscotch/library_arch_f.c
     1280diff -rc src/src/libscotch/library_arch_f.c new3/src/libscotch/library_arch_f.c
    12551281*** src/src/libscotch/library_arch_f.c  2008-05-22 06:44:42.000000000 -0700
    1256 --- new2/src/libscotch/library_arch_f.c 2010-04-26 10:35:09.959996699 -0700
     1282--- new3/src/libscotch/library_arch_f.c 2010-04-30 10:28:22.260131115 -0700
    12571283***************
    12581284*** 121,127 ****
     
    12691295    fclose (stream);                                /* This closes filenum too */
    12701296 
    1271 diff -rc src/src/libscotch/library_error_exit.c new2/src/libscotch/library_error_exit.c
     1297diff -rc src/src/libscotch/library_error_exit.c new3/src/libscotch/library_error_exit.c
    12721298*** src/src/libscotch/library_error_exit.c      2009-01-20 00:36:33.000000000 -0800
    1273 --- new2/src/libscotch/library_error_exit.c     2010-04-26 10:35:09.966996705 -0700
     1299--- new3/src/libscotch/library_error_exit.c     2010-04-30 10:28:22.265131117 -0700
    12741300***************
    12751301*** 114,119 ****
     
    13441370+ #endif /* MATLAB */
    13451371  }
    1346 diff -rc src/src/libscotch/library_graph.c new2/src/libscotch/library_graph.c
     1372diff -rc src/src/libscotch/library_graph.c new3/src/libscotch/library_graph.c
    13471373*** src/src/libscotch/library_graph.c   2008-05-22 07:28:12.000000000 -0700
    1348 --- new2/src/libscotch/library_graph.c  2010-04-26 10:35:09.973996711 -0700
     1374--- new3/src/libscotch/library_graph.c  2010-04-30 10:28:22.270131119 -0700
    13491375***************
    13501376*** 137,143 ****
     
    13891415 
    13901416  /*+ This routine saves the contents of the given
    1391 diff -rc src/src/libscotch/library_graph_f.c new2/src/libscotch/library_graph_f.c
     1417diff -rc src/src/libscotch/library_graph_f.c new3/src/libscotch/library_graph_f.c
    13921418*** src/src/libscotch/library_graph_f.c 2008-05-22 06:44:43.000000000 -0700
    1393 --- new2/src/libscotch/library_graph_f.c        2010-04-26 10:35:09.981996718 -0700
     1419--- new3/src/libscotch/library_graph_f.c        2010-04-30 10:28:22.275131121 -0700
    13941420***************
    13951421*** 136,142 ****
     
    14061432    fclose (stream);                                /* This closes filenum too */
    14071433 
    1408 diff -rc src/src/libscotch/library_graph_map.c new2/src/libscotch/library_graph_map.c
     1434diff -rc src/src/libscotch/library_graph_map.c new3/src/libscotch/library_graph_map.c
    14091435*** src/src/libscotch/library_graph_map.c       2008-09-28 04:04:05.000000000 -0700
    1410 --- new2/src/libscotch/library_graph_map.c      2010-04-06 15:51:57.678253000 -0700
     1436--- new3/src/libscotch/library_graph_map.c      2010-04-30 10:28:22.280131123 -0700
    14111437***************
    14121438*** 182,192 ****
     
    14311457 
    14321458  /*+ This routine computes a mapping
    1433 diff -rc src/src/libscotch/library_graph_map_f.c new2/src/libscotch/library_graph_map_f.c
     1459diff -rc src/src/libscotch/library_graph_map_f.c new3/src/libscotch/library_graph_map_f.c
    14341460*** src/src/libscotch/library_graph_map_f.c     2008-06-28 03:44:26.000000000 -0700
    1435 --- new2/src/libscotch/library_graph_map_f.c    2010-04-26 10:35:09.995996730 -0700
     1461--- new3/src/libscotch/library_graph_map_f.c    2010-04-30 10:28:22.285131126 -0700
    14361462***************
    14371463*** 183,189 ****
     
    14481474    fclose (stream);                                /* This closes filenum too */
    14491475 
    1450 Only in new2/src/libscotch: library_graph_map_save.c
    1451 diff -rc src/src/libscotch/library.h new2/src/libscotch/library.h
     1476diff -rc src/src/libscotch/library.h new3/src/libscotch/library.h
    14521477*** src/src/libscotch/library.h 2009-05-09 16:08:03.000000000 -0700
    1453 --- new2/src/libscotch/library.h        2010-04-26 10:35:10.002996736 -0700
     1478--- new3/src/libscotch/library.h        2010-04-30 10:28:22.291131128 -0700
    14541479***************
    14551480*** 134,140 ****
     
    14941519  int                         SCOTCH_graphMapCompute (const SCOTCH_Graph * const, SCOTCH_Mapping * const, const SCOTCH_Strat * const);
    14951520  int                         SCOTCH_graphMap     (const SCOTCH_Graph * const, const SCOTCH_Arch * const, const SCOTCH_Strat * const, SCOTCH_Num * const);
    1496 diff -rc src/src/libscotch/Makefile new2/src/libscotch/Makefile
     1521diff -rc src/src/libscotch/Makefile new3/src/libscotch/Makefile
    14971522*** src/src/libscotch/Makefile  2009-05-09 16:08:04.000000000 -0700
    1498 --- new2/src/libscotch/Makefile 2010-04-26 10:35:10.011996000 -0700
     1523--- new3/src/libscotch/Makefile 2010-04-30 10:28:22.297131131 -0700
    14991524***************
    15001525*** 49,55 ****
     
    15331558                                        -$(CP) scotch.h scotchf.h $(includedir)
    15341559                                        -$(CP) libscotch$(LIB) libscotcherr*$(LIB) $(libdir)
    1535 Only in new2/src/libscotch: Makefile_save
    1536 diff -rc src/src/libscotch/mapping.h new2/src/libscotch/mapping.h
     1560diff -rc src/src/libscotch/mapping.h new3/src/libscotch/mapping.h
    15371561*** src/src/libscotch/mapping.h 2008-10-27 08:27:47.000000000 -0700
    1538 --- new2/src/libscotch/mapping.h        2010-04-26 10:35:10.019996751 -0700
     1562--- new3/src/libscotch/mapping.h        2010-04-30 10:28:22.302131133 -0700
    15391563***************
    15401564*** 106,112 ****
     
    15511575 
    15521576  #undef static
    1553 diff -rc src/src/libscotch/mapping_io.c new2/src/libscotch/mapping_io.c
     1577diff -rc src/src/libscotch/mapping_io.c new3/src/libscotch/mapping_io.c
    15541578*** src/src/libscotch/mapping_io.c      2008-05-22 06:44:43.000000000 -0700
    1555 --- new2/src/libscotch/mapping_io.c     2010-04-26 10:35:10.026996757 -0700
     1579--- new3/src/libscotch/mapping_io.c     2010-04-30 10:28:22.307131135 -0700
    15561580***************
    15571581*** 199,204 ****
     
    16401664    return (0);
    16411665  }
    1642 diff -rc src/src/libscotch/mesh_io_scot.c new2/src/libscotch/mesh_io_scot.c
     1666diff -rc src/src/libscotch/mesh_io_scot.c new3/src/libscotch/mesh_io_scot.c
    16431667*** src/src/libscotch/mesh_io_scot.c    2008-05-22 06:44:43.000000000 -0700
    1644 --- new2/src/libscotch/mesh_io_scot.c   2010-04-26 10:35:10.033996763 -0700
     1668--- new3/src/libscotch/mesh_io_scot.c   2010-04-30 10:28:22.312131137 -0700
    16451669***************
    16461670*** 85,91 ****
     
    16571681    }
    16581682 
    1659 diff -rc src/src/libscotch/parser_ll.l new2/src/libscotch/parser_ll.l
     1683diff -rc src/src/libscotch/module.h new3/src/libscotch/module.h
     1684*** src/src/libscotch/module.h  2009-04-26 23:07:14.000000000 -0700
     1685--- new3/src/libscotch/module.h 2010-05-03 14:48:29.655638124 -0700
     1686***************
     1687*** 156,161 ****
     1688--- 156,162 ----
     1689  #define intSave                     _SCOTCHintSave
     1690  #define intAscn                     _SCOTCHintAscn
     1691  #define intPerm                     _SCOTCHintPerm
     1692+ #define intRandResetStatic          _SCOTCHintRandResetStatic
     1693  #define intRandReset                _SCOTCHintRandReset
     1694  #define intRandInit                 _SCOTCHintRandInit
     1695  /* #define intRandVal               _SCOTCHintRandVal Already a macro */
     1696diff -rc src/src/libscotch/parser_ll.l new3/src/libscotch/parser_ll.l
    16601697*** src/src/libscotch/parser_ll.l       2008-05-22 06:44:43.000000000 -0700
    1661 --- new2/src/libscotch/parser_ll.l      2010-04-29 14:45:27.766400063 -0700
     1698--- new3/src/libscotch/parser_ll.l      2010-04-30 10:28:22.318131140 -0700
    16621699***************
    16631700*** 192,197 ****
     
    16861723    yyrestart (yyin);                               /* (Re-)initialize the parser */
    16871724  #endif /* FLEX_SCANNER */
    1688 Only in new2/src/libscotch: parser_ll_save.c
    1689 Only in new2/src/libscotch: parser_yy_save.c
    1690 diff -rc src/src/libscotch/parser_yy.y new2/src/libscotch/parser_yy.y
     1725diff -rc src/src/libscotch/parser_yy.y new3/src/libscotch/parser_yy.y
    16911726*** src/src/libscotch/parser_yy.y       2008-10-22 15:12:48.000000000 -0700
    1692 --- new2/src/libscotch/parser_yy.y      2010-04-29 11:48:09.378829347 -0700
     1727--- new3/src/libscotch/parser_yy.y      2010-04-30 10:28:22.363131160 -0700
    16931728***************
    16941729*** 774,779 ****
     
    17011736    if (stratParserParse2 () != 0) {                /* Parse the strategy string */
    17021737      if (parserstratcurr != NULL)
    1703 diff -rc src/src/libscotch/vgraph_separate_vw.c new2/src/libscotch/vgraph_separate_vw.c
     1738diff -rc src/src/libscotch/vgraph_separate_vw.c new3/src/libscotch/vgraph_separate_vw.c
    17041739*** src/src/libscotch/vgraph_separate_vw.c      2008-05-22 06:44:43.000000000 -0700
    1705 --- new2/src/libscotch/vgraph_separate_vw.c     2010-04-27 11:34:15.756132566 -0700
     1740--- new3/src/libscotch/vgraph_separate_vw.c     2010-04-30 10:28:22.368131162 -0700
    17061741***************
    17071742*** 83,88 ****
     
    17231758    return (0);
    17241759  }
    1725 Only in new2/src/libscotch: .vgraph_separate_vw.c.swp
    1726 Only in new2/src/libscotch: vgraph_separate_vw_old.c
    1727 diff -rc src/src/Makefile new2/src/Makefile
     1760diff -rc src/src/Makefile new3/src/Makefile
    17281761*** src/src/Makefile    2008-09-15 05:50:51.000000000 -0700
    1729 --- new2/src/Makefile   2010-04-26 10:35:10.040996769 -0700
     1762--- new3/src/Makefile   2010-04-30 10:28:22.373131164 -0700
    17301763***************
    17311764*** 97,102 ****
     
    17411774                                        -$(CP) -f ../bin/[agm]*$(EXE) $(bindir)
    17421775                                        -$(CP) -f ../include/*scotch*.h $(includedir)
    1743 Only in new2/src: Makefile.inc
    1744 Only in new2/src/scotch: gmap_mex.c
    1745 Only in new2/src/scotch: gmapx.c
    1746 diff -rc src/src/scotch/Makefile new2/src/scotch/Makefile
     1776Only in new3/src: Makefile.inc
     1777Only in new3/src/scotch: gmap_mex.c
     1778Only in new3/src/scotch: gmapx.c
     1779diff -rc src/src/scotch/Makefile new3/src/scotch/Makefile
    17471780*** src/src/scotch/Makefile     2009-04-27 02:19:43.000000000 -0700
    1748 --- new2/src/scotch/Makefile    2010-04-26 10:35:10.048996776 -0700
     1781--- new3/src/scotch/Makefile    2010-04-30 10:28:22.379131167 -0700
    17491782***************
    17501783*** 49,59 ****
  • issm/trunk/externalpackages/scotch/scotch_jes_notes.txt

    r3640 r3650  
    297297- inserted print statements into common_integer.c/intRand*, common_memory.c/mem*, and vgraph_separate_vw.c/vgraphSeparateVw to monitor static variables in case those have to be reset.
    298298
     2995/03/10:
     300
     301- implemented gpart functionality in gmap_mex.c, gmapx.c, and new gpart.m.
     302- implemented common_integer.c/intRandResetStatic to reset static variables from previous runs.
     303
Note: See TracChangeset for help on using the changeset viewer.