Changeset 3617
- Timestamp:
- 04/26/10 10:41:29 (15 years ago)
- Location:
- issm/trunk/externalpackages/scotch
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/externalpackages/scotch/gmap_mex.c
r3003 r3617 1 /* Copyright 2004,2007,2008 ENSEIRB, INRIA & CNRS 2 ** 3 ** This file is part of the Scotch software package for static mapping, 4 ** graph partitioning and sparse matrix ordering. 5 ** 6 ** This software is governed by the CeCILL-C license under French law 7 ** and abiding by the rules of distribution of free software. You can 8 ** use, modify and/or redistribute the software under the terms of the 9 ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following 10 ** URL: "http://www.cecill.info". 11 ** 12 ** As a counterpart to the access to the source code and rights to copy, 13 ** modify and redistribute granted by the license, users are provided 14 ** only with a limited warranty and the software's author, the holder of 15 ** the economic rights, and the successive licensors have only limited 16 ** liability. 17 ** 18 ** In this respect, the user's attention is drawn to the risks associated 19 ** with loading, using, modifying and/or developing or reproducing the 20 ** software by the user in light of its specific status of free software, 21 ** that may mean that it is complicated to manipulate, and that also 22 ** therefore means that it is reserved for developers and experienced 23 ** professionals having in-depth computer knowledge. Users are therefore 24 ** encouraged to load and test the software's suitability as regards 25 ** their requirements in conditions enabling the security of their 26 ** systems and/or data to be ensured and, more generally, to use and 27 ** operate it in the same conditions as regards security. 28 ** 29 ** The fact that you are presently reading this means that you have had 30 ** knowledge of the CeCILL-C license and that you accept its terms. 31 */ 32 /************************************************************/ 33 /** **/ 34 /** NAME : gmap.c **/ 35 /** **/ 36 /** AUTHOR : Francois PELLEGRINI **/ 37 /** **/ 38 /** FUNCTION : Part of a graph mapping software. **/ 39 /** This module contains the main function. **/ 40 /** **/ 41 /** DATES : # Version 0.0 : from : 05 jan 1993 **/ 42 /** to 12 may 1993 **/ 43 /** # Version 1.1 : from : 15 oct 1993 **/ 44 /** to 15 oct 1993 **/ 45 /** # Version 1.3 : from : 06 apr 1994 **/ 46 /** to 18 may 1994 **/ 47 /** # Version 2.0 : from : 06 jun 1994 **/ 48 /** to 17 nov 1994 **/ 49 /** # Version 2.1 : from : 07 apr 1995 **/ 50 /** to 18 jun 1995 **/ 51 /** # Version 3.0 : from : 01 jul 1995 **/ 52 /** to 02 oct 1995 **/ 53 /** # Version 3.1 : from : 07 nov 1995 **/ 54 /** to 25 apr 1996 **/ 55 /** # Version 3.2 : from : 24 sep 1996 **/ 56 /** to 26 may 1998 **/ 57 /** # Version 3.3 : from : 19 oct 1998 **/ 58 /** to : 30 mar 1999 **/ 59 /** # Version 3.4 : from : 03 feb 2000 **/ 60 /** to : 03 feb 2000 **/ 61 /** # Version 4.0 : from : 16 jan 2004 **/ 62 /** to : 27 dec 2004 **/ 63 /** # Version 5.0 : from : 23 dec 2007 **/ 64 /** to : 18 jun 2008 **/ 65 /** **/ 66 /************************************************************/ 67 68 /* 69 ** The defines and includes. 70 */ 71 72 #define GMAP 73 74 #include "module.h" 75 #include "common.h" 76 #include "scotch.h" 77 #include "gmap.h" 78 79 /* 80 ** The static variables. 81 */ 82 83 static int C_partNbr = 2; /* Default number of parts */ 84 static int C_paraNum = 0; /* Number of parameters */ 85 static int C_paraNbr = 0; /* No parameters for mapping */ 86 static int C_fileNum = 0; /* Number of file in arg list */ 87 static int C_fileNbr = 4; /* Number of files for mapping */ 88 static File C_fileTab[C_FILENBR] = { /* File array */ 89 { "-", NULL, "r" }, 90 { "-", NULL, "r" }, 91 { "-", NULL, "w" }, 92 { "-", NULL, "w" } }; 93 94 static const char * C_usageList[] = { /* Usage */ 95 "gmap [<input source file> [<input target file> [<output mapping file> [<output log file>]]]] <options>", 96 "gpart [<nparts>] [<input source file> [<output mapping file> [<output log file>]]] <options>", 97 " -h : Display this help", 98 " -m<strat> : Set mapping strategy (see user's manual)", 99 " -s<obj> : Force unity weights on <obj>:", 100 " e : edges", 101 " v : vertices", 102 " -V : Print program version and copyright", 103 " -v<verb> : Set verbose mode to <verb>:", 104 " m : mapping information", 105 " s : strategy information", 106 " t : timing information", 107 "", 108 "See default strategy with option '-vs'", 109 NULL }; 1 2 #define THISFUNCTION "Gmap" 3 4 /* Gmap structures and prototypes */ 5 6 #ifdef MATLAB 7 #include "mat.h" 8 #include "mex.h" 9 #include "matrix.h" 10 11 #define printf mexPrintf 12 #define fprintf(file,...) (file == stdout || file == stderr ? mexPrintf(__VA_ARGS__) : fprintf(file,__VA_ARGS__)) 13 #define malloc mxMalloc 14 #define calloc mxCalloc 15 #define realloc mxRealloc 16 #define free mxFree 17 #define exit(status) mexErrMsgTxt("exit=" #status) 18 #endif 19 20 void 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 RETURN_OUT plhs[0] 36 #define MAPTAB_OUT plhs[1] 37 38 39 int 40 gmapx ( 41 int (**pmaptabi)[2], 42 int argcm, 43 char *argvm[], 44 int nvi, 45 int ne2i, 46 int *ir, 47 int *jc, 48 int *vli, 49 int *vwi, 50 int *ewi, 51 char archtyp[], 52 int nai, 53 int *api); 110 54 111 55 /******************************/ … … 116 60 117 61 void mexFunction( int nlhs, 118 119 120 62 mxArray *plhs[], 63 int nrhs, 64 const mxArray *prhs[] ) 121 65 { 122 int argcm; 123 char argvm[21][257]; 124 SCOTCH_Graph grafdat; /* Source graph */ 125 SCOTCH_Num grafflag; /* Source graph properties */ 126 SCOTCH_Arch archdat; /* Target architecture */ 127 SCOTCH_Strat stradat; /* Mapping strategy */ 128 SCOTCH_Mapping mapdat; /* Mapping data */ 129 Clock runtime[2]; /* Timing variables */ 130 SCOTCH_Num nvert =0; 131 SCOTCH_Num nedge2=0; 132 SCOTCH_Num* adjir =NULL; 133 SCOTCH_Num* adjjc =NULL; 134 mwIndex *ir=NULL,*jc=NULL; 135 double *vld=NULL,*vwd=NULL,*ewd=NULL,*apd=NULL; 136 SCOTCH_Num* vertlab=NULL; 137 SCOTCH_Num* vertwgt=NULL; 138 SCOTCH_Num* edgewgt=NULL; 139 char archtyp[256]; 140 SCOTCH_Num napar =0; 141 SCOTCH_Num* archpar=NULL; 142 SCOTCH_Num (*maptab)[2]=NULL; 143 double* maptabm; 144 int flagval; 145 int i,j,k; 146 147 /* check static variables from previous runs */ 148 149 if (C_paraNum > 0 || C_fileNum > 0) 150 mexErrMsgTxt("gmap_mex still in memory -- clear gmap_mex and try again.\n"); 151 152 /* load matlab argument list */ 153 154 if (!mxIsNumeric(prhs[0]) || (!mxIsEmpty(prhs[0]) && !mxIsSparse(prhs[0]))) { 155 mexPrintf("%s -- Adjacency matrix must be numeric and sparse.\n","gmap_mex"); 156 mexErrMsgTxt(" "); 157 } 158 else { 159 nvert =mxGetM(prhs[0]); 160 nedge2=mxGetNzmax(prhs[0]); 161 ir =mxGetIr(prhs[0]); 162 adjir = (SCOTCH_Num *) malloc(mxGetNzmax(prhs[0])*sizeof(SCOTCH_Num)); 163 for (i=0; i<mxGetNzmax(prhs[0]); i++) 164 adjir[i]=(SCOTCH_Num)ir[i]; 165 jc =mxGetJc(prhs[0]); 166 adjjc = (SCOTCH_Num *) malloc((mxGetN(prhs[0])+1)*sizeof(SCOTCH_Num)); 167 for (i=0; i<(mxGetN(prhs[0])+1); i++) 168 adjjc[i]=(SCOTCH_Num)jc[i]; 169 mexPrintf("%s -- Adjacency matrix is of size %d by %d with %d non-zeroes.\n", 170 "gmap_mex",mxGetM(prhs[0]),mxGetN(prhs[0]),mxGetNzmax(prhs[0])); 171 } 172 173 if (!mxIsNumeric(prhs[1])) { 174 mexPrintf("%s -- Vertex label vector must be numeric.\n","gmap_mex"); 175 mexErrMsgTxt(" "); 176 } 177 else { 178 vld=mxGetPr(prhs[1]); 179 vertlab = (SCOTCH_Num *) malloc(mxGetM(prhs[1])*mxGetN(prhs[1])*sizeof(SCOTCH_Num)); 180 for (i=0; i<mxGetM(prhs[1])*mxGetN(prhs[1]); i++) 181 vertlab[i]=(SCOTCH_Num)vld[i]; 182 mexPrintf("%s -- Vertex label vector is of size %d by %d.\n", 183 "gmap_mex",mxGetM(prhs[1]),mxGetN(prhs[1])); 184 } 185 186 if (!mxIsNumeric(prhs[2])) { 187 mexPrintf("%s -- Vertex weight vector must be numeric.\n","gmap_mex"); 188 mexErrMsgTxt(" "); 189 } 190 else { 191 vwd=mxGetPr(prhs[2]); 192 vertwgt = (SCOTCH_Num *) malloc(mxGetM(prhs[2])*mxGetN(prhs[2])*sizeof(SCOTCH_Num)); 193 for (i=0; i<mxGetM(prhs[2])*mxGetN(prhs[2]); i++) 194 vertwgt[i]=(SCOTCH_Num)vwd[i]; 195 mexPrintf("%s -- Vertex weight vector is of size %d by %d.\n", 196 "gmap_mex",mxGetM(prhs[2]),mxGetN(prhs[2])); 197 } 198 199 if (!mxIsNumeric(prhs[3]) || (!mxIsEmpty(prhs[3]) && !mxIsSparse(prhs[3]))) { 200 mexPrintf("%s -- Edge weight matrix must be numeric and sparse.\n","gmap_mex"); 201 mexErrMsgTxt(" "); 202 } 203 else { 204 ewd=mxGetPr(prhs[3]); 205 edgewgt = (SCOTCH_Num *) malloc(mxGetM(prhs[3])*sizeof(SCOTCH_Num)); 206 for (i=0; i<mxGetNzmax(prhs[3]); i++) 207 edgewgt[i]=(SCOTCH_Num)ewd[i]; 208 mexPrintf("%s -- Edge weight matrix is of size %d by %d with %d non-zeroes.\n", 209 "gmap_mex",mxGetM(prhs[3]),mxGetN(prhs[3]),mxGetNzmax(prhs[3])); 210 } 211 212 if (!mxIsChar(prhs[4])) { 213 mexPrintf("%s -- Architecture type must be character.\n","gmap_mex"); 214 mexErrMsgTxt(" "); 215 } 216 else { 217 mxGetString(prhs[4],archtyp,255); 218 mexPrintf("%s -- Architecture type is \"%s\".\n", 219 "gmap_mex",archtyp); 220 archtyp[255] = '\0'; 221 } 222 223 if (!mxIsNumeric(prhs[5])) { 224 mexPrintf("%s -- Architecture parameter vector must be numeric.\n","gmap_mex"); 225 mexErrMsgTxt(" "); 226 } 227 else { 228 napar =mxGetM(prhs[5])*mxGetN(prhs[5]); 229 apd=mxGetPr(prhs[5]); 230 archpar = (SCOTCH_Num *) malloc(mxGetM(prhs[5])*mxGetN(prhs[5])*sizeof(SCOTCH_Num)); 231 for (i=0; i<mxGetM(prhs[5])*mxGetN(prhs[5]); i++) 232 archpar[i]=(SCOTCH_Num)apd[i]; 233 mexPrintf("%s -- Architecture parameter vector is of size %d by %d.\n", 234 "gmap_mex",mxGetM(prhs[5]),mxGetN(prhs[5])); 235 } 236 237 argcm=nrhs+1-6; 238 mexPrintf("argcm=%d\n",argcm); 239 strcpy(argvm[0],"gmap"); 240 for (i=6; i<nrhs; i++) 241 if (!mxIsChar(prhs[i])) { 242 mexPrintf("%s -- prhs[%d] must be character.\n","gmap_mex",i); 243 mexErrMsgTxt(" "); 244 } 245 else 246 mxGetString(prhs[i],argvm[i-5],256); 247 for (i=0; i<argcm; i++) 248 mexPrintf("argvm[%d]=\"%s\"\n",i,argvm[i]); 249 250 flagval = C_FLAGNONE; /* Default behavior */ 251 i = strlen (argvm[0]); 252 if ((i >= 5) && (strncmp (argvm[0] + i - 5, "gpart", 5) == 0)) { 253 flagval |= C_FLAGPART; 254 C_paraNbr = 1; /* One more parameter */ 255 C_fileNbr = 3; /* One less file to provide */ 256 errorProg ("gpart"); 257 } 258 else 259 errorProg ("gmap"); 260 261 intRandInit (); 262 263 if ((argcm >= 2) && (argvm[1][0] == '?')) { /* If need for help */ 264 usagePrint (stdout, C_usageList); 265 /* return (0); */ 266 plhs[0]=mxCreateDoubleMatrix(1, 1, mxREAL); 267 *mxGetPr(plhs[0])=0.; 66 int argcm; 67 char **argvm=NULL; 68 int nvert =0,nedge2=0,napar =0; 69 mwIndex *ir=NULL,*jc=NULL; 70 int *adjir=NULL,*adjjc=NULL; 71 double *vld=NULL,*vwd=NULL,*ewd=NULL,*apd=NULL; 72 int *vli=NULL,*vwi=NULL,*ewi=NULL,*api=NULL; 73 char *archtyp=NULL; 74 int (*maptabi)[2]=NULL; 75 double* maptabd=NULL; 76 int i,j,k,ierr; 77 78 /* Check for proper number of arguments */ 79 80 if (nrhs == 0 && nlhs == 0) { 81 GmapUsage(); 82 return; 83 } 84 else if (nrhs < 6 || nlhs > 2) { 85 GmapUsage(); 86 mexErrMsgTxt(" "); 87 } 88 89 /* load matlab argument list and convert to integer (note that converting here 90 and in the x-layer is inefficient, but it makes the x-layer more general) */ 91 92 if (!mxIsNumeric(ADJMAT_IN) || (!mxIsEmpty(ADJMAT_IN) && !mxIsSparse(ADJMAT_IN))) { 93 mexPrintf("%s -- Adjacency matrix must be numeric and sparse.\n",THISFUNCTION); 94 mexErrMsgTxt(" "); 95 } 96 else { 97 nvert =mxGetM(ADJMAT_IN); 98 nedge2=mxGetNzmax(ADJMAT_IN); 99 if (mxGetNzmax(ADJMAT_IN)) { 100 ir =mxGetIr(ADJMAT_IN); 101 adjir = (int *) malloc(mxGetNzmax(ADJMAT_IN)*sizeof(int)); 102 for (i=0; i<mxGetNzmax(ADJMAT_IN); i++) 103 adjir[i]=(int)ir[i]; 104 } 105 if (mxGetN(ADJMAT_IN)) { 106 jc =mxGetJc(ADJMAT_IN); 107 adjjc = (int *) malloc((mxGetN(ADJMAT_IN)+1)*sizeof(int)); 108 for (i=0; i<(mxGetN(ADJMAT_IN)+1); i++) 109 adjjc[i]=(int)jc[i]; 110 } 111 mexPrintf("%s -- Adjacency matrix is of size %d by %d with %d non-zeroes.\n", 112 THISFUNCTION,mxGetM(ADJMAT_IN),mxGetN(ADJMAT_IN),mxGetNzmax(ADJMAT_IN)); 113 } 114 115 if (!mxIsNumeric(VERTLB_IN)) { 116 mexPrintf("%s -- Vertex label vector must be numeric.\n",THISFUNCTION); 117 mexErrMsgTxt(" "); 118 } 119 else { 120 if (mxGetM(VERTLB_IN)*mxGetN(VERTLB_IN)) { 121 vld=mxGetPr(VERTLB_IN); 122 vli = (int *) malloc(mxGetM(VERTLB_IN)*mxGetN(VERTLB_IN)*sizeof(int)); 123 for (i=0; i<mxGetM(VERTLB_IN)*mxGetN(VERTLB_IN); i++) 124 vli[i]=(int)vld[i]; 125 } 126 mexPrintf("%s -- Vertex label vector is of size %d by %d.\n", 127 THISFUNCTION,mxGetM(VERTLB_IN),mxGetN(VERTLB_IN)); 128 } 129 130 if (!mxIsNumeric(VERTWT_IN)) { 131 mexPrintf("%s -- Vertex weight vector must be numeric.\n",THISFUNCTION); 132 mexErrMsgTxt(" "); 133 } 134 else { 135 if (mxGetM(VERTWT_IN)*mxGetN(VERTWT_IN)) { 136 vwd=mxGetPr(VERTWT_IN); 137 vwi = (int *) malloc(mxGetM(VERTWT_IN)*mxGetN(VERTWT_IN)*sizeof(int)); 138 for (i=0; i<mxGetM(VERTWT_IN)*mxGetN(VERTWT_IN); i++) 139 vwi[i]=(int)vwd[i]; 140 } 141 mexPrintf("%s -- Vertex weight vector is of size %d by %d.\n", 142 THISFUNCTION,mxGetM(VERTWT_IN),mxGetN(VERTWT_IN)); 143 } 144 145 if (!mxIsNumeric(EDGEWT_IN) || (!mxIsEmpty(EDGEWT_IN) && !mxIsSparse(EDGEWT_IN))) { 146 mexPrintf("%s -- Edge weight matrix must be numeric and sparse.\n",THISFUNCTION); 147 mexErrMsgTxt(" "); 148 } 149 else { 150 if (mxGetM(EDGEWT_IN)) { 151 ewd=mxGetPr(EDGEWT_IN); 152 ewi = (int *) malloc(mxGetM(EDGEWT_IN)*sizeof(int)); 153 for (i=0; i<mxGetNzmax(EDGEWT_IN); i++) 154 ewi[i]=(int)ewd[i]; 155 } 156 mexPrintf("%s -- Edge weight matrix is of size %d by %d with %d non-zeroes.\n", 157 THISFUNCTION,mxGetM(EDGEWT_IN),mxGetN(EDGEWT_IN),mxGetNzmax(EDGEWT_IN)); 158 } 159 160 if (!mxIsChar(ARCHTYP_IN)) { 161 mexPrintf("%s -- Architecture type must be character.\n",THISFUNCTION); 162 mexErrMsgTxt(" "); 163 } 164 else { 165 if (mxGetM(ARCHTYP_IN)*mxGetN(ARCHTYP_IN)) { 166 archtyp = (char *) calloc(mxGetM(ARCHTYP_IN)*mxGetN(ARCHTYP_IN)+1,sizeof(char)); 167 mxGetString(ARCHTYP_IN,archtyp,mxGetM(ARCHTYP_IN)*mxGetN(ARCHTYP_IN)+1); 168 } 169 mexPrintf("%s -- Architecture type is \"%s\".\n", 170 THISFUNCTION,archtyp); 171 } 172 173 if (!mxIsNumeric(ARCHPAR_IN)) { 174 mexPrintf("%s -- Architecture parameter vector must be numeric.\n",THISFUNCTION); 175 mexErrMsgTxt(" "); 176 } 177 else { 178 napar =mxGetM(ARCHPAR_IN)*mxGetN(ARCHPAR_IN); 179 if (mxGetM(ARCHPAR_IN)*mxGetN(ARCHPAR_IN)) { 180 apd=mxGetPr(ARCHPAR_IN); 181 api = (int *) malloc(mxGetM(ARCHPAR_IN)*mxGetN(ARCHPAR_IN)*sizeof(int)); 182 for (i=0; i<mxGetM(ARCHPAR_IN)*mxGetN(ARCHPAR_IN); i++) 183 api[i]=(int)apd[i]; 184 } 185 mexPrintf("%s -- Architecture parameter vector is of size %d by %d.\n", 186 THISFUNCTION,mxGetM(ARCHPAR_IN),mxGetN(ARCHPAR_IN)); 187 } 188 189 argcm=nrhs+1-REQ_ARGS; 190 mexPrintf("argcm=%d\n",argcm); 191 argvm = (char **) malloc(argcm*sizeof(char *)); 192 argvm[0] = (char *) calloc(4+1,sizeof(char)); 193 strcpy(argvm[0],"gmap"); 194 for (i=REQ_ARGS; i<nrhs; i++) 195 if (!mxIsChar(prhs[i])) { 196 mexPrintf("%s -- prhs[%d] must be character.\n",THISFUNCTION,i); 197 mexErrMsgTxt(" "); 198 } 199 else { 200 argvm[i+1-REQ_ARGS] = (char *) calloc(mxGetM(prhs[i])*mxGetN(prhs[i])+1,sizeof(char)); 201 mxGetString(prhs[i],argvm[i+1-REQ_ARGS],mxGetM(prhs[i])*mxGetN(prhs[i])+1); 202 } 203 for (i=0; i<argcm; i++) 204 mexPrintf("argvm[%d]=\"%s\"\n",i,argvm[i]); 205 206 /* Do the actual computations in a subroutine */ 207 208 mexPrintf("Gmapx:\n"); 209 ierr=gmapx(&maptabi, 210 argcm, 211 argvm, 212 nvert, 213 nedge2, 214 adjir, 215 adjjc, 216 vli, 217 vwi, 218 ewi, 219 archtyp, 220 napar, 221 api); 222 mexPrintf("%s -- Error %d from Gmapx.\n",THISFUNCTION,ierr); 223 224 /* for (i=0; i<nvert; i++) 225 mexPrintf("maptabi[%d][0]=%d, maptabi[%d][1]=%d\n", 226 i,maptabi[i][0],i,maptabi[i][1]); */ 227 228 /* Create matrices for the return arguments */ 229 230 if (maptabi) { 231 MAPTAB_OUT=mxCreateDoubleMatrix(nvert, 2, mxREAL); 232 maptabd = mxGetPr(MAPTAB_OUT); 233 k=0; 234 for (j=0; j<2; j++) 235 for (i=0; i<nvert; i++) 236 maptabd[k++]=(double)maptabi[i][j]; 237 free(maptabi); 238 } 239 240 if (argvm) 241 for (i=argcm-1; i>=0; i--) 242 free(argvm[i]); 243 if (api) free(api); 244 if (archtyp) free(archtyp); 245 if (ewi) free(ewi); 246 if (vwi) free(vwi); 247 if (vli) free(vli); 248 if (adjjc) free(adjjc); 249 if (adjir) free(adjir); 250 251 RETURN_OUT=mxCreateDoubleMatrix(1, 1, mxREAL); 252 *mxGetPr(RETURN_OUT)=ierr; 253 254 return; 255 } 256 257 void GmapUsage( void ) 258 { 259 260 mexPrintf("\n"); 261 mexPrintf("Usage: [return,maptab]=Gmap_mex(adjmat,vertlb,vertwt,edgewt,archtyp,archpar,\n"); 262 mexPrintf(" Scotch-specific parameters);\n"); 263 mexPrintf("\n"); 264 268 265 return; 269 }270 271 grafflag = 0; /* Use vertex and edge weights */272 SCOTCH_stratInit (&stradat); /* Set default mapping strategy */273 274 printf("point 0: C_FILENBR=%d, C_fileNbr=%d, C_paraNbr=%d\n",275 C_FILENBR,C_fileNbr,C_paraNbr);276 for (i = 0; i < C_FILENBR; i ++) /* Set default stream pointers */277 C_fileTab[i].pntr = (C_fileTab[i].mode[0] == 'r') ? stdin : stdout;278 for (i = 1; i < argcm; i ++) { /* Loop for all option codes */279 printf("point 1: i=%d; C_fileNbr=%d, C_fileNum=%d, C_paraNbr=%d, C_paraNum=%d\n",280 i,C_fileNbr,C_fileNum,C_paraNbr,C_paraNum);281 if ((argvm[i][0] != '-') || (argvm[i][1] == '\0') || (argvm[i][1] == '.')) { /* If found a file name */282 printf("point 2: i=%d; C_fileNbr=%d, C_fileNum=%d, C_paraNbr=%d, C_paraNum=%d\n",283 i,C_fileNbr,C_fileNum,C_paraNbr,C_paraNum);284 if (C_paraNum < C_paraNbr) { /* If number of parameters not reached */285 if ((C_partNbr = atoi (argvm[i])) < 1) /* Get the number of parts */286 errorPrint ("main: invalid number of parts (\"%s\")", argvm[i]);287 C_paraNum ++;288 continue; /* Process the other parameters */289 }290 printf("point 3: i=%d; C_fileNbr=%d, C_fileNum=%d, C_paraNbr=%d, C_paraNum=%d\n",291 i,C_fileNbr,C_fileNum,C_paraNbr,C_paraNum);292 if (C_fileNum < C_fileNbr) /* A file name has been given */293 C_fileTab[C_fileNum ++].name = argvm[i];294 else295 errorPrint ("main: too many file names given");296 printf("point 4: i=%d; C_fileNbr=%d, C_fileNum=%d, C_paraNbr=%d, C_paraNum=%d\n",297 i,C_fileNbr,C_fileNum,C_paraNbr,C_paraNum);298 }299 else { /* If found an option name */300 switch (argvm[i][1]) {301 case 'H' : /* Give the usage message */302 case 'h' :303 usagePrint (stdout, C_usageList);304 /* return (0); */305 plhs[0]=mxCreateDoubleMatrix(1, 1, mxREAL);306 *mxGetPr(plhs[0])=0.;307 return;308 case 'M' :309 case 'm' :310 SCOTCH_stratExit (&stradat);311 SCOTCH_stratInit (&stradat);312 SCOTCH_stratGraphMap (&stradat, &argvm[i][2]);313 break;314 case 'S' :315 case 's' : /* Source graph parameters */316 for (j = 2; argvm[i][j] != '\0'; j ++) {317 switch (argvm[i][j]) {318 case 'E' :319 case 'e' :320 grafflag |= 2; /* Do not load edge weights */321 break;322 case 'V' :323 case 'v' :324 grafflag |= 1; /* Do not load vertex weights */325 break;326 default :327 errorPrint ("main: invalid source graph option (\"%c\")", argvm[i][j]);328 }329 }330 break;331 case 'V' :332 fprintf (stderr, "gmap/gpart, version %s - F. Pellegrini\n", SCOTCH_VERSION);333 fprintf (stderr, "Copyright 2004,2007,2008 ENSEIRB, INRIA & CNRS, France\n");334 fprintf (stderr, "This software is libre/free software under CeCILL-C -- see the user's manual for more information\n");335 /* return (0); */336 plhs[0]=mxCreateDoubleMatrix(1, 1, mxREAL);337 *mxGetPr(plhs[0])=0.;338 return;339 case 'v' : /* Output control info */340 for (j = 2; argvm[i][j] != '\0'; j ++) {341 switch (argvm[i][j]) {342 case 'M' :343 case 'm' :344 flagval |= C_FLAGVERBMAP;345 break;346 case 'S' :347 case 's' :348 flagval |= C_FLAGVERBSTR;349 break;350 case 'T' :351 case 't' :352 flagval |= C_FLAGVERBTIM;353 break;354 default :355 errorPrint ("main: unprocessed parameter \"%c\" in \"%s\"", argvm[i][j], argvm[i]);356 }357 }358 break;359 default :360 errorPrint ("main: unprocessed option (\"%s\")", argvm[i]);361 }362 }363 }364 printf("point 5\n");365 if ((flagval & C_FLAGPART) != 0) { /* If program run as the partitioner */366 C_fileTab[3].name = C_fileTab[2].name; /* Put provided file names at their right place */367 C_fileTab[2].name = C_fileTab[1].name;368 C_fileTab[1].name = "-";369 }370 printf("point 6\n");371 372 fileBlockOpen (C_fileTab, C_FILENBR); /* Open all files */373 for (i=0; i<C_FILENBR; i++)374 mexPrintf("C_fileTab[%d]: name=\"%s\",pntr=%p,mode=\"%s\"\n",375 i,C_fileTab[i].name,C_fileTab[i].pntr,C_fileTab[i].mode);376 printf("point 7\n");377 378 clockInit (&runtime[0]);379 clockStart (&runtime[0]);380 printf("point 8\n");381 382 SCOTCH_graphInit (&grafdat); /* Create graph structure */383 SCOTCH_graphLoad (&grafdat, C_filepntrsrcinp, -1, grafflag, nvert, nedge2, adjir, adjjc, vertlab, vertwgt, edgewgt); /* Read source graph */384 385 printf("point 9\n");386 SCOTCH_archInit (&archdat); /* Create architecture structure */387 if ((flagval & C_FLAGPART) != 0) /* If program run as the partitioner */388 SCOTCH_archCmplt (&archdat, C_partNbr); /* Create a complete graph of proper size */389 else390 SCOTCH_archLoad (&archdat, C_filepntrtgtinp, archtyp, napar, archpar); /* Read target architecture */391 printf("point 10\n");392 393 clockStop (&runtime[0]); /* Get input time */394 clockInit (&runtime[1]);395 clockStart (&runtime[1]);396 397 SCOTCH_graphMapInit (&grafdat, &mapdat, &archdat, NULL);398 SCOTCH_graphMapCompute (&grafdat, &mapdat, &stradat); /* Perform mapping */399 printf("point 11\n");400 401 clockStop (&runtime[1]); /* Get computation time */402 clockStart (&runtime[0]);403 404 SCOTCH_graphMapSave (&nvert, &maptab, &grafdat, &mapdat, C_filepntrmapout); /* Write mapping */405 406 /* for (i=0; i<nvert; i++)407 printf("maptab[%d][0]=%d, maptab[%d][1]=%d\n",408 i,maptab[i][0],i,maptab[i][1]); */409 if (maptab) {410 plhs[1]=mxCreateDoubleMatrix(nvert, 2, mxREAL);411 maptabm = mxGetPr(plhs[1]);412 k=0;413 for (j=0; j<2; j++)414 for (i=0; i<nvert; i++)415 maptabm[k++]=(double)maptab[i][j];416 free(maptab);417 }418 printf("point 12\n");419 420 clockStop (&runtime[0]); /* Get output time */421 422 if (flagval & C_FLAGVERBSTR) {423 fprintf (C_filepntrlogout, "S\tStrat=");424 SCOTCH_stratSave (&stradat, C_filepntrlogout);425 putc ('\n', C_filepntrlogout);426 }427 printf("point 13\n");428 if (flagval & C_FLAGVERBTIM) {429 fprintf (C_filepntrlogout, "T\tMapping\t\t%g\nT\tI/O\t\t%g\nT\tTotal\t\t%g\n",430 (double) clockVal (&runtime[1]),431 (double) clockVal (&runtime[0]),432 (double) clockVal (&runtime[0]) +433 (double) clockVal (&runtime[1]));434 }435 printf("point 14\n");436 if (flagval & C_FLAGVERBMAP)437 SCOTCH_graphMapView (&grafdat, &mapdat, C_filepntrlogout);438 printf("point 15\n");439 440 fileBlockClose (C_fileTab, C_FILENBR); /* Always close explicitely to end eventual (un)compression tasks */441 442 printf("point 16\n");443 SCOTCH_graphMapExit (&grafdat, &mapdat);444 printf("point 16a\n");445 SCOTCH_graphExit (&grafdat);446 printf("point 16b\n");447 SCOTCH_stratExit (&stradat);448 printf("point 16c\n");449 SCOTCH_archExit (&archdat);450 printf("point 17\n");451 452 if (archpar) free(archpar);453 if (edgewgt) free(edgewgt);454 if (vertwgt) free(vertwgt);455 if (vertlab) free(vertlab);456 if (adjjc) free(adjjc);457 if (adjir) free(adjir);458 459 #ifdef COMMON_PTHREAD460 pthread_exit ((void *) 0); /* Allow potential (un)compression tasks to complete */461 #endif /* COMMON_PTHREAD */462 printf("point 18\n");463 /* return (0); */464 plhs[0]=mxCreateDoubleMatrix(1, 1, mxREAL);465 *mxGetPr(plhs[0])=0.;466 return;467 266 } 267 -
issm/trunk/externalpackages/scotch/install.sh
r3091 r3617 23 23 cp -p Makefile.inc src/src 24 24 cp -p gmap_mex.c src/src/scotch 25 cp -p gmapx.c src/src/scotch 25 26 cd src/src 26 27 # For stand-alone scotch modules: -
issm/trunk/externalpackages/scotch/scotch.patch
r3168 r3617 4 4 diff -rc src/src/libscotch/arch.c new/src/libscotch/arch.c 5 5 *** src/src/libscotch/arch.c 2008-09-27 07:48:01.000000000 -0700 6 --- new/src/libscotch/arch.c 2010-0 3-03 14:06:15.166926170 -08006 --- new/src/libscotch/arch.c 2010-04-06 15:51:57.485253299 -0700 7 7 *************** 8 8 *** 173,187 **** … … 70 70 diff -rc src/src/libscotch/arch_cmplt.c new/src/libscotch/arch_cmplt.c 71 71 *** src/src/libscotch/arch_cmplt.c 2008-05-22 06:44:41.000000000 -0700 72 --- new/src/libscotch/arch_cmplt.c 2010-0 3-03 14:06:15.171926172 -080072 --- new/src/libscotch/arch_cmplt.c 2010-04-06 15:51:57.492253308 -0700 73 73 *************** 74 74 *** 90,99 **** … … 122 122 diff -rc src/src/libscotch/arch_cmplt.h new/src/libscotch/arch_cmplt.h 123 123 *** src/src/libscotch/arch_cmplt.h 2008-05-22 06:44:41.000000000 -0700 124 --- new/src/libscotch/arch_cmplt.h 2010-0 3-03 14:06:15.178926175 -0800124 --- new/src/libscotch/arch_cmplt.h 2010-04-06 15:51:57.499253316 -0700 125 125 *************** 126 126 *** 87,93 **** … … 139 139 diff -rc src/src/libscotch/arch_cmpltw.c new/src/libscotch/arch_cmpltw.c 140 140 *** src/src/libscotch/arch_cmpltw.c 2008-08-27 14:22:22.000000000 -0700 141 --- new/src/libscotch/arch_cmpltw.c 2010-0 3-03 14:06:15.184926177 -0800141 --- new/src/libscotch/arch_cmpltw.c 2010-04-06 15:51:57.505253324 -0700 142 142 *************** 143 143 *** 200,211 **** … … 211 211 diff -rc src/src/libscotch/arch_cmpltw.h new/src/libscotch/arch_cmpltw.h 212 212 *** src/src/libscotch/arch_cmpltw.h 2008-05-22 06:44:41.000000000 -0700 213 --- new/src/libscotch/arch_cmpltw.h 2010-0 3-03 14:06:15.189926179 -0800213 --- new/src/libscotch/arch_cmpltw.h 2010-04-06 15:51:57.512253332 -0700 214 214 *************** 215 215 *** 86,92 **** … … 228 228 diff -rc src/src/libscotch/arch_deco.c new/src/libscotch/arch_deco.c 229 229 *** src/src/libscotch/arch_deco.c 2008-09-28 06:35:27.000000000 -0700 230 --- new/src/libscotch/arch_deco.c 2010-0 3-03 14:06:15.195926181 -0800230 --- new/src/libscotch/arch_deco.c 2010-04-06 15:51:57.519253341 -0700 231 231 *************** 232 232 *** 211,217 **** … … 269 269 diff -rc src/src/libscotch/arch_deco.h new/src/libscotch/arch_deco.h 270 270 *** src/src/libscotch/arch_deco.h 2008-09-27 07:49:46.000000000 -0700 271 --- new/src/libscotch/arch_deco.h 2010-0 3-03 14:06:15.201926184 -0800271 --- new/src/libscotch/arch_deco.h 2010-04-06 15:51:57.527253350 -0700 272 272 *************** 273 273 *** 113,119 **** … … 286 286 diff -rc src/src/libscotch/arch.h new/src/libscotch/arch.h 287 287 *** src/src/libscotch/arch.h 2009-04-28 08:11:27.000000000 -0700 288 --- new/src/libscotch/arch.h 2010-0 3-03 14:06:15.207926186 -0800288 --- new/src/libscotch/arch.h 2010-04-06 15:51:57.533253358 -0700 289 289 *************** 290 290 *** 175,181 **** … … 303 303 diff -rc src/src/libscotch/arch_hcub.c new/src/libscotch/arch_hcub.c 304 304 *** src/src/libscotch/arch_hcub.c 2008-05-22 06:44:41.000000000 -0700 305 --- new/src/libscotch/arch_hcub.c 2010-0 3-03 14:06:15.213926188 -0800305 --- new/src/libscotch/arch_hcub.c 2010-04-06 15:51:57.540253366 -0700 306 306 *************** 307 307 *** 88,95 **** … … 351 351 diff -rc src/src/libscotch/arch_hcub.h new/src/libscotch/arch_hcub.h 352 352 *** src/src/libscotch/arch_hcub.h 2008-05-22 06:44:41.000000000 -0700 353 --- new/src/libscotch/arch_hcub.h 2010-0 3-03 14:06:15.219926191 -0800353 --- new/src/libscotch/arch_hcub.h 2010-04-06 15:51:57.547253375 -0700 354 354 *************** 355 355 *** 85,91 **** … … 368 368 diff -rc src/src/libscotch/arch_mesh.c new/src/libscotch/arch_mesh.c 369 369 *** src/src/libscotch/arch_mesh.c 2008-05-22 06:44:41.000000000 -0700 370 --- new/src/libscotch/arch_mesh.c 2010-0 3-03 14:06:15.225926193 -0800370 --- new/src/libscotch/arch_mesh.c 2010-04-06 15:51:57.555253385 -0700 371 371 *************** 372 372 *** 96,103 **** … … 467 467 diff -rc src/src/libscotch/arch_mesh.h new/src/libscotch/arch_mesh.h 468 468 *** src/src/libscotch/arch_mesh.h 2008-05-22 06:44:41.000000000 -0700 469 --- new/src/libscotch/arch_mesh.h 2010-0 3-03 14:06:15.232926196 -0800469 --- new/src/libscotch/arch_mesh.h 2010-04-06 15:51:57.561253392 -0700 470 470 *************** 471 471 *** 96,102 **** … … 498 498 diff -rc src/src/libscotch/arch_tleaf.c new/src/libscotch/arch_tleaf.c 499 499 *** src/src/libscotch/arch_tleaf.c 2008-05-22 06:44:41.000000000 -0700 500 --- new/src/libscotch/arch_tleaf.c 2010-0 3-03 14:06:15.238926198 -0800500 --- new/src/libscotch/arch_tleaf.c 2010-04-06 15:51:57.569253402 -0700 501 501 *************** 502 502 *** 92,99 **** … … 556 556 diff -rc src/src/libscotch/arch_tleaf.h new/src/libscotch/arch_tleaf.h 557 557 *** src/src/libscotch/arch_tleaf.h 2008-05-22 06:44:41.000000000 -0700 558 --- new/src/libscotch/arch_tleaf.h 2010-0 3-03 14:06:15.244926201 -0800558 --- new/src/libscotch/arch_tleaf.h 2010-04-06 15:51:57.576253410 -0700 559 559 *************** 560 560 *** 89,95 **** … … 573 573 diff -rc src/src/libscotch/arch_torus.c new/src/libscotch/arch_torus.c 574 574 *** src/src/libscotch/arch_torus.c 2008-05-22 06:44:41.000000000 -0700 575 --- new/src/libscotch/arch_torus.c 2010-0 3-03 14:06:15.251926203 -0800575 --- new/src/libscotch/arch_torus.c 2010-04-06 15:51:57.583253419 -0700 576 576 *************** 577 577 *** 90,97 **** … … 672 672 diff -rc src/src/libscotch/arch_torus.h new/src/libscotch/arch_torus.h 673 673 *** src/src/libscotch/arch_torus.h 2008-05-22 06:44:41.000000000 -0700 674 --- new/src/libscotch/arch_torus.h 2010-0 3-03 14:06:15.257926206 -0800674 --- new/src/libscotch/arch_torus.h 2010-04-06 15:51:57.590253427 -0700 675 675 *************** 676 676 *** 96,102 **** … … 703 703 diff -rc src/src/libscotch/common.c new/src/libscotch/common.c 704 704 *** src/src/libscotch/common.c 2008-05-22 06:44:41.000000000 -0700 705 --- new/src/libscotch/common.c 2010-0 3-03 14:06:15.263926208 -0800705 --- new/src/libscotch/common.c 2010-04-06 15:51:57.597253436 -0700 706 706 *************** 707 707 *** 100,106 **** … … 722 722 diff -rc src/src/libscotch/common.h new/src/libscotch/common.h 723 723 *** src/src/libscotch/common.h 2009-02-06 14:20:55.000000000 -0800 724 --- new/src/libscotch/common.h 2010-0 3-03 14:06:15.270926211 -0800724 --- new/src/libscotch/common.h 2010-04-06 15:51:57.604253444 -0700 725 725 *************** 726 726 *** 66,71 **** … … 758 758 diff -rc src/src/libscotch/dummysizes.c new/src/libscotch/dummysizes.c 759 759 *** src/src/libscotch/dummysizes.c 2009-05-09 16:08:02.000000000 -0700 760 --- new/src/libscotch/dummysizes.c 2010-0 3-03 14:06:15.276926213 -0800760 --- new/src/libscotch/dummysizes.c 2010-04-06 15:51:57.611253453 -0700 761 761 *************** 762 762 *** 267,271 **** … … 771 771 diff -rc src/src/libscotch/graph.c new/src/libscotch/graph.c 772 772 *** src/src/libscotch/graph.c 2008-05-22 06:44:42.000000000 -0700 773 --- new/src/libscotch/graph.c 2010-0 3-03 14:06:15.283926216 -0800773 --- new/src/libscotch/graph.c 2010-04-06 15:51:57.618253461 -0700 774 774 *************** 775 775 *** 135,141 **** … … 794 794 diff -rc src/src/libscotch/graph.h new/src/libscotch/graph.h 795 795 *** src/src/libscotch/graph.h 2008-06-01 02:49:11.000000000 -0700 796 --- new/src/libscotch/graph.h 2010-0 3-03 14:06:15.289926218 -0800796 --- new/src/libscotch/graph.h 2010-04-06 15:51:57.624253469 -0700 797 797 *************** 798 798 *** 159,165 **** … … 811 811 diff -rc src/src/libscotch/graph_io.c new/src/libscotch/graph_io.c 812 812 *** src/src/libscotch/graph_io.c 2008-05-22 06:44:42.000000000 -0700 813 --- new/src/libscotch/graph_io.c 2010-0 3-03 14:06:15.297926222 -0800813 --- new/src/libscotch/graph_io.c 2010-04-06 15:51:57.632253478 -0700 814 814 *************** 815 815 *** 86,92 **** … … 1049 1049 diff -rc src/src/libscotch/graph_io_scot.c new/src/libscotch/graph_io_scot.c 1050 1050 *** src/src/libscotch/graph_io_scot.c 2008-05-22 06:44:42.000000000 -0700 1051 --- new/src/libscotch/graph_io_scot.c 2010-0 3-03 14:06:15.304926224 -08001051 --- new/src/libscotch/graph_io_scot.c 2010-04-06 15:51:57.638253486 -0700 1052 1052 *************** 1053 1053 *** 89,95 **** … … 1066 1066 diff -rc src/src/libscotch/library_arch.c new/src/libscotch/library_arch.c 1067 1067 *** src/src/libscotch/library_arch.c 2008-05-22 06:44:42.000000000 -0700 1068 --- new/src/libscotch/library_arch.c 2010-0 3-03 14:06:15.310926227 -08001068 --- new/src/libscotch/library_arch.c 2010-04-06 15:51:57.644253493 -0700 1069 1069 *************** 1070 1070 *** 120,128 **** … … 1101 1101 diff -rc src/src/libscotch/library_arch_f.c new/src/libscotch/library_arch_f.c 1102 1102 *** src/src/libscotch/library_arch_f.c 2008-05-22 06:44:42.000000000 -0700 1103 --- new/src/libscotch/library_arch_f.c 2010-0 3-03 14:06:15.317926230 -08001103 --- new/src/libscotch/library_arch_f.c 2010-04-06 15:51:57.651253502 -0700 1104 1104 *************** 1105 1105 *** 121,127 **** … … 1118 1118 diff -rc src/src/libscotch/library_error_exit.c new/src/libscotch/library_error_exit.c 1119 1119 *** src/src/libscotch/library_error_exit.c 2009-01-20 00:36:33.000000000 -0800 1120 --- new/src/libscotch/library_error_exit.c 2010-0 3-03 14:06:15.323926232 -08001120 --- new/src/libscotch/library_error_exit.c 2010-04-06 15:51:57.657253509 -0700 1121 1121 *************** 1122 1122 *** 114,119 **** … … 1193 1193 diff -rc src/src/libscotch/library_graph.c new/src/libscotch/library_graph.c 1194 1194 *** src/src/libscotch/library_graph.c 2008-05-22 07:28:12.000000000 -0700 1195 --- new/src/libscotch/library_graph.c 2010-0 3-03 14:06:15.329926234 -08001195 --- new/src/libscotch/library_graph.c 2010-04-06 15:51:57.664253518 -0700 1196 1196 *************** 1197 1197 *** 137,143 **** … … 1238 1238 diff -rc src/src/libscotch/library_graph_f.c new/src/libscotch/library_graph_f.c 1239 1239 *** src/src/libscotch/library_graph_f.c 2008-05-22 06:44:43.000000000 -0700 1240 --- new/src/libscotch/library_graph_f.c 2010-0 3-03 14:06:15.336926237 -08001240 --- new/src/libscotch/library_graph_f.c 2010-04-06 15:51:57.671253526 -0700 1241 1241 *************** 1242 1242 *** 136,142 **** … … 1255 1255 diff -rc src/src/libscotch/library_graph_map.c new/src/libscotch/library_graph_map.c 1256 1256 *** src/src/libscotch/library_graph_map.c 2008-09-28 04:04:05.000000000 -0700 1257 --- new/src/libscotch/library_graph_map.c 2010-0 3-03 14:06:15.343926240 -08001257 --- new/src/libscotch/library_graph_map.c 2010-04-06 15:51:57.678253535 -0700 1258 1258 *************** 1259 1259 *** 182,192 **** … … 1280 1280 diff -rc src/src/libscotch/library_graph_map_f.c new/src/libscotch/library_graph_map_f.c 1281 1281 *** src/src/libscotch/library_graph_map_f.c 2008-06-28 03:44:26.000000000 -0700 1282 --- new/src/libscotch/library_graph_map_f.c 2010-0 3-03 14:06:15.349926242 -08001282 --- new/src/libscotch/library_graph_map_f.c 2010-04-06 15:51:57.684253542 -0700 1283 1283 *************** 1284 1284 *** 183,189 **** … … 1297 1297 diff -rc src/src/libscotch/library.h new/src/libscotch/library.h 1298 1298 *** src/src/libscotch/library.h 2009-05-09 16:08:03.000000000 -0700 1299 --- new/src/libscotch/library.h 2010-0 3-03 14:06:15.356926245 -08001299 --- new/src/libscotch/library.h 2010-04-06 15:51:57.691253550 -0700 1300 1300 *************** 1301 1301 *** 134,140 **** … … 1342 1342 diff -rc src/src/libscotch/Makefile new/src/libscotch/Makefile 1343 1343 *** src/src/libscotch/Makefile 2009-05-09 16:08:04.000000000 -0700 1344 --- new/src/libscotch/Makefile 2010-0 3-03 14:41:00.434722658 -08001344 --- new/src/libscotch/Makefile 2010-04-06 15:51:57.700253561 -0700 1345 1345 *************** 1346 1346 *** 49,55 **** … … 1381 1381 diff -rc src/src/libscotch/mapping.h new/src/libscotch/mapping.h 1382 1382 *** src/src/libscotch/mapping.h 2008-10-27 08:27:47.000000000 -0700 1383 --- new/src/libscotch/mapping.h 2010-0 3-03 14:06:15.371926251 -08001383 --- new/src/libscotch/mapping.h 2010-04-06 15:51:57.708253571 -0700 1384 1384 *************** 1385 1385 *** 106,112 **** … … 1398 1398 diff -rc src/src/libscotch/mapping_io.c new/src/libscotch/mapping_io.c 1399 1399 *** src/src/libscotch/mapping_io.c 2008-05-22 06:44:43.000000000 -0700 1400 --- new/src/libscotch/mapping_io.c 2010-0 3-03 14:06:15.377926253 -08001400 --- new/src/libscotch/mapping_io.c 2010-04-06 15:51:57.714253579 -0700 1401 1401 *************** 1402 1402 *** 199,204 **** … … 1487 1487 diff -rc src/src/libscotch/mesh_io_scot.c new/src/libscotch/mesh_io_scot.c 1488 1488 *** src/src/libscotch/mesh_io_scot.c 2008-05-22 06:44:43.000000000 -0700 1489 --- new/src/libscotch/mesh_io_scot.c 2010-0 3-03 14:06:15.384926256 -08001489 --- new/src/libscotch/mesh_io_scot.c 2010-04-06 15:51:57.721253587 -0700 1490 1490 *************** 1491 1491 *** 85,91 **** … … 1504 1504 diff -rc src/src/Makefile new/src/Makefile 1505 1505 *** src/src/Makefile 2008-09-15 05:50:51.000000000 -0700 1506 --- new/src/Makefile 2010-0 3-03 14:06:15.389926258 -08001506 --- new/src/Makefile 2010-04-06 15:51:57.728253596 -0700 1507 1507 *************** 1508 1508 *** 97,102 **** … … 1520 1520 Only in new/src: Makefile.inc 1521 1521 Only in new/src/scotch: gmap_mex.c 1522 Only in new/src/scotch: gmap_mex_save.c 1523 Only in new/src/scotch: gmapx.c 1522 1524 diff -rc src/src/scotch/Makefile new/src/scotch/Makefile 1523 1525 *** src/src/scotch/Makefile 2009-04-27 02:19:43.000000000 -0700 1524 --- new/src/scotch/Makefile 2010-0 3-03 14:06:15.395926260 -08001526 --- new/src/scotch/Makefile 2010-04-22 15:56:37.518839458 -0700 1525 1527 *************** 1526 1528 *** 49,59 **** … … 1553 1555 *************** 1554 1556 *** 94,99 **** 1555 --- 97,10 6----1557 --- 97,108 ---- 1556 1558 dgscat$(EXE) \ 1557 1559 dgtst$(EXE) 1558 1560 1559 1561 + mexscotch : clean 1560 + $(MAKE) CFLAGS="$(CFLAGS) -DMATLAB -I${MATLAB_DIR}/extern/include" CC="$(CCS)" LDFLAGS="$(LDFLAGS) -Wl,-rpath-link,${MATLAB_DIR}/bin/glnxa64 -L${MATLAB_DIR}/bin/glnxa64 -lmex -lmat" SCOTCHLIB=scotch \ 1562 + $(MAKE) CFLAGS="$(CFLAGS) -DMATLAB -I${MATLAB_DIR}/extern/include" CC="$(CCS)" CCD="$(CCS)" LDFLAGS="$(LDFLAGS) -Wl,-rpath-link,${MATLAB_DIR}/bin/glnxa64 -L${MATLAB_DIR}/bin/glnxa64 -lmex -lmat" SCOTCHLIB=scotch \ 1563 + gmapx$(OBJ) 1564 + $(MAKE) CFLAGS="$(CFLAGS) -DMATLAB -I${MATLAB_DIR}/extern/include" CC="$(CCS)" LDFLAGS="$(LDFLAGS) -Wl,-rpath-link,${MATLAB_DIR}/bin/glnxa64 -L${MATLAB_DIR}/bin/glnxa64 -lmex -lmat gmapx$(OBJ)" SCOTCHLIB=scotch \ 1561 1565 + gmap_mex$(MEX) 1562 1566 + … … 1566 1570 *************** 1567 1571 *** 104,111 **** 1568 --- 11 1,122----1572 --- 113,124 ---- 1569 1573 -$(RM) $(bindir)/dgpart$(EXE) 1570 1574 -$(LN) $(bindir)/dgmap$(EXE) $(bindir)/dgpart$(EXE) … … 1581 1585 *************** 1582 1586 *** 365,367 **** 1583 --- 37 6,386 ----1587 --- 378,396 ---- 1584 1588 $(libdir)/libscotch$(LIB) \ 1585 1589 $(libdir)/libscotcherrexit$(LIB) \ 1586 1590 mtst.h 1591 + 1592 + gmapx$(OBJ) : gmapx.c \ 1593 + ../libscotch/module.h \ 1594 + ../libscotch/common.h \ 1595 + $(includedir)/scotch.h \ 1596 + $(libdir)/libscotch$(LIB) \ 1597 + $(libdir)/libscotcherrexit$(LIB) \ 1598 + gmap.h 1587 1599 + 1588 1600 + gmap_mex$(MEX) : gmap_mex.c \ … … 1593 1605 + $(libdir)/libscotcherrexit$(LIB) \ 1594 1606 + gmap.h 1607 Only in new/src/scotch: Makefile_save -
issm/trunk/externalpackages/scotch/scotch_jes_notes.txt
r3168 r3617 289 289 - separated dummysizes within mexscotch target in libscotch/Makefile so that it is built without the matlab flag, includes, and libraries (matlab 7.8 would fail even though matlab 7.6 was okay). 290 290 291 4/26/10: 292 293 - separated gmap_mex.c driver into gmap_mex.c matlab-layer (independent of scotch) and gmapx.c x-layer (independent of matlab). 294
Note:
See TracChangeset
for help on using the changeset viewer.