Changeset 4650
- Timestamp:
- 07/19/10 10:54:10 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/externalpackages/scotch/scotch.patch
r4629 r4650 1 Only in new4: bin 2 Only in new4: include 3 Only in new4: lib 4 diff -rc src/src/libscotch/arch.c new4/src/libscotch/arch.c 5 *** src/src/libscotch/arch.c 2008-09-27 07:48:01.000000000 -0700 6 --- new4/src/libscotch/arch.c 2010-05-03 15:37:55.104089848 -0700 7 *************** 8 *** 173,187 **** 9 int 10 archLoad ( 11 Arch * restrict const archptr, 12 ! FILE * const stream) 13 { 14 const ArchClass * restrict class; /* Pointer to architecture class */ 15 char name[256]; /* Architecture name string */ 16 17 if (fscanf (stream, "%255s", name) != 1) { /* Read architecture name */ 18 errorPrint ("archLoad: cannot load architecture type"); 19 return (1); 20 } 21 name[255] = '\0'; /* Set end of string */ 22 23 if ((class = archClass (name)) == NULL) { /* Get class from its name */ 24 --- 173,203 ---- 1 Only in src: bin 2 Only in src: include 3 Only in src: lib 4 diff -rc src/src/libscotch/arch.c old/src/libscotch/arch.c 5 *** src/src/libscotch/arch.c 2010-07-19 10:53:22.888731718 -0700 6 --- old/src/libscotch/arch.c 2008-09-27 07:48:01.000000000 -0700 7 *************** 8 *** 173,203 **** 25 9 int 26 10 archLoad ( … … 38 22 char name[256]; /* Architecture name string */ 39 23 40 +#ifdef MATLAB41 +printf("archLoad - stream=%p; archtyp=\"%s\"\n",stream,archtyp);42 +printf("archLoad - napar=%d,archpar=%p\n",napar,archpar);43 +#endif /* MATLAB */44 +45 +#ifndef MATLAB24 - #ifdef MATLAB 25 - printf("archLoad - stream=%p; archtyp=\"%s\"\n",stream,archtyp); 26 - printf("archLoad - napar=%d,archpar=%p\n",napar,archpar); 27 - #endif /* MATLAB */ 28 - 29 - #ifndef MATLAB 46 30 if (fscanf (stream, "%255s", name) != 1) { /* Read architecture name */ 47 31 errorPrint ("archLoad: cannot load architecture type"); 48 32 return (1); 49 33 } 50 +#else /* MATLAB */51 +strcpy(name,archtyp);52 +#endif /* MATLAB */34 - #else /* MATLAB */ 35 - strcpy(name,archtyp); 36 - #endif /* MATLAB */ 53 37 name[255] = '\0'; /* Set end of string */ 54 38 55 39 if ((class = archClass (name)) == NULL) { /* Get class from its name */ 56 *************** 57 *** 190,196 **** 58 --- 206,216 ---- 40 --- 173,187 ---- 41 int 42 archLoad ( 43 Arch * restrict const archptr, 44 ! FILE * const stream) 45 { 46 const ArchClass * restrict class; /* Pointer to architecture class */ 47 char name[256]; /* Architecture name string */ 48 49 if (fscanf (stream, "%255s", name) != 1) { /* Read architecture name */ 50 errorPrint ("archLoad: cannot load architecture type"); 51 return (1); 52 } 53 name[255] = '\0'; /* Set end of string */ 54 55 if ((class = archClass (name)) == NULL) { /* Get class from its name */ 56 *************** 57 *** 206,216 **** 59 58 } 60 59 61 60 if (class->archLoad != NULL) { /* If class has loading function */ 62 +#ifndef MATLAB61 - #ifndef MATLAB 63 62 if (class->archLoad (&archptr->data, stream) != 0) { /* Load class data */ 64 +#else /* MATLAB */65 +if (class->archLoad (&archptr->data, stream, napar, archpar) != 0) { /* Load class data */66 +#endif /* MATLAB */63 - #else /* MATLAB */ 64 - if (class->archLoad (&archptr->data, stream, napar, archpar) != 0) { /* Load class data */ 65 - #endif /* MATLAB */ 67 66 errorPrint ("archLoad: cannot load architecture data"); 68 67 memset (archptr, 0, sizeof (Arch)); /* Initialize architecture body */ 69 68 return (1); 70 diff -rc src/src/libscotch/arch_cmplt.c new4/src/libscotch/arch_cmplt.c 71 *** src/src/libscotch/arch_cmplt.c 2008-05-22 06:44:41.000000000 -0700 72 --- new4/src/libscotch/arch_cmplt.c 2010-05-03 15:37:55.111089854 -0700 73 *************** 74 *** 90,99 **** 75 int 76 archCmpltArchLoad ( 77 ArchCmplt * restrict const archptr, 78 ! FILE * restrict const stream) 79 { 80 long numnbr; 81 82 #ifdef SCOTCH_DEBUG_ARCH1 83 if ((sizeof (ArchCmplt) > sizeof (ArchDummy)) || 84 (sizeof (ArchCmpltDom) > sizeof (ArchDomDummy))) { 85 --- 90,109 ---- 69 --- 190,196 ---- 70 diff -rc src/src/libscotch/arch_cmplt.c old/src/libscotch/arch_cmplt.c 71 *** src/src/libscotch/arch_cmplt.c 2010-07-19 10:53:22.891731738 -0700 72 --- old/src/libscotch/arch_cmplt.c 2008-05-22 06:44:41.000000000 -0700 73 *************** 74 *** 90,109 **** 86 75 int 87 76 archCmpltArchLoad ( … … 97 86 long numnbr; 98 87 99 +#ifdef MATLAB100 +printf("archCmpltArchLoad - napar=%d,archpar=%p\n",napar,archpar);101 +#endif /* MATLAB */102 +88 - #ifdef MATLAB 89 - printf("archCmpltArchLoad - napar=%d,archpar=%p\n",napar,archpar); 90 - #endif /* MATLAB */ 91 - 103 92 #ifdef SCOTCH_DEBUG_ARCH1 104 93 if ((sizeof (ArchCmplt) > sizeof (ArchDummy)) || 105 94 (sizeof (ArchCmpltDom) > sizeof (ArchDomDummy))) { 106 *************** 107 *** 102,109 **** 108 --- 112,124 ---- 95 --- 90,99 ---- 96 int 97 archCmpltArchLoad ( 98 ArchCmplt * restrict const archptr, 99 ! FILE * restrict const stream) 100 { 101 long numnbr; 102 103 #ifdef SCOTCH_DEBUG_ARCH1 104 if ((sizeof (ArchCmplt) > sizeof (ArchDummy)) || 105 (sizeof (ArchCmpltDom) > sizeof (ArchDomDummy))) { 106 *************** 107 *** 112,124 **** 109 108 } 110 109 #endif /* SCOTCH_DEBUG_ARCH1 */ 111 110 112 +#ifndef MATLAB111 - #ifndef MATLAB 113 112 if ((fscanf (stream, "%ld", &numnbr) != 1) || 114 113 (numnbr < 1)) { 115 +#else /* MATLAB */116 +if ((napar < 1) ||117 +((numnbr=(long)archpar[0]) < 1)) {118 +#endif /* MATLAB */114 - #else /* MATLAB */ 115 - if ((napar < 1) || 116 - ((numnbr=(long)archpar[0]) < 1)) { 117 - #endif /* MATLAB */ 119 118 errorPrint ("archCmpltArchLoad: bad input"); 120 119 return (1); 121 120 } 122 diff -rc src/src/libscotch/arch_cmplt.h new4/src/libscotch/arch_cmplt.h 123 *** src/src/libscotch/arch_cmplt.h 2008-05-22 06:44:41.000000000 -0700 124 --- new4/src/libscotch/arch_cmplt.h 2010-05-03 15:37:55.118089860-0700125 *************** 126 *** 87,93****127 --- 87,97 ---- 121 --- 102,109 ---- 122 diff -rc src/src/libscotch/arch_cmplt.h old/src/libscotch/arch_cmplt.h 123 *** src/src/libscotch/arch_cmplt.h 2010-07-19 10:53:22.893731751 -0700 124 --- old/src/libscotch/arch_cmplt.h 2008-05-22 06:44:41.000000000 -0700 125 *************** 126 *** 87,97 **** 128 127 #define static 129 128 #endif 130 129 131 +#ifndef MATLAB130 - #ifndef MATLAB 132 131 int archCmpltArchLoad (ArchCmplt * restrict const, FILE * restrict const); 133 +#else /* MATLAB */134 +int archCmpltArchLoad (ArchCmplt * restrict const, FILE * restrict const, const Anum, const Anum *);135 +#endif /* MATLAB */132 - #else /* MATLAB */ 133 - int archCmpltArchLoad (ArchCmplt * restrict const, FILE * restrict const, const Anum, const Anum *); 134 - #endif /* MATLAB */ 136 135 int archCmpltArchSave (const ArchCmplt * const, FILE * restrict const); 137 136 #define archCmpltArchFree NULL 138 137 ArchDomNum archCmpltDomNum (const ArchCmplt * const, const ArchCmpltDom * const); 139 diff -rc src/src/libscotch/arch_cmpltw.c new4/src/libscotch/arch_cmpltw.c 140 *** src/src/libscotch/arch_cmpltw.c 2008-08-27 14:22:22.000000000 -0700 141 --- new4/src/libscotch/arch_cmpltw.c 2010-05-03 15:37:55.126089866 -0700 142 *************** 143 *** 200,211 **** 144 int 145 archCmpltwArchLoad ( 146 ArchCmpltw * restrict const archptr, 147 ! FILE * restrict const stream) 148 { 149 long vertnbr; 150 Gnum velosum; 151 Anum vertnum; 152 153 #ifdef SCOTCH_DEBUG_ARCH1 154 if ((sizeof (ArchCmpltw) > sizeof (ArchDummy)) || 155 (sizeof (ArchCmpltwDom) > sizeof (ArchDomDummy))) { 156 --- 200,221 ---- 138 --- 87,93 ---- 139 diff -rc src/src/libscotch/arch_cmpltw.c old/src/libscotch/arch_cmpltw.c 140 *** src/src/libscotch/arch_cmpltw.c 2010-07-19 10:53:22.896731770 -0700 141 --- old/src/libscotch/arch_cmpltw.c 2008-08-27 14:22:22.000000000 -0700 142 *************** 143 *** 200,221 **** 157 144 int 158 145 archCmpltwArchLoad ( … … 170 157 Anum vertnum; 171 158 172 +#ifdef MATLAB173 +printf("archCmpltwArchLoad - napar=%d,archpar=%p\n",napar,archpar);174 +#endif /* MATLAB */175 +159 - #ifdef MATLAB 160 - printf("archCmpltwArchLoad - napar=%d,archpar=%p\n",napar,archpar); 161 - #endif /* MATLAB */ 162 - 176 163 #ifdef SCOTCH_DEBUG_ARCH1 177 164 if ((sizeof (ArchCmpltw) > sizeof (ArchDummy)) || 178 165 (sizeof (ArchCmpltwDom) > sizeof (ArchDomDummy))) { 179 *************** 180 *** 214,221 **** 181 --- 224,236 ---- 166 --- 200,211 ---- 167 int 168 archCmpltwArchLoad ( 169 ArchCmpltw * restrict const archptr, 170 ! FILE * restrict const stream) 171 { 172 long vertnbr; 173 Gnum velosum; 174 Anum vertnum; 175 176 #ifdef SCOTCH_DEBUG_ARCH1 177 if ((sizeof (ArchCmpltw) > sizeof (ArchDummy)) || 178 (sizeof (ArchCmpltwDom) > sizeof (ArchDomDummy))) { 179 *************** 180 *** 224,236 **** 182 181 } 183 182 #endif /* SCOTCH_DEBUG_ARCH1 */ 184 183 185 +#ifndef MATLAB184 - #ifndef MATLAB 186 185 if ((fscanf (stream, "%ld", &vertnbr) != 1) || 187 186 (vertnbr < 1)) { 188 +#else /* MATLAB */189 +if ((napar < 1) ||190 +((vertnbr=(long)archpar[0]) < 1)) {191 +#endif /* MATLAB */187 - #else /* MATLAB */ 188 - if ((napar < 1) || 189 - ((vertnbr=(long)archpar[0]) < 1)) { 190 - #endif /* MATLAB */ 192 191 errorPrint ("archCmpltwArchLoad: bad input (1)"); 193 192 return (1); 194 193 } 195 *************** 196 *** 230,237****197 --- 245,257 ---- 194 --- 214,221 ---- 195 *************** 196 *** 245,257 **** 198 197 long veloval; 199 198 Gnum velotmp; 200 199 201 +#ifndef MATLAB200 - #ifndef MATLAB 202 201 if ((fscanf (stream, "%ld", &veloval) != 1) || 203 202 (veloval < 1)) { 204 +#else /* MATLAB */205 +if ((napar < 1+(vertnum+1)) ||206 +((veloval=(long)archpar[1+(vertnum+1)]) < 1)) {207 +#endif /* MATLAB */203 - #else /* MATLAB */ 204 - if ((napar < 1+(vertnum+1)) || 205 - ((veloval=(long)archpar[1+(vertnum+1)]) < 1)) { 206 - #endif /* MATLAB */ 208 207 errorPrint ("archCmpltwArchLoad: bad input (2)"); 209 208 return (1); 210 209 } 211 diff -rc src/src/libscotch/arch_cmpltw.h new4/src/libscotch/arch_cmpltw.h 212 *** src/src/libscotch/arch_cmpltw.h 2008-05-22 06:44:41.000000000 -0700 213 --- new4/src/libscotch/arch_cmpltw.h 2010-05-03 15:37:55.133089872-0700214 *************** 215 *** 86,92****216 --- 86,96 ---- 210 --- 230,237 ---- 211 diff -rc src/src/libscotch/arch_cmpltw.h old/src/libscotch/arch_cmpltw.h 212 *** src/src/libscotch/arch_cmpltw.h 2010-07-19 10:53:22.899731789 -0700 213 --- old/src/libscotch/arch_cmpltw.h 2008-05-22 06:44:41.000000000 -0700 214 *************** 215 *** 86,96 **** 217 216 #endif 218 217 219 218 int archCmpltwArchBuild (ArchCmpltw * restrict const archptr, const Gnum, const Gnum * restrict const); 220 +#ifndef MATLAB219 - #ifndef MATLAB 221 220 int archCmpltwArchLoad (ArchCmpltw * restrict const, FILE * restrict const); 222 +#else /* MATLAB */223 +int archCmpltwArchLoad (ArchCmpltw * restrict const, FILE * restrict const, const Anum, const Anum *);224 +#endif /* MATLAB */221 - #else /* MATLAB */ 222 - int archCmpltwArchLoad (ArchCmpltw * restrict const, FILE * restrict const, const Anum, const Anum *); 223 - #endif /* MATLAB */ 225 224 int archCmpltwArchSave (const ArchCmpltw * const, FILE * restrict const); 226 225 int archCmpltwArchFree (ArchCmpltw * restrict const); 227 226 ArchDomNum archCmpltwDomNum (const ArchCmpltw * const, const ArchCmpltwDom * const); 228 diff -rc src/src/libscotch/arch_deco.c new4/src/libscotch/arch_deco.c 229 *** src/src/libscotch/arch_deco.c 2008-09-28 06:35:27.000000000 -0700 230 --- new4/src/libscotch/arch_deco.c 2010-05-03 15:37:55.180089911 -0700 231 *************** 232 *** 211,217 **** 233 int 234 archDecoArchLoad ( 235 ArchDeco * restrict const archptr, 236 ! FILE * restrict const stream) 237 { 238 INT decotype; /* Type of decomposition */ 239 INT termdomnbr; /* Number of terminal domains (ie processors) */ 240 --- 211,223 ---- 227 --- 86,92 ---- 228 diff -rc src/src/libscotch/arch_deco.c old/src/libscotch/arch_deco.c 229 *** src/src/libscotch/arch_deco.c 2010-07-19 10:53:22.902731808 -0700 230 --- old/src/libscotch/arch_deco.c 2008-09-28 06:35:27.000000000 -0700 231 *************** 232 *** 211,223 **** 241 233 int 242 234 archDecoArchLoad ( … … 252 244 INT decotype; /* Type of decomposition */ 253 245 INT termdomnbr; /* Number of terminal domains (ie processors) */ 254 *************** 255 *** 220,225 **** 256 --- 226,237 ---- 246 --- 211,217 ---- 247 int 248 archDecoArchLoad ( 249 ArchDeco * restrict const archptr, 250 ! FILE * restrict const stream) 251 { 252 INT decotype; /* Type of decomposition */ 253 INT termdomnbr; /* Number of terminal domains (ie processors) */ 254 *************** 255 *** 226,237 **** 257 256 Anum * restrict termdisttab; /* Table of terminal-to-terminal distances */ 258 257 INT i, j; 259 258 260 +#ifdef MATLAB261 +printf("archDecoArchLoad - napar=%d,archpar=%p\n",napar,archpar);262 +errorPrint ("archDecoArchLoad - not yet converted to matlab matrices");263 +return (1);264 +#endif /* MATLAB */265 +259 - #ifdef MATLAB 260 - printf("archDecoArchLoad - napar=%d,archpar=%p\n",napar,archpar); 261 - errorPrint ("archDecoArchLoad - not yet converted to matlab matrices"); 262 - return (1); 263 - #endif /* MATLAB */ 264 - 266 265 #ifdef SCOTCH_DEBUG_ARCH1 267 266 if ((sizeof (ArchDeco) > sizeof (ArchDummy)) || 268 267 (sizeof (ArchDecoDom) > sizeof (ArchDomDummy))) { 269 diff -rc src/src/libscotch/arch_deco.h new4/src/libscotch/arch_deco.h 270 *** src/src/libscotch/arch_deco.h 2008-09-27 07:49:46.000000000 -0700 271 --- new4/src/libscotch/arch_deco.h 2010-05-03 15:37:55.187089917-0700272 *************** 273 *** 113,119****274 --- 113,123 ---- 268 --- 220,225 ---- 269 diff -rc src/src/libscotch/arch_deco.h old/src/libscotch/arch_deco.h 270 *** src/src/libscotch/arch_deco.h 2010-07-19 10:53:22.904731821 -0700 271 --- old/src/libscotch/arch_deco.h 2008-09-27 07:49:46.000000000 -0700 272 *************** 273 *** 113,123 **** 275 274 #endif 276 275 277 276 int archDecoArchBuild (ArchDeco * const, const Anum, const Anum, const ArchDecoTermVert * const, const Anum * const); 278 +#ifndef MATLAB277 - #ifndef MATLAB 279 278 int archDecoArchLoad (ArchDeco * const, FILE * restrict const); 280 +#else /* MATLAB */281 +int archDecoArchLoad (ArchDeco * const, FILE * restrict const, const Anum, const Anum *);282 +#endif /* MATLAB */279 - #else /* MATLAB */ 280 - int archDecoArchLoad (ArchDeco * const, FILE * restrict const, const Anum, const Anum *); 281 - #endif /* MATLAB */ 283 282 int archDecoArchSave (const ArchDeco * const, FILE * restrict const); 284 283 int archDecoArchFree (ArchDeco * const); 285 284 Anum archDecoArchSize (ArchDeco * const, const Anum); 286 diff -rc src/src/libscotch/arch.h new4/src/libscotch/arch.h 287 *** src/src/libscotch/arch.h 2009-04-28 08:11:27.000000000 -0700 288 --- new4/src/libscotch/arch.h 2010-05-03 15:37:55.194089922-0700289 *************** 290 *** 175,181****291 --- 175,185 ---- 285 --- 113,119 ---- 286 diff -rc src/src/libscotch/arch.h old/src/libscotch/arch.h 287 *** src/src/libscotch/arch.h 2010-07-19 10:53:22.907731841 -0700 288 --- old/src/libscotch/arch.h 2009-04-28 08:11:27.000000000 -0700 289 *************** 290 *** 175,185 **** 292 291 int archInit (Arch * restrict const); 293 292 int archExit (Arch * restrict const); 294 293 int archFree (Arch * restrict const); 295 +#ifndef MATLAB294 - #ifndef MATLAB 296 295 int archLoad (Arch * restrict const, FILE * const); 297 +#else /* MATLAB */298 +int archLoad (Arch * restrict const, FILE * const, const char *, const Anum, const Anum *);299 +#endif /* MATLAB */296 - #else /* MATLAB */ 297 - int archLoad (Arch * restrict const, FILE * const, const char *, const Anum, const Anum *); 298 - #endif /* MATLAB */ 300 299 int archSave (const Arch * const, FILE * const); 301 300 char * archName (const Arch * const); 302 301 const ArchClass * archClass (const char * const); 303 diff -rc src/src/libscotch/arch_hcub.c new4/src/libscotch/arch_hcub.c 304 *** src/src/libscotch/arch_hcub.c 2008-05-22 06:44:41.000000000 -0700 305 --- new4/src/libscotch/arch_hcub.c 2010-05-03 15:37:55.201089928 -0700 306 *************** 307 *** 88,95 **** 308 int 309 archHcubArchLoad ( 310 ArchHcub * restrict const archptr, 311 ! FILE * restrict const stream) 312 ! { 313 #ifdef SCOTCH_DEBUG_ARCH1 314 if ((sizeof (ArchHcub) > sizeof (ArchDummy)) || 315 (sizeof (ArchHcubDom) > sizeof (ArchDomDummy))) { 316 --- 88,105 ---- 302 --- 175,181 ---- 303 diff -rc src/src/libscotch/arch_hcub.c old/src/libscotch/arch_hcub.c 304 *** src/src/libscotch/arch_hcub.c 2010-07-19 10:53:22.910731860 -0700 305 --- old/src/libscotch/arch_hcub.c 2008-05-22 06:44:41.000000000 -0700 306 *************** 307 *** 88,105 **** 317 308 int 318 309 archHcubArchLoad ( … … 333 324 if ((sizeof (ArchHcub) > sizeof (ArchDummy)) || 334 325 (sizeof (ArchHcubDom) > sizeof (ArchDomDummy))) { 335 *************** 336 *** 98,105 **** 337 --- 108,120 ---- 326 --- 88,95 ---- 327 int 328 archHcubArchLoad ( 329 ArchHcub * restrict const archptr, 330 ! FILE * restrict const stream) 331 ! { 332 #ifdef SCOTCH_DEBUG_ARCH1 333 if ((sizeof (ArchHcub) > sizeof (ArchDummy)) || 334 (sizeof (ArchHcubDom) > sizeof (ArchDomDummy))) { 335 *************** 336 *** 108,120 **** 338 337 } 339 338 #endif /* SCOTCH_DEBUG_ARCH1 */ 340 339 341 +#ifndef MATLAB340 - #ifndef MATLAB 342 341 if ((intLoad (stream, &archptr->dimmax) != 1) || 343 342 (archptr->dimmax < 1) || 344 +#else /* MATLAB */345 +if ((napar < 1) ||346 +((archptr->dimmax=archpar[0]) < 1) ||347 +#endif /* MATLAB */343 - #else /* MATLAB */ 344 - if ((napar < 1) || 345 - ((archptr->dimmax=archpar[0]) < 1) || 346 - #endif /* MATLAB */ 348 347 (archptr->dimmax > (sizeof (archptr->dimmax) << 3))) { 349 348 errorPrint ("archHcubArchLoad: bad input"); 350 349 return (1); 351 diff -rc src/src/libscotch/arch_hcub.h new4/src/libscotch/arch_hcub.h 352 *** src/src/libscotch/arch_hcub.h 2008-05-22 06:44:41.000000000 -0700 353 --- new4/src/libscotch/arch_hcub.h 2010-05-03 15:37:55.208089934-0700354 *************** 355 *** 85,91****356 --- 85,95 ---- 350 --- 98,105 ---- 351 diff -rc src/src/libscotch/arch_hcub.h old/src/libscotch/arch_hcub.h 352 *** src/src/libscotch/arch_hcub.h 2010-07-19 10:53:22.912731873 -0700 353 --- old/src/libscotch/arch_hcub.h 2008-05-22 06:44:41.000000000 -0700 354 *************** 355 *** 85,95 **** 357 356 #define static 358 357 #endif 359 358 360 +#ifndef MATLAB359 - #ifndef MATLAB 361 360 int archHcubArchLoad (ArchHcub * restrict const, FILE * restrict const); 362 +#else /* MATLAB */363 +int archHcubArchLoad (ArchHcub * restrict const, FILE * restrict const, const Anum, const Anum *);364 +#endif /* MATLAB */361 - #else /* MATLAB */ 362 - int archHcubArchLoad (ArchHcub * restrict const, FILE * restrict const, const Anum, const Anum *); 363 - #endif /* MATLAB */ 365 364 int archHcubArchSave (const ArchHcub * const, FILE * restrict const); 366 365 #define archHcubArchFree NULL 367 366 ArchDomNum archHcubDomNum (const ArchHcub * const, const ArchHcubDom * const); 368 diff -rc src/src/libscotch/arch_mesh.c new4/src/libscotch/arch_mesh.c 369 *** src/src/libscotch/arch_mesh.c 2008-05-22 06:44:41.000000000 -0700 370 --- new4/src/libscotch/arch_mesh.c 2010-05-03 15:37:55.215089940 -0700 371 *************** 372 *** 96,103 **** 373 int 374 archMesh2ArchLoad ( 375 ArchMesh2 * restrict const archptr, 376 ! FILE * restrict const stream) 377 ! { 378 #ifdef SCOTCH_DEBUG_ARCH1 379 if ((sizeof (ArchMesh2) > sizeof (ArchDummy)) || 380 (sizeof (ArchMesh2Dom) > sizeof (ArchDomDummy))) { 381 --- 96,113 ---- 367 --- 85,91 ---- 368 diff -rc src/src/libscotch/arch_mesh.c old/src/libscotch/arch_mesh.c 369 *** src/src/libscotch/arch_mesh.c 2010-07-19 10:53:22.915731892 -0700 370 --- old/src/libscotch/arch_mesh.c 2008-05-22 06:44:41.000000000 -0700 371 *************** 372 *** 96,113 **** 382 373 int 383 374 archMesh2ArchLoad ( … … 398 389 if ((sizeof (ArchMesh2) > sizeof (ArchDummy)) || 399 390 (sizeof (ArchMesh2Dom) > sizeof (ArchDomDummy))) { 400 *************** 401 *** 106,114 **** 402 --- 116,130 ---- 391 --- 96,103 ---- 392 int 393 archMesh2ArchLoad ( 394 ArchMesh2 * restrict const archptr, 395 ! FILE * restrict const stream) 396 ! { 397 #ifdef SCOTCH_DEBUG_ARCH1 398 if ((sizeof (ArchMesh2) > sizeof (ArchDummy)) || 399 (sizeof (ArchMesh2Dom) > sizeof (ArchDomDummy))) { 400 *************** 401 *** 116,130 **** 403 402 } 404 403 #endif /* SCOTCH_DEBUG_ARCH1 */ 405 404 406 +#ifndef MATLAB405 - #ifndef MATLAB 407 406 if ((intLoad (stream, &archptr->c[0]) != 1) || 408 407 (intLoad (stream, &archptr->c[1]) != 1) || 409 408 (archptr->c[0] < 1) || (archptr->c[1] < 1)) { 410 +#else /* MATLAB */411 +if ((napar < 2) ||412 +((archptr->c[0]=archpar[0]) < 1) ||413 +((archptr->c[1]=archpar[1]) < 1)) {414 +#endif /* MATLAB */409 - #else /* MATLAB */ 410 - if ((napar < 2) || 411 - ((archptr->c[0]=archpar[0]) < 1) || 412 - ((archptr->c[1]=archpar[1]) < 1)) { 413 - #endif /* MATLAB */ 415 414 errorPrint ("archMesh2ArchLoad: bad input"); 416 415 return (1); 417 416 } 418 *************** 419 *** 421,428 **** 420 int 421 archMesh3ArchLoad ( 422 ArchMesh3 * restrict const archptr, 423 ! FILE * restrict const stream) 424 ! { 425 #ifdef SCOTCH_DEBUG_ARCH1 426 if ((sizeof (ArchMesh3) > sizeof (ArchDummy)) || 427 (sizeof (ArchMesh3Dom) > sizeof (ArchDomDummy))) { 428 --- 437,454 ---- 417 --- 106,114 ---- 418 *************** 419 *** 437,454 **** 429 420 int 430 421 archMesh3ArchLoad ( … … 445 436 if ((sizeof (ArchMesh3) > sizeof (ArchDummy)) || 446 437 (sizeof (ArchMesh3Dom) > sizeof (ArchDomDummy))) { 447 *************** 448 *** 431,440 **** 449 --- 457,473 ---- 438 --- 421,428 ---- 439 int 440 archMesh3ArchLoad ( 441 ArchMesh3 * restrict const archptr, 442 ! FILE * restrict const stream) 443 ! { 444 #ifdef SCOTCH_DEBUG_ARCH1 445 if ((sizeof (ArchMesh3) > sizeof (ArchDummy)) || 446 (sizeof (ArchMesh3Dom) > sizeof (ArchDomDummy))) { 447 *************** 448 *** 457,473 **** 450 449 } 451 450 #endif /* SCOTCH_DEBUG_ARCH1 */ 452 451 453 +#ifndef MATLAB452 - #ifndef MATLAB 454 453 if ((intLoad (stream, &archptr->c[0]) != 1) || 455 454 (intLoad (stream, &archptr->c[1]) != 1) || 456 455 (intLoad (stream, &archptr->c[2]) != 1) || 457 456 (archptr->c[0] < 1) || (archptr->c[1] < 1) || (archptr->c[2] < 1)) { 458 +#else /* MATLAB */459 +if ((napar < 3) ||460 +((archptr->c[0]=archpar[0]) < 1) ||461 +((archptr->c[1]=archpar[1]) < 1) ||462 +((archptr->c[2]=archpar[2]) < 1)) {463 +#endif /* MATLAB */457 - #else /* MATLAB */ 458 - if ((napar < 3) || 459 - ((archptr->c[0]=archpar[0]) < 1) || 460 - ((archptr->c[1]=archpar[1]) < 1) || 461 - ((archptr->c[2]=archpar[2]) < 1)) { 462 - #endif /* MATLAB */ 464 463 errorPrint ("archMesh3ArchLoad: bad input"); 465 464 return (1); 466 465 } 467 diff -rc src/src/libscotch/arch_mesh.h new4/src/libscotch/arch_mesh.h 468 *** src/src/libscotch/arch_mesh.h 2008-05-22 06:44:41.000000000 -0700 469 --- new4/src/libscotch/arch_mesh.h 2010-05-03 15:37:55.221089945-0700470 *************** 471 *** 96,102****472 --- 96,106 ---- 466 --- 431,440 ---- 467 diff -rc src/src/libscotch/arch_mesh.h old/src/libscotch/arch_mesh.h 468 *** src/src/libscotch/arch_mesh.h 2010-07-19 10:53:22.918731911 -0700 469 --- old/src/libscotch/arch_mesh.h 2008-05-22 06:44:41.000000000 -0700 470 *************** 471 *** 96,106 **** 473 472 #define static 474 473 #endif 475 474 476 +#ifndef MATLAB475 - #ifndef MATLAB 477 476 int archMesh2ArchLoad (ArchMesh2 * restrict const, FILE * restrict const); 478 +#else /* MATLAB */479 +int archMesh2ArchLoad (ArchMesh2 * restrict const, FILE * restrict const, const Anum, const Anum *);480 +#endif /* MATLAB */477 - #else /* MATLAB */ 478 - int archMesh2ArchLoad (ArchMesh2 * restrict const, FILE * restrict const, const Anum, const Anum *); 479 - #endif /* MATLAB */ 481 480 int archMesh2ArchSave (const ArchMesh2 * const, FILE * restrict const); 482 481 #define archMesh2ArchFree NULL 483 482 ArchDomNum archMesh2DomNum (const ArchMesh2 * const, const ArchMesh2Dom * const); 484 *************** 485 *** 114,120****486 --- 118,128 ---- 483 --- 96,102 ---- 484 *************** 485 *** 118,128 **** 487 486 int archMesh2DomMpiType (const ArchMesh2 * const, MPI_Datatype * const); 488 487 #endif /* SCOTCH_PTSCOTCH */ 489 488 490 +#ifndef MATLAB489 - #ifndef MATLAB 491 490 int archMesh3ArchLoad (ArchMesh3 * restrict const, FILE * restrict const); 492 +#else /* MATLAB */493 +int archMesh3ArchLoad (ArchMesh3 * restrict const, FILE * restrict const, const Anum, const Anum *);494 +#endif /* MATLAB */491 - #else /* MATLAB */ 492 - int archMesh3ArchLoad (ArchMesh3 * restrict const, FILE * restrict const, const Anum, const Anum *); 493 - #endif /* MATLAB */ 495 494 int archMesh3ArchSave (const ArchMesh3 * const, FILE * restrict const); 496 495 #define archMesh3ArchFree NULL 497 496 ArchDomNum archMesh3DomNum (const ArchMesh3 * const, const ArchMesh3Dom * const); 498 diff -rc src/src/libscotch/arch_tleaf.c new4/src/libscotch/arch_tleaf.c 499 *** src/src/libscotch/arch_tleaf.c 2008-05-22 06:44:41.000000000 -0700 500 --- new4/src/libscotch/arch_tleaf.c 2010-05-03 15:37:55.228089950 -0700 501 *************** 502 *** 92,99 **** 503 int 504 archTleafArchLoad ( 505 ArchTleaf * restrict const archptr, 506 ! FILE * restrict const stream) 507 ! { 508 #ifdef SCOTCH_DEBUG_ARCH1 509 if ((sizeof (ArchTleaf) > sizeof (ArchDummy)) || 510 (sizeof (ArchTleafDom) > sizeof (ArchDomDummy))) { 511 --- 92,109 ---- 497 --- 114,120 ---- 498 diff -rc src/src/libscotch/arch_tleaf.c old/src/libscotch/arch_tleaf.c 499 *** src/src/libscotch/arch_tleaf.c 2010-07-19 10:53:22.920731924 -0700 500 --- old/src/libscotch/arch_tleaf.c 2008-05-22 06:44:41.000000000 -0700 501 *************** 502 *** 92,109 **** 512 503 int 513 504 archTleafArchLoad ( … … 528 519 if ((sizeof (ArchTleaf) > sizeof (ArchDummy)) || 529 520 (sizeof (ArchTleafDom) > sizeof (ArchDomDummy))) { 530 *************** 531 *** 102,107 **** 532 --- 112,118 ---- 521 --- 92,99 ---- 522 int 523 archTleafArchLoad ( 524 ArchTleaf * restrict const archptr, 525 ! FILE * restrict const stream) 526 ! { 527 #ifdef SCOTCH_DEBUG_ARCH1 528 if ((sizeof (ArchTleaf) > sizeof (ArchDummy)) || 529 (sizeof (ArchTleafDom) > sizeof (ArchDomDummy))) { 530 *************** 531 *** 112,118 **** 533 532 } 534 533 #endif /* SCOTCH_DEBUG_ARCH1 */ 535 534 536 +#ifndef MATLAB535 - #ifndef MATLAB 537 536 if ((intLoad (stream, &archptr->leafdep) != 1) || 538 537 (intLoad (stream, &archptr->clusdep) != 1) || 539 538 (intLoad (stream, &archptr->linkval) != 1) || 540 *************** 541 *** 109,114****542 --- 120,132 ---- 539 --- 102,107 ---- 540 *************** 541 *** 120,132 **** 543 542 (archptr->clusdep < 0) || 544 543 (archptr->clusdep > archptr->leafdep) || 545 544 (archptr->linkval < 1)) { 546 +#else /* MATLAB */547 +if ((napar < 3) ||548 +((archptr->leafdep=archpar[0]) < 1) ||549 +((archptr->clusdep=archpar[1]) < 0) ||550 +( archptr->clusdep > archptr->leafdep) ||551 +((archptr->linkval=archpar[2]) < 1)) {552 +#endif /* MATLAB */545 - #else /* MATLAB */ 546 - if ((napar < 3) || 547 - ((archptr->leafdep=archpar[0]) < 1) || 548 - ((archptr->clusdep=archpar[1]) < 0) || 549 - ( archptr->clusdep > archptr->leafdep) || 550 - ((archptr->linkval=archpar[2]) < 1)) { 551 - #endif /* MATLAB */ 553 552 errorPrint ("archTleafArchLoad: bad input"); 554 553 return (1); 555 554 } 556 diff -rc src/src/libscotch/arch_tleaf.h new4/src/libscotch/arch_tleaf.h 557 *** src/src/libscotch/arch_tleaf.h 2008-05-22 06:44:41.000000000 -0700 558 --- new4/src/libscotch/arch_tleaf.h 2010-05-03 15:37:55.235089956-0700559 *************** 560 *** 89,95****561 --- 89,99 ---- 555 --- 109,114 ---- 556 diff -rc src/src/libscotch/arch_tleaf.h old/src/libscotch/arch_tleaf.h 557 *** src/src/libscotch/arch_tleaf.h 2010-07-19 10:53:22.923731944 -0700 558 --- old/src/libscotch/arch_tleaf.h 2008-05-22 06:44:41.000000000 -0700 559 *************** 560 *** 89,99 **** 562 561 #define static 563 562 #endif 564 563 565 +#ifndef MATLAB564 - #ifndef MATLAB 566 565 int archTleafArchLoad (ArchTleaf * restrict const, FILE * restrict const); 567 +#else /* MATLAB */568 +int archTleafArchLoad (ArchTleaf * restrict const, FILE * restrict const, const Anum, const Anum *);569 +#endif /* MATLAB */566 - #else /* MATLAB */ 567 - int archTleafArchLoad (ArchTleaf * restrict const, FILE * restrict const, const Anum, const Anum *); 568 - #endif /* MATLAB */ 570 569 int archTleafArchSave (const ArchTleaf * const, FILE * restrict const); 571 570 #define archTleafArchFree NULL 572 571 ArchDomNum archTleafDomNum (const ArchTleaf * const, const ArchTleafDom * const); 573 diff -rc src/src/libscotch/arch_torus.c new4/src/libscotch/arch_torus.c 574 *** src/src/libscotch/arch_torus.c 2008-05-22 06:44:41.000000000 -0700 575 --- new4/src/libscotch/arch_torus.c 2010-05-03 15:37:55.242089962 -0700 576 *************** 577 *** 90,97 **** 578 int 579 archTorus2ArchLoad ( 580 ArchTorus2 * restrict const archptr, 581 ! FILE * restrict const stream) 582 ! { 583 #ifdef SCOTCH_DEBUG_ARCH1 584 if ((sizeof (ArchTorus2) > sizeof (ArchDummy)) || 585 (sizeof (ArchTorus2Dom) > sizeof (ArchDomDummy))) { 586 --- 90,107 ---- 572 --- 89,95 ---- 573 diff -rc src/src/libscotch/arch_torus.c old/src/libscotch/arch_torus.c 574 *** src/src/libscotch/arch_torus.c 2010-07-19 10:53:22.926731963 -0700 575 --- old/src/libscotch/arch_torus.c 2008-05-22 06:44:41.000000000 -0700 576 *************** 577 *** 90,107 **** 587 578 int 588 579 archTorus2ArchLoad ( … … 603 594 if ((sizeof (ArchTorus2) > sizeof (ArchDummy)) || 604 595 (sizeof (ArchTorus2Dom) > sizeof (ArchDomDummy))) { 605 *************** 606 *** 100,108 **** 607 --- 110,124 ---- 596 --- 90,97 ---- 597 int 598 archTorus2ArchLoad ( 599 ArchTorus2 * restrict const archptr, 600 ! FILE * restrict const stream) 601 ! { 602 #ifdef SCOTCH_DEBUG_ARCH1 603 if ((sizeof (ArchTorus2) > sizeof (ArchDummy)) || 604 (sizeof (ArchTorus2Dom) > sizeof (ArchDomDummy))) { 605 *************** 606 *** 110,124 **** 608 607 } 609 608 #endif /* SCOTCH_DEBUG_ARCH1 */ 610 609 611 +#ifndef MATLAB610 - #ifndef MATLAB 612 611 if ((intLoad (stream, &archptr->c[0]) != 1) || 613 612 (intLoad (stream, &archptr->c[1]) != 1) || 614 613 (archptr->c[0] < 1) || (archptr->c[1] < 1)) { 615 +#else /* MATLAB */616 +if ((napar < 2) ||617 +((archptr->c[0]=archpar[0]) < 1) ||618 +((archptr->c[1]=archpar[1]) < 1)) {619 +#endif /* MATLAB */614 - #else /* MATLAB */ 615 - if ((napar < 2) || 616 - ((archptr->c[0]=archpar[0]) < 1) || 617 - ((archptr->c[1]=archpar[1]) < 1)) { 618 - #endif /* MATLAB */ 620 619 errorPrint ("archTorus2ArchLoad: bad input"); 621 620 return (1); 622 621 } 623 *************** 624 *** 363,370 **** 625 int 626 archTorus3ArchLoad ( 627 ArchTorus3 * restrict const archptr, 628 ! FILE * restrict const stream) 629 ! { 630 #ifdef SCOTCH_DEBUG_ARCH1 631 if ((sizeof (ArchTorus3) > sizeof (ArchDummy)) || 632 (sizeof (ArchTorus3Dom) > sizeof (ArchDomDummy))) { 633 --- 379,396 ---- 622 --- 100,108 ---- 623 *************** 624 *** 379,396 **** 634 625 int 635 626 archTorus3ArchLoad ( … … 650 641 if ((sizeof (ArchTorus3) > sizeof (ArchDummy)) || 651 642 (sizeof (ArchTorus3Dom) > sizeof (ArchDomDummy))) { 652 *************** 653 *** 373,382 **** 654 --- 399,415 ---- 643 --- 363,370 ---- 644 int 645 archTorus3ArchLoad ( 646 ArchTorus3 * restrict const archptr, 647 ! FILE * restrict const stream) 648 ! { 649 #ifdef SCOTCH_DEBUG_ARCH1 650 if ((sizeof (ArchTorus3) > sizeof (ArchDummy)) || 651 (sizeof (ArchTorus3Dom) > sizeof (ArchDomDummy))) { 652 *************** 653 *** 399,415 **** 655 654 } 656 655 #endif /* SCOTCH_DEBUG_ARCH1 */ 657 656 658 +#ifndef MATLAB657 - #ifndef MATLAB 659 658 if ((intLoad (stream, &archptr->c[0]) != 1) || 660 659 (intLoad (stream, &archptr->c[1]) != 1) || 661 660 (intLoad (stream, &archptr->c[2]) != 1) || 662 661 (archptr->c[0] < 1) || (archptr->c[1] < 1) || (archptr->c[2] < 1)) { 663 +#else /* MATLAB */664 +if ((napar < 3) ||665 +((archptr->c[0]=archpar[0]) < 1) ||666 +((archptr->c[1]=archpar[1]) < 1) ||667 +((archptr->c[2]=archpar[2]) < 1)) {668 +#endif /* MATLAB */662 - #else /* MATLAB */ 663 - if ((napar < 3) || 664 - ((archptr->c[0]=archpar[0]) < 1) || 665 - ((archptr->c[1]=archpar[1]) < 1) || 666 - ((archptr->c[2]=archpar[2]) < 1)) { 667 - #endif /* MATLAB */ 669 668 errorPrint ("archTorus3ArchLoad: bad input"); 670 669 return (1); 671 670 } 672 diff -rc src/src/libscotch/arch_torus.h new4/src/libscotch/arch_torus.h 673 *** src/src/libscotch/arch_torus.h 2008-05-22 06:44:41.000000000 -0700 674 --- new4/src/libscotch/arch_torus.h 2010-05-03 15:37:55.248089967-0700675 *************** 676 *** 96,102****677 --- 96,106 ---- 671 --- 373,382 ---- 672 diff -rc src/src/libscotch/arch_torus.h old/src/libscotch/arch_torus.h 673 *** src/src/libscotch/arch_torus.h 2010-07-19 10:53:22.928731976 -0700 674 --- old/src/libscotch/arch_torus.h 2008-05-22 06:44:41.000000000 -0700 675 *************** 676 *** 96,106 **** 678 677 #define static 679 678 #endif 680 679 681 +#ifndef MATLAB680 - #ifndef MATLAB 682 681 int archTorus2ArchLoad (ArchTorus2 * restrict const, FILE * restrict const); 683 +#else /* MATLAB */684 +int archTorus2ArchLoad (ArchTorus2 * restrict const, FILE * restrict const, const Anum, const Anum *);685 +#endif /* MATLAB */682 - #else /* MATLAB */ 683 - int archTorus2ArchLoad (ArchTorus2 * restrict const, FILE * restrict const, const Anum, const Anum *); 684 - #endif /* MATLAB */ 686 685 int archTorus2ArchSave (const ArchTorus2 * const, FILE * restrict const); 687 686 #define archTorus2ArchFree NULL 688 687 ArchDomNum archTorus2DomNum (const ArchTorus2 * const, const ArchTorus2Dom * const); 689 *************** 690 *** 114,120****691 --- 118,128 ---- 688 --- 96,102 ---- 689 *************** 690 *** 118,128 **** 692 691 int archTorus2DomMpiType (const ArchTorus2 * const, MPI_Datatype * const); 693 692 #endif /* SCOTCH_PTSCOTCH */ 694 693 695 +#ifndef MATLAB694 - #ifndef MATLAB 696 695 int archTorus3ArchLoad (ArchTorus3 * restrict const, FILE * restrict const); 697 +#else /* MATLAB */698 +int archTorus3ArchLoad (ArchTorus3 * restrict const, FILE * restrict const, const Anum, const Anum *);699 +#endif /* MATLAB */696 - #else /* MATLAB */ 697 - int archTorus3ArchLoad (ArchTorus3 * restrict const, FILE * restrict const, const Anum, const Anum *); 698 - #endif /* MATLAB */ 700 699 int archTorus3ArchSave (const ArchTorus3 * const, FILE * restrict const); 701 700 #define archTorus3ArchFree NULL 702 701 ArchDomNum archTorus3DomNum (const ArchTorus3 * const, const ArchTorus3Dom * const); 703 diff -rc src/src/libscotch/common.c new4/src/libscotch/common.c 704 *** src/src/libscotch/common.c 2008-05-22 06:44:41.000000000 -0700 705 --- new4/src/libscotch/common.c 2010-05-03 15:37:55.254089972-0700706 *************** 707 *** 100,106****708 --- 100,112 ---- 702 --- 114,120 ---- 703 diff -rc src/src/libscotch/common.c old/src/libscotch/common.c 704 *** src/src/libscotch/common.c 2010-07-19 10:53:22.931731995 -0700 705 --- old/src/libscotch/common.c 2008-05-22 06:44:41.000000000 -0700 706 *************** 707 *** 100,112 **** 709 708 { 710 709 const char ** cptr; 711 710 712 +#ifndef MATLAB711 - #ifndef MATLAB 713 712 fprintf (stream, "Usage is:\n"); 714 713 for (cptr = data; *cptr != NULL; cptr ++) 715 714 fprintf (stream, " %s\n", *cptr); 716 +#else /* MATLAB */717 +mexPrintf ("Usage is:\n");718 +for (cptr = data; *cptr != NULL; cptr ++)719 +mexPrintf (" %s\n", *cptr);720 +#endif /* MATLAB */715 - #else /* MATLAB */ 716 - mexPrintf ("Usage is:\n"); 717 - for (cptr = data; *cptr != NULL; cptr ++) 718 - mexPrintf (" %s\n", *cptr); 719 - #endif /* MATLAB */ 721 720 } 722 diff -rc src/src/libscotch/common.h new4/src/libscotch/common.h 723 *** src/src/libscotch/common.h 2009-02-06 14:20:55.000000000 -0800 724 --- new4/src/libscotch/common.h 2010-05-03 15:37:55.261089978 -0700725 *************** 726 *** 66,71****727 --- 66,72 ---- 721 --- 100,106 ---- 722 diff -rc src/src/libscotch/common.h old/src/libscotch/common.h 723 *** src/src/libscotch/common.h 2010-07-19 10:53:22.933732008 -0700 724 --- old/src/libscotch/common.h 2009-02-06 14:20:55.000000000 -0800 725 *************** 726 *** 66,72 **** 728 727 #include <stdio.h> 729 728 #include <stdarg.h> 730 729 #include <stdlib.h> 731 +#include <stdint.h> /* added for intptr_t */730 - #include <stdint.h> /* added for intptr_t */ 732 731 #ifdef HAVE_MALLOC_H 733 732 #include <malloc.h> /* Deprecated, but required on some old systems */ 734 733 #endif /* HAVE_MALLOC_H */ 735 *************** 736 *** 88,93****737 --- 89,108 ---- 734 --- 66,71 ---- 735 *************** 736 *** 89,108 **** 738 737 #include <pthread.h> 739 738 #endif /* ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD)) */ 740 739 741 +#ifdef MATLAB742 +#include "mat.h"743 +#include "mex.h"744 +#include "matrix.h"745 +746 +#define printf mexPrintf747 +#define fprintf(file,...) (file == stdout || file == stderr ? mexPrintf(__VA_ARGS__) : fprintf(file,__VA_ARGS__))748 +#define malloc mxMalloc749 +#define calloc mxCalloc750 +#define realloc mxRealloc751 +#define free mxFree752 +#define exit(status) mexErrMsgTxt("exit=" #status)753 +#endif754 +740 - #ifdef MATLAB 741 - #include "mat.h" 742 - #include "mex.h" 743 - #include "matrix.h" 744 - 745 - #define printf mexPrintf 746 - #define fprintf(file,...) (file == stdout || file == stderr ? mexPrintf(__VA_ARGS__) : fprintf(file,__VA_ARGS__)) 747 - #define malloc mxMalloc 748 - #define calloc mxCalloc 749 - #define realloc mxRealloc 750 - #define free mxFree 751 - #define exit(status) mexErrMsgTxt("exit=" #status) 752 - #endif 753 - 755 754 /* 756 755 ** Working definitions. 757 756 */ 758 *************** 759 *** 209,214****760 --- 224,230 ---- 757 --- 88,93 ---- 758 *************** 759 *** 224,230 **** 761 760 int intSave (FILE * const, const INT); 762 761 void intAscn (INT * const, const INT, const INT); 763 762 void intPerm (INT * const, const INT); 764 +void intRandResetStatic (void);763 - void intRandResetStatic (void); 765 764 void intRandReset (void); 766 765 void intRandInit (void); 767 766 INT intRandVal (INT); 768 diff -rc src/src/libscotch/common_integer.c new4/src/libscotch/common_integer.c 769 *** src/src/libscotch/common_integer.c 2009-01-21 01:32:32.000000000 -0800 770 --- new4/src/libscotch/common_integer.c 2010-05-03 15:37:55.268089983-0700771 *************** 772 *** 191,196****773 --- 191,205 ---- 767 --- 209,214 ---- 768 diff -rc src/src/libscotch/common_integer.c old/src/libscotch/common_integer.c 769 *** src/src/libscotch/common_integer.c 2010-07-19 10:53:22.936732027 -0700 770 --- old/src/libscotch/common_integer.c 2009-01-21 01:32:32.000000000 -0800 771 *************** 772 *** 191,205 **** 774 773 static volatile int intrandflag = 0; /*+ Flag set if generator already initialized +*/ 775 774 static unsigned int intrandseed = 1; /*+ Random seed +*/ 776 775 777 +void778 +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 +776 - void 777 - intRandResetStatic (void) 778 - { 779 - printf("intRandResetStatic begin -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed); 780 - intrandflag = 0; /*+ Flag set if generator already initialized +*/ 781 - intrandseed = 1; /*+ Random seed +*/ 782 - printf("intRandResetStatic end -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed); 783 - } 784 - 786 785 /* This routine initializes the pseudo-random 787 786 ** generator if necessary. In order for multi-sequential 788 787 ** programs to have exactly the same behavior on any 789 *************** 790 *** 205,210****791 --- 214,220 ---- 788 --- 191,196 ---- 789 *************** 790 *** 214,220 **** 792 791 void 793 792 intRandInit (void) 794 793 { 795 +printf("intRandInit begin -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed);794 - printf("intRandInit begin -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed); 796 795 if (intrandflag == 0) { /* If generator not yet initialized */ 797 796 #if ! ((defined COMMON_DEBUG) || (defined COMMON_RANDOM_FIXED_SEED) || (defined SCOTCH_DETERMINISTIC)) 798 797 intrandseed = time (NULL); /* Set random seed if needed */ 799 *************** 800 *** 216,221****801 --- 226,232 ---- 798 --- 205,210 ---- 799 *************** 800 *** 226,232 **** 802 801 #endif /* COMMON_RANDOM_RAND */ 803 802 intrandflag = 1; /* Generator has been initialized */ 804 803 } 805 +printf("intRandInit end -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed);804 - printf("intRandInit end -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed); 806 805 } 807 806 808 807 /* This routine reinitializes the pseudo-random 809 *************** 810 *** 228,233****811 --- 239,245 ---- 808 --- 216,221 ---- 809 *************** 810 *** 239,245 **** 812 811 void 813 812 intRandReset (void) 814 813 { 815 +printf("intRandReset begin -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed);814 - printf("intRandReset begin -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed); 816 815 if (intrandflag != 0) { /* Keep seed computed during first initialization */ 817 816 #ifdef COMMON_RANDOM_RAND 818 817 srand (intrandseed); 819 *************** 820 *** 237,242****821 --- 249,255 ---- 818 --- 228,233 ---- 819 *************** 820 *** 249,255 **** 822 821 } 823 822 else 824 823 intRandInit (); 825 +printf("intRandReset end -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed);824 - printf("intRandReset end -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed); 826 825 } 827 826 828 827 /*********************/ 829 diff -rc src/src/libscotch/common_memory.c new4/src/libscotch/common_memory.c 830 *** src/src/libscotch/common_memory.c 2009-01-03 02:16:11.000000000 -0800 831 --- new4/src/libscotch/common_memory.c 2010-05-03 15:37:55.275089989-0700832 *************** 833 *** 87,93****834 --- 87,95 ---- 828 --- 237,242 ---- 829 diff -rc src/src/libscotch/common_memory.c old/src/libscotch/common_memory.c 830 *** src/src/libscotch/common_memory.c 2010-07-19 10:53:22.939732046 -0700 831 --- old/src/libscotch/common_memory.c 2009-01-03 02:16:11.000000000 -0800 832 *************** 833 *** 87,95 **** 835 834 size_t newadd; 836 835 byte * newptr; 837 836 838 +printf("memAllocRecord begin -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);837 - printf("memAllocRecord begin -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax); 839 838 #if (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD)) 840 +printf("memAllocRecord begin -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat);839 - printf("memAllocRecord begin -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat); 841 840 if (muteflag != 0) { /* Unsafe code with respect to race conditions but should work as first allocs are sequential */ 842 841 muteflag = 0; 843 842 pthread_mutex_init (&mutelocdat, NULL); /* Initialize local mutex */ 844 *************** 845 *** 109,116****846 --- 111,120 ---- 843 --- 87,93 ---- 844 *************** 845 *** 111,120 **** 847 846 848 847 #if (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD)) 849 848 pthread_mutex_unlock (&mutelocdat); /* Unlock local mutex */ 850 +printf("memAllocRecord end -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat);849 - printf("memAllocRecord end -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat); 851 850 #endif /* (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD)) */ 852 851 853 +printf("memAllocRecord end -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);852 - printf("memAllocRecord end -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax); 854 853 return ((void *) newptr); /* Return skewed pointer or NULL */ 855 854 } 856 855 857 *************** 858 *** 124,133****859 --- 128,139 ---- 856 --- 109,116 ---- 857 *************** 858 *** 128,139 **** 860 859 size_t oldsiz; 861 860 size_t newadd; 862 861 863 +printf("memReallocRecord begin -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);862 - printf("memReallocRecord begin -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax); 864 863 tmpptr = ((byte *) oldptr) - COMMON_MEMORY_SKEW; 865 864 oldsiz = *((size_t *) tmpptr); 866 865 867 866 #if (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD)) 868 +printf("memReallocRecord begin -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat);867 - printf("memReallocRecord begin -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat); 869 868 pthread_mutex_lock (&mutelocdat); /* Lock local mutex */ 870 869 #endif /* (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD)) */ 871 870 872 *************** 873 *** 145,152****874 --- 151,160 ---- 871 --- 124,133 ---- 872 *************** 873 *** 151,160 **** 875 874 876 875 #if (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD)) 877 876 pthread_mutex_unlock (&mutelocdat); /* Unlock local mutex */ 878 +printf("memReallocRecord end -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat);877 - printf("memReallocRecord end -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat); 879 878 #endif /* (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD)) */ 880 879 881 +printf("memReallocRecord end -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);880 - printf("memReallocRecord end -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax); 882 881 return ((void *) newptr); /* Return skewed pointer or NULL */ 883 882 } 884 883 885 *************** 886 *** 157,166****887 --- 165,176 ---- 884 --- 145,152 ---- 885 *************** 886 *** 165,176 **** 888 887 byte * tmpptr; 889 888 size_t oldsiz; 890 889 891 +printf("memFreeRecord begin -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);890 - printf("memFreeRecord begin -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax); 892 891 tmpptr = ((byte *) oldptr) - COMMON_MEMORY_SKEW; 893 892 oldsiz = *((size_t *) tmpptr); 894 893 895 894 #if (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD)) 896 +printf("memFreeRecord begin -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat);895 - printf("memFreeRecord begin -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat); 897 896 pthread_mutex_lock (&mutelocdat); /* Lock local mutex */ 898 897 #endif /* (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD)) */ 899 898 900 *************** 901 *** 169,175****902 --- 179,187 ---- 899 --- 157,166 ---- 900 *************** 901 *** 179,187 **** 903 902 904 903 #if (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD)) 905 904 pthread_mutex_unlock (&mutelocdat); /* Unlock local mutex */ 906 +printf("memFreeRecord end -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat);905 - printf("memFreeRecord end -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat); 907 906 #endif /* (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD)) */ 908 +printf("memFreeRecord end -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);907 - printf("memFreeRecord end -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax); 909 908 } 910 909 911 910 size_t 912 *************** 913 *** 177,183****914 --- 189,197 ---- 911 --- 169,175 ---- 912 *************** 913 *** 189,197 **** 915 914 { 916 915 size_t curmax; 917 916 918 +printf("memMax begin -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);917 - printf("memMax begin -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax); 919 918 #if (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD)) 920 +printf("memMax begin -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat);919 - printf("memMax begin -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat); 921 920 pthread_mutex_lock (&mutelocdat); /* Lock local mutex */ 922 921 #endif /* (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD)) */ 923 922 924 *************** 925 *** 185,192****926 --- 199,208 ---- 923 --- 177,183 ---- 924 *************** 925 *** 199,208 **** 927 926 928 927 #if (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD)) 929 928 pthread_mutex_unlock (&mutelocdat); /* Unlock local mutex */ 930 +printf("memMax end -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat);929 - printf("memMax end -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat); 931 930 #endif /* (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD)) */ 932 931 933 +printf("memMax end -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);932 - printf("memMax end -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax); 934 933 return (curmax); 935 934 } 936 935 #endif /* COMMON_MEMORY_TRACE */ 937 diff -rc src/src/libscotch/dummysizes.c new4/src/libscotch/dummysizes.c 938 *** src/src/libscotch/dummysizes.c 2009-05-09 16:08:02.000000000 -0700 939 --- new4/src/libscotch/dummysizes.c 2010-05-03 15:37:55.282089995-0700940 *************** 941 *** 267,271****942 --- 267,273 ---- 936 --- 185,192 ---- 937 diff -rc src/src/libscotch/dummysizes.c old/src/libscotch/dummysizes.c 938 *** src/src/libscotch/dummysizes.c 2010-07-19 10:53:22.941732059 -0700 939 --- old/src/libscotch/dummysizes.c 2009-05-09 16:08:02.000000000 -0700 940 *************** 941 *** 267,273 **** 943 942 } 944 943 #endif /* SCOTCH_DEBUG_MAIN1 */ 945 944 946 +#ifndef MATLAB945 - #ifndef MATLAB 947 946 exit (0); 948 +#endif /* MATLAB */947 - #endif /* MATLAB */ 949 948 } 950 diff -rc src/src/libscotch/graph.c new4/src/libscotch/graph.c 951 *** src/src/libscotch/graph.c 2008-05-22 06:44:42.000000000 -0700 952 --- new4/src/libscotch/graph.c 2010-05-03 15:37:55.288090000 -0700 953 *************** 954 *** 135,141 **** 955 if ((grafptr->velotax != NULL) && /* Free graph tables */ 956 ((grafptr->flagval & GRAPHVERTGROUP) == 0)) 957 memFree (grafptr->velotax + grafptr->baseval); 958 ! if (grafptr->vlbltax != NULL) 959 memFree (grafptr->vlbltax + grafptr->baseval); 960 if ((grafptr->edlotax != NULL) && 961 ((grafptr->flagval & GRAPHEDGEGROUP) == 0)) 962 --- 135,144 ---- 949 --- 267,271 ---- 950 diff -rc src/src/libscotch/graph.c old/src/libscotch/graph.c 951 *** src/src/libscotch/graph.c 2010-07-19 10:53:22.943732072 -0700 952 --- old/src/libscotch/graph.c 2008-05-22 06:44:42.000000000 -0700 953 *************** 954 *** 135,144 **** 963 955 if ((grafptr->velotax != NULL) && /* Free graph tables */ 964 956 ((grafptr->flagval & GRAPHVERTGROUP) == 0)) … … 971 963 if ((grafptr->edlotax != NULL) && 972 964 ((grafptr->flagval & GRAPHEDGEGROUP) == 0)) 973 diff -rc src/src/libscotch/graph.h new4/src/libscotch/graph.h 974 *** src/src/libscotch/graph.h 2008-06-01 02:49:11.000000000 -0700 975 --- new4/src/libscotch/graph.h 2010-05-03 15:37:55.295090006 -0700 976 *************** 977 *** 159,165 **** 978 --- 159,169 ---- 965 --- 135,141 ---- 966 if ((grafptr->velotax != NULL) && /* Free graph tables */ 967 ((grafptr->flagval & GRAPHVERTGROUP) == 0)) 968 memFree (grafptr->velotax + grafptr->baseval); 969 ! if (grafptr->vlbltax != NULL) 970 memFree (grafptr->vlbltax + grafptr->baseval); 971 if ((grafptr->edlotax != NULL) && 972 ((grafptr->flagval & GRAPHEDGEGROUP) == 0)) 973 diff -rc src/src/libscotch/graph.h old/src/libscotch/graph.h 974 *** src/src/libscotch/graph.h 2010-07-19 10:53:22.946732092 -0700 975 --- old/src/libscotch/graph.h 2008-06-01 02:49:11.000000000 -0700 976 *************** 977 *** 159,169 **** 979 978 int graphInit (Graph * const); 980 979 void graphExit (Graph * const); 981 980 void graphFree (Graph * const); 982 +#ifndef MATLAB981 - #ifndef MATLAB 983 982 int graphLoad (Graph * const, FILE * const, const Gnum, const GraphFlag); 984 +#else /* MATLAB */985 +int graphLoad (Graph * const, FILE * const, const Gnum, const GraphFlag, const Gnum, const Gnum, const Gnum*, const Gnum*, const Gnum*, const Gnum*, const Gnum*);986 +#endif /* MATLAB */983 - #else /* MATLAB */ 984 - int graphLoad (Graph * const, FILE * const, const Gnum, const GraphFlag, const Gnum, const Gnum, const Gnum*, const Gnum*, const Gnum*, const Gnum*, const Gnum*); 985 - #endif /* MATLAB */ 987 986 int graphLoad2 (const Gnum, const Gnum, const Gnum * const, const Gnum * const, Gnum * restrict const, const Gnum, const Gnum * const); 988 987 int graphSave (const Graph * const, FILE * const); 989 988 Gnum graphBase (Graph * const, const Gnum); 990 diff -rc src/src/libscotch/graph_io.c new4/src/libscotch/graph_io.c 991 *** src/src/libscotch/graph_io.c 2008-05-22 06:44:42.000000000 -0700 992 --- new4/src/libscotch/graph_io.c 2010-05-03 15:37:55.303090012 -0700 993 *************** 994 *** 86,92 **** 995 Graph * restrict const grafptr, /* Graph structure to fill */ 996 FILE * const stream, /* Stream from which to read graph data */ 997 const Gnum baseval, /* Base value (-1 means keep file base) */ 998 ! const GraphFlag flagval) /* Graph loading flags */ 999 { 1000 Gnum edgenum; /* Number of edges really allocated */ 1001 Gnum edgennd; 1002 --- 86,103 ---- 989 --- 159,165 ---- 990 diff -rc src/src/libscotch/graph_io.c old/src/libscotch/graph_io.c 991 *** src/src/libscotch/graph_io.c 2010-07-19 10:53:22.949732111 -0700 992 --- old/src/libscotch/graph_io.c 2008-05-22 06:44:42.000000000 -0700 993 *************** 994 *** 86,103 **** 1003 995 Graph * restrict const grafptr, /* Graph structure to fill */ 1004 996 FILE * const stream, /* Stream from which to read graph data */ … … 1019 1011 Gnum edgenum; /* Number of edges really allocated */ 1020 1012 Gnum edgennd; 1021 *************** 1022 *** 104,120 **** 1023 --- 115,141 ---- 1013 --- 86,92 ---- 1014 Graph * restrict const grafptr, /* Graph structure to fill */ 1015 FILE * const stream, /* Stream from which to read graph data */ 1016 const Gnum baseval, /* Base value (-1 means keep file base) */ 1017 ! const GraphFlag flagval) /* Graph loading flags */ 1018 { 1019 Gnum edgenum; /* Number of edges really allocated */ 1020 Gnum edgennd; 1021 *************** 1022 *** 115,141 **** 1024 1023 char proptab[4]; 1025 1024 Gnum vertnum; 1026 1025 1027 +#ifdef MATLAB1028 +printf("graphLoad - stream=%p; nvert=%d,nedge2=%d\n",stream,nvert,nedge2);1029 +printf("graphLoad - adjir=%p,adjjc=%p,vertlab=%p,vertwgt=%p,edgewgt=%p\n",1030 +adjir,adjjc,vertlab,vertwgt,edgewgt);1031 +#endif /* MATLAB */1026 - #ifdef MATLAB 1027 - printf("graphLoad - stream=%p; nvert=%d,nedge2=%d\n",stream,nvert,nedge2); 1028 - printf("graphLoad - adjir=%p,adjjc=%p,vertlab=%p,vertwgt=%p,edgewgt=%p\n", 1029 - adjir,adjjc,vertlab,vertwgt,edgewgt); 1030 - #endif /* MATLAB */ 1032 1031 memSet (grafptr, 0, sizeof (Graph)); 1033 1032 1034 +#ifndef MATLAB1033 - #ifndef MATLAB 1035 1034 if (intLoad (stream, &versval) != 1) { /* Read version number */ 1036 1035 errorPrint ("graphLoad: bad input (1)"); 1037 1036 return (1); 1038 1037 } 1039 +#else /* MATLAB */1040 +versval=0;1041 +#endif /* MATLAB */1038 - #else /* MATLAB */ 1039 - versval=0; 1040 - #endif /* MATLAB */ 1042 1041 if (versval != 0) { /* If version not zero */ 1043 1042 errorPrint ("graphLoad: old-style graph format no longer supported"); … … 1045 1044 } 1046 1045 1047 +#ifndef MATLAB1046 - #ifndef MATLAB 1048 1047 if ((intLoad (stream, &grafptr->vertnbr) != 1) || /* Read rest of header */ 1049 1048 (intLoad (stream, &grafptr->edgenbr) != 1) || 1050 1049 (intLoad (stream, &baseadj) != 1) || 1051 *************** 1052 *** 124,129****1053 --- 145,159 ---- 1050 --- 104,120 ---- 1051 *************** 1052 *** 145,159 **** 1054 1053 errorPrint ("graphLoad: bad input (2)"); 1055 1054 return (1); 1056 1055 } 1057 +#else /* MATLAB */1058 +grafptr->vertnbr=nvert;1059 +grafptr->edgenbr=nedge2;1060 +baseadj=1;1061 +propval=0;1062 +if (vertlab) propval+=100;1063 +if (edgewgt) propval+= 10;1064 +if (vertwgt) propval+= 1;1065 +#endif /* MATLAB */1056 - #else /* MATLAB */ 1057 - grafptr->vertnbr=nvert; 1058 - grafptr->edgenbr=nedge2; 1059 - baseadj=1; 1060 - propval=0; 1061 - if (vertlab) propval+=100; 1062 - if (edgewgt) propval+= 10; 1063 - if (vertwgt) propval+= 1; 1064 - #endif /* MATLAB */ 1066 1065 sprintf (proptab, "%3.3d", (int) propval); /* Compute file properties */ 1067 1066 proptab[0] -= '0'; /* Vertex labels flag */ 1068 1067 proptab[1] -= '0'; /* Edge weights flag */ 1069 *************** 1070 *** 140,145****1071 --- 170,179 ---- 1068 --- 124,129 ---- 1069 *************** 1070 *** 170,179 **** 1072 1071 } 1073 1072 if (proptab[0] != 0) /* If vertex labels, no base adjust */ 1074 1073 baseadj = 0; 1075 +#ifdef MATLAB1076 +printf("graphLoad - baseadj=%d,baseval=%d,grafptr->baseval=%d\n",1077 +baseadj,baseval,grafptr->baseval);1078 +#endif /* MATLAB */1074 - #ifdef MATLAB 1075 - printf("graphLoad - baseadj=%d,baseval=%d,grafptr->baseval=%d\n", 1076 - baseadj,baseval,grafptr->baseval); 1077 - #endif /* MATLAB */ 1079 1078 1080 1079 velonbr = ((proptab[2] != 0) && ((flagval & GRAPHIONOLOADVERT) == 0)) ? grafptr->vertnbr : 0; 1081 1080 vlblnbr = (proptab[0] != 0) ? grafptr->vertnbr : 0; 1082 *************** 1083 *** 178,188****1084 --- 212,226 ---- 1081 --- 140,145 ---- 1082 *************** 1083 *** 212,226 **** 1085 1084 if (grafptr->vlbltax != NULL) { /* If must read label */ 1086 1085 Gnum vlblval; /* Value where to read vertex label */ 1087 1086 1088 +#ifndef MATLAB1087 - #ifndef MATLAB 1089 1088 if (intLoad (stream, &vlblval) != 1) { /* Read label data */ 1090 1089 errorPrint ("graphLoad: bad input (3)"); … … 1092 1091 return (1); 1093 1092 } 1094 +#else /* MATLAB */1095 +vlblval=vertlab[vertnum-grafptr->baseval];1096 +#endif /* MATLAB */1093 - #else /* MATLAB */ 1094 - vlblval=vertlab[vertnum-grafptr->baseval]; 1095 - #endif /* MATLAB */ 1097 1096 grafptr->vlbltax[vertnum] = vlblval; 1098 1097 if (grafptr->vlbltax[vertnum] > vlblmax) /* Get maximum vertex label */ 1099 1098 vlblmax = grafptr->vlbltax[vertnum]; 1100 *************** 1101 *** 190,209****1102 --- 228,257 ---- 1099 --- 178,188 ---- 1100 *************** 1101 *** 228,257 **** 1103 1102 if (proptab[2] != 0) { /* If must read vertex load */ 1104 1103 Gnum veloval; /* Value where to read vertex load */ 1105 1104 1106 +#ifndef MATLAB1105 - #ifndef MATLAB 1107 1106 if (intLoad (stream, &veloval) != 1) { /* Read vertex load data */ 1108 1107 errorPrint ("graphLoad: bad input (4)"); … … 1110 1109 return (1); 1111 1110 } 1112 +#else /* MATLAB */1113 +veloval=vertwgt[vertnum-grafptr->baseval];1114 +#endif /* MATLAB */1111 - #else /* MATLAB */ 1112 - veloval=vertwgt[vertnum-grafptr->baseval]; 1113 - #endif /* MATLAB */ 1115 1114 if (grafptr->velotax != NULL) 1116 1115 velosum += 1117 1116 grafptr->velotax[vertnum] = veloval; 1118 1117 } 1119 +#ifndef MATLAB1118 - #ifndef MATLAB 1120 1119 if (intLoad (stream, °rval) != 1) { /* Read vertex degree */ 1121 1120 errorPrint ("graphLoad: bad input (5)"); … … 1123 1122 return (1); 1124 1123 } 1125 +#else /* MATLAB */1126 +// printf("old degrval=%d; new degrval=%d\n",1127 +// degrval,adjjc[vertnum-grafptr->baseval+1]-adjjc[vertnum-grafptr->baseval]);1128 +degrval=adjjc[vertnum-grafptr->baseval+1]-adjjc[vertnum-grafptr->baseval];1129 +#endif /* MATLAB */1124 - #else /* MATLAB */ 1125 - // printf("old degrval=%d; new degrval=%d\n", 1126 - // degrval,adjjc[vertnum-grafptr->baseval+1]-adjjc[vertnum-grafptr->baseval]); 1127 - degrval=adjjc[vertnum-grafptr->baseval+1]-adjjc[vertnum-grafptr->baseval]; 1128 - #endif /* MATLAB */ 1130 1129 if (degrmax < degrval) /* Set maximum degree */ 1131 1130 degrmax = degrval; 1132 1131 1133 *************** 1134 *** 219,238****1135 --- 267,301 ---- 1132 --- 190,209 ---- 1133 *************** 1134 *** 267,301 **** 1136 1135 if (proptab[1] != 0) { /* If must read edge load */ 1137 1136 Gnum edloval; /* Value where to read edge load */ 1138 1137 1139 +#ifndef MATLAB1138 - #ifndef MATLAB 1140 1139 if (intLoad (stream, &edloval) != 1) { /* Read edge load data */ 1141 1140 errorPrint ("graphLoad: bad input (6)"); … … 1143 1142 return (1); 1144 1143 } 1145 +#else /* MATLAB */1146 +edloval=edgewgt[edgenum-grafptr->baseval];1147 +#endif /* MATLAB */1144 - #else /* MATLAB */ 1145 - edloval=edgewgt[edgenum-grafptr->baseval]; 1146 - #endif /* MATLAB */ 1148 1147 if (grafptr->edlotax != NULL) 1149 1148 edlosum += 1150 1149 grafptr->edlotax[edgenum] = (Gnum) edloval; 1151 1150 } 1152 +#ifndef MATLAB1151 - #ifndef MATLAB 1153 1152 if (intLoad (stream, &edgeval) != 1) { /* Read edge data */ 1154 1153 errorPrint ("graphLoad: bad input (7)"); … … 1156 1155 return (1); 1157 1156 } 1158 +#else /* MATLAB */1159 +// printf("edgenum=%d: old edgeval=%d; new edgeval[%d]=%d\n",1160 +// edgenum,edgeval,edgenum-grafptr->baseval,adjir[edgenum-grafptr->baseval]+1);1161 +/* if vertex labels are supplied, they must be referenced (jes, 1/05/10) */1162 +// edgeval=adjir[edgenum-grafptr->baseval]+1;1163 +if (vertlab)1164 +edgeval=vertlab[adjir[edgenum-grafptr->baseval] ];1165 +else1166 +edgeval= adjir[edgenum-grafptr->baseval]+1;1167 +#endif /* MATLAB */1157 - #else /* MATLAB */ 1158 - // printf("edgenum=%d: old edgeval=%d; new edgeval[%d]=%d\n", 1159 - // edgenum,edgeval,edgenum-grafptr->baseval,adjir[edgenum-grafptr->baseval]+1); 1160 - /* if vertex labels are supplied, they must be referenced (jes, 1/05/10) */ 1161 - // edgeval=adjir[edgenum-grafptr->baseval]+1; 1162 - if (vertlab) 1163 - edgeval=vertlab[adjir[edgenum-grafptr->baseval] ]; 1164 - else 1165 - edgeval= adjir[edgenum-grafptr->baseval]+1; 1166 - #endif /* MATLAB */ 1168 1167 grafptr->edgetax[edgenum] = edgeval + baseadj; 1169 1168 } 1170 1169 } 1171 *************** 1172 *** 279,284****1173 --- 342,351 ---- 1170 --- 219,238 ---- 1171 *************** 1172 *** 342,351 **** 1174 1173 Gnum vertnum; /* Number of current vertex */ 1175 1174 Gnum * restrict indxtab; /* Vertex label/number index table */ 1176 1175 1177 +#ifdef MATLAB1178 +printf("graphLoad2 - baseval=%d,vertnnd=%d,vlblmax=%d\n",1179 +baseval,vertnnd,vlblmax);1180 +#endif /* MATLAB */1176 - #ifdef MATLAB 1177 - printf("graphLoad2 - baseval=%d,vertnnd=%d,vlblmax=%d\n", 1178 - baseval,vertnnd,vlblmax); 1179 - #endif /* MATLAB */ 1181 1180 if ((indxtab = (Gnum *) memAlloc ((vlblmax + 1) * sizeof (Gnum))) == NULL) { 1182 1181 errorPrint ("graphLoad2: out of memory"); 1183 1182 return (1); 1184 *************** 1185 *** 286,291****1186 --- 353,362 ---- 1183 --- 279,284 ---- 1184 *************** 1185 *** 353,362 **** 1187 1186 1188 1187 memSet (indxtab, ~0, (vlblmax + 1) * sizeof (Gnum)); /* Assume labels not used */ 1189 1188 for (vertnum = baseval; vertnum < vertnnd; vertnum ++) { 1190 +#ifdef MATLAB1191 +// printf("graphLoad2 - vertnum=%d; vlbltax=%d,indxtab=%d\n",1192 +// vertnum,vlbltax[vertnum],indxtab[vlbltax[vertnum]]);1193 +#endif /* MATLAB */1189 - #ifdef MATLAB 1190 - // printf("graphLoad2 - vertnum=%d; vlbltax=%d,indxtab=%d\n", 1191 - // vertnum,vlbltax[vertnum],indxtab[vlbltax[vertnum]]); 1192 - #endif /* MATLAB */ 1194 1193 if (indxtab[vlbltax[vertnum]] != ~0) { /* If vertex label already used */ 1195 1194 errorPrint ("graphLoad2: duplicate vertex label"); 1196 1195 memFree (indxtab); 1197 *************** 1198 *** 294,299****1199 --- 365,374 ---- 1196 --- 286,291 ---- 1197 *************** 1198 *** 365,374 **** 1200 1199 indxtab[vlbltax[vertnum]] = vertnum; /* Set vertex number index */ 1201 1200 } 1202 1201 for (vertnum = baseval; vertnum < vertnnd; vertnum ++) { 1203 +#ifdef MATLAB1204 +// printf("graphLoad2 - vertnum=%d; vlbltax=%d,indxtab=%d\n",1205 +// vertnum,vlbltax[vertnum],indxtab[vlbltax[vertnum]]);1206 +#endif /* MATLAB */1202 - #ifdef MATLAB 1203 - // printf("graphLoad2 - vertnum=%d; vlbltax=%d,indxtab=%d\n", 1204 - // vertnum,vlbltax[vertnum],indxtab[vlbltax[vertnum]]); 1205 - #endif /* MATLAB */ 1207 1206 Gnum edgenum; /* Number of current edge */ 1208 1207 1209 1208 for (edgenum = verttax[vertnum]; edgenum < vendtax[vertnum]; edgenum ++) { 1210 *************** 1211 *** 307,313****1212 --- 382,396 ---- 1209 --- 294,299 ---- 1210 *************** 1211 *** 382,396 **** 1213 1212 memFree (indxtab); 1214 1213 return (1); 1215 1214 } 1216 +#ifdef MATLAB1217 +// printf("graphLoad2 - edgenum=%d; old edgetax=%d,",1218 +// edgenum,edgetax[edgenum]);1219 +#endif /* MATLAB */1215 - #ifdef MATLAB 1216 - // printf("graphLoad2 - edgenum=%d; old edgetax=%d,", 1217 - // edgenum,edgetax[edgenum]); 1218 - #endif /* MATLAB */ 1220 1219 edgetax[edgenum] = indxtab[edgetax[edgenum]]; /* Replace label by number */ 1221 +#ifdef MATLAB1222 +// printf("new edgetax=%d\n",1223 +// edgetax[edgenum]);1224 +#endif /* MATLAB */1220 - #ifdef MATLAB 1221 - // printf("new edgetax=%d\n", 1222 - // edgetax[edgenum]); 1223 - #endif /* MATLAB */ 1225 1224 } 1226 1225 } 1227 1226 1228 diff -rc src/src/libscotch/graph_io_scot.c new4/src/libscotch/graph_io_scot.c 1229 *** src/src/libscotch/graph_io_scot.c 2008-05-22 06:44:42.000000000 -0700 1230 --- new4/src/libscotch/graph_io_scot.c 2010-05-03 15:37:55.310090018-07001231 *************** 1232 *** 89,95****1233 --- 89,99 ---- 1227 --- 307,313 ---- 1228 diff -rc src/src/libscotch/graph_io_scot.c old/src/libscotch/graph_io_scot.c 1229 *** src/src/libscotch/graph_io_scot.c 2010-07-19 10:53:22.952732130 -0700 1230 --- old/src/libscotch/graph_io_scot.c 2008-05-22 06:44:42.000000000 -0700 1231 *************** 1232 *** 89,99 **** 1234 1233 int o; 1235 1234 1236 1235 if (filesrcptr != NULL) { 1237 +#ifndef MATLAB1236 - #ifndef MATLAB 1238 1237 if (graphLoad (grafptr, filesrcptr, -1, 0) != 0) 1239 +#else /* MATLAB */1240 +if (graphLoad (grafptr, filesrcptr, -1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL) != 0)1241 +#endif /* MATLAB */1238 - #else /* MATLAB */ 1239 - if (graphLoad (grafptr, filesrcptr, -1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL) != 0) 1240 - #endif /* MATLAB */ 1242 1241 return (1); 1243 1242 } 1244 1243 1245 diff -rc src/src/libscotch/library_arch.c new4/src/libscotch/library_arch.c 1246 *** src/src/libscotch/library_arch.c 2008-05-22 06:44:42.000000000 -0700 1247 --- new4/src/libscotch/library_arch.c 2010-05-03 15:37:55.317090024 -0700 1248 *************** 1249 *** 120,128 **** 1250 int 1251 SCOTCH_archLoad ( 1252 SCOTCH_Arch * const archptr, 1253 ! FILE * const stream) 1254 { 1255 return (archLoad ((Arch *) archptr, stream)); 1256 } 1257 1258 /*+ This routine saves the given opaque 1259 --- 120,139 ---- 1244 --- 89,95 ---- 1245 diff -rc src/src/libscotch/library_arch.c old/src/libscotch/library_arch.c 1246 *** src/src/libscotch/library_arch.c 2010-07-19 10:53:22.954732143 -0700 1247 --- old/src/libscotch/library_arch.c 2008-05-22 06:44:42.000000000 -0700 1248 *************** 1249 *** 120,139 **** 1260 1250 int 1261 1251 SCOTCH_archLoad ( … … 1270 1260 ! ) 1271 1261 { 1272 +#ifndef MATLAB1262 - #ifndef MATLAB 1273 1263 return (archLoad ((Arch *) archptr, stream)); 1274 +#else /* MATLAB */1275 +return (archLoad ((Arch *) archptr, stream, archtyp, napar, archpar));1276 +#endif /* MATLAB */1264 - #else /* MATLAB */ 1265 - return (archLoad ((Arch *) archptr, stream, archtyp, napar, archpar)); 1266 - #endif /* MATLAB */ 1277 1267 } 1278 1268 1279 1269 /*+ This routine saves the given opaque 1280 diff -rc src/src/libscotch/library_arch_f.c new4/src/libscotch/library_arch_f.c 1281 *** src/src/libscotch/library_arch_f.c 2008-05-22 06:44:42.000000000 -0700 1282 --- new4/src/libscotch/library_arch_f.c 2010-05-03 15:37:55.323090029 -0700 1283 *************** 1284 *** 121,127 **** 1285 --- 121,131 ---- 1270 --- 120,128 ---- 1271 int 1272 SCOTCH_archLoad ( 1273 SCOTCH_Arch * const archptr, 1274 ! FILE * const stream) 1275 { 1276 return (archLoad ((Arch *) archptr, stream)); 1277 } 1278 1279 /*+ This routine saves the given opaque 1280 diff -rc src/src/libscotch/library_arch_f.c old/src/libscotch/library_arch_f.c 1281 *** src/src/libscotch/library_arch_f.c 2010-07-19 10:53:22.956732156 -0700 1282 --- old/src/libscotch/library_arch_f.c 2008-05-22 06:44:42.000000000 -0700 1283 *************** 1284 *** 121,131 **** 1286 1285 } 1287 1286 setbuf (stream, NULL); /* Do not buffer on input */ 1288 1287 1289 +#ifndef MATLAB1288 - #ifndef MATLAB 1290 1289 o = SCOTCH_archLoad (archptr, stream); 1291 +#else /* MATLAB */1292 +o = SCOTCH_archLoad (archptr, stream, "", 0, NULL);1293 +#endif /* MATLAB */1290 - #else /* MATLAB */ 1291 - o = SCOTCH_archLoad (archptr, stream, "", 0, NULL); 1292 - #endif /* MATLAB */ 1294 1293 1295 1294 fclose (stream); /* This closes filenum too */ 1296 1295 1297 diff -rc src/src/libscotch/library_error_exit.c new4/src/libscotch/library_error_exit.c 1298 *** src/src/libscotch/library_error_exit.c 2009-01-20 00:36:33.000000000 -0800 1299 --- new4/src/libscotch/library_error_exit.c 2010-05-03 15:37:55.330090035 -07001300 *************** 1301 *** 114,119****1302 --- 114,120 ---- 1296 --- 121,127 ---- 1297 diff -rc src/src/libscotch/library_error_exit.c old/src/libscotch/library_error_exit.c 1298 *** src/src/libscotch/library_error_exit.c 2010-07-19 10:53:22.959732175 -0700 1299 --- old/src/libscotch/library_error_exit.c 2009-01-20 00:36:33.000000000 -0800 1300 *************** 1301 *** 114,120 **** 1303 1302 int proclocnum; 1304 1303 #endif /* SCOTCH_PTSCOTCH */ 1305 1304 1306 +#ifndef MATLAB1305 - #ifndef MATLAB 1307 1306 fprintf (stderr, "%s", _SCOTCHerrorProgName); 1308 1307 #ifdef SCOTCH_PTSCOTCH 1309 1308 if ((MPI_Initialized (&proclocnum) == MPI_SUCCESS) && 1310 *************** 1311 *** 131,136****1312 --- 132,155 ---- 1309 --- 114,119 ---- 1310 *************** 1311 *** 132,155 **** 1313 1312 fprintf (stderr, "\n"); 1314 1313 fflush (stderr); /* In case it has been set to buffered mode */ 1315 1314 1316 +#else /* MATLAB */1317 +mexPrintf ("%s", _SCOTCHerrorProgName);1318 +#ifdef SCOTCH_PTSCOTCH1319 +if ((MPI_Initialized (&proclocnum) == MPI_SUCCESS) &&1320 +(proclocnum != 0) &&1321 +(MPI_Comm_rank (MPI_COMM_WORLD, &proclocnum) == MPI_SUCCESS))1322 +mexPrintf ("(%d): ", proclocnum);1323 +#else /* SCOTCH_PTSCOTCH */1324 +if (_SCOTCHerrorProgName[0] != '\0')1325 +mexPrintf (": ");1326 +#endif /* SCOTCH_PTSCOTCH */1327 +mexPrintf ("ERROR: ");1328 +va_start (errlist, errstr);1329 +mexPrintf (errstr, errlist); /* Print arguments */1330 +va_end (errlist);1331 +mexPrintf ("\n");1332 +#endif /* MATLAB */1333 +1315 - #else /* MATLAB */ 1316 - mexPrintf ("%s", _SCOTCHerrorProgName); 1317 - #ifdef SCOTCH_PTSCOTCH 1318 - if ((MPI_Initialized (&proclocnum) == MPI_SUCCESS) && 1319 - (proclocnum != 0) && 1320 - (MPI_Comm_rank (MPI_COMM_WORLD, &proclocnum) == MPI_SUCCESS)) 1321 - mexPrintf ("(%d): ", proclocnum); 1322 - #else /* SCOTCH_PTSCOTCH */ 1323 - if (_SCOTCHerrorProgName[0] != '\0') 1324 - mexPrintf (": "); 1325 - #endif /* SCOTCH_PTSCOTCH */ 1326 - mexPrintf ("ERROR: "); 1327 - va_start (errlist, errstr); 1328 - mexPrintf (errstr, errlist); /* Print arguments */ 1329 - va_end (errlist); 1330 - mexPrintf ("\n"); 1331 - #endif /* MATLAB */ 1332 - 1334 1333 #ifdef SCOTCH_ERROR_SLEEP 1335 1334 sleep (SCOTCH_ERROR_SLEEP); /* Wait for messages to be propagated */ 1336 1335 #endif /* SCOTCH_ERROR_SLEEP */ 1337 *************** 1338 *** 155,160****1339 --- 174,180 ---- 1336 --- 131,136 ---- 1337 *************** 1338 *** 174,180 **** 1340 1339 int proclocnum; 1341 1340 #endif /* SCOTCH_PTSCOTCH */ 1342 1341 1343 +#ifndef MATLAB1342 - #ifndef MATLAB 1344 1343 fprintf (stderr, "%s", _SCOTCHerrorProgName); 1345 1344 #ifdef SCOTCH_PTSCOTCH 1346 1345 if ((MPI_Initialized (&proclocnum) == MPI_SUCCESS) && 1347 *************** 1348 *** 171,174****1349 --- 191,212 ---- 1346 --- 155,160 ---- 1347 *************** 1348 *** 191,212 **** 1350 1349 va_end (errlist); 1351 1350 fprintf (stderr, "\n"); 1352 1351 fflush (stderr); /* In case it has been set to buffered mode */ 1353 +1354 +#else /* MATLAB */1355 +mexPrintf ("%s", _SCOTCHerrorProgName);1356 +#ifdef SCOTCH_PTSCOTCH1357 +if ((MPI_Initialized (&proclocnum) == MPI_SUCCESS) &&1358 +(proclocnum != 0) &&1359 +(MPI_Comm_rank (MPI_COMM_WORLD, &proclocnum) == MPI_SUCCESS))1360 +mexPrintf ("(%d): ", proclocnum);1361 +#else /* SCOTCH_PTSCOTCH */1362 +if (_SCOTCHerrorProgName[0] != '\0')1363 +mexPrintf (": ");1364 +#endif /* SCOTCH_PTSCOTCH */1365 +mexPrintf ("WARNING: ");1366 +va_start (errlist, errstr);1367 +mexPrintf (errstr, errlist); /* Print arguments */1368 +va_end (errlist);1369 +mexPrintf ("\n");1370 +#endif /* MATLAB */1352 - 1353 - #else /* MATLAB */ 1354 - mexPrintf ("%s", _SCOTCHerrorProgName); 1355 - #ifdef SCOTCH_PTSCOTCH 1356 - if ((MPI_Initialized (&proclocnum) == MPI_SUCCESS) && 1357 - (proclocnum != 0) && 1358 - (MPI_Comm_rank (MPI_COMM_WORLD, &proclocnum) == MPI_SUCCESS)) 1359 - mexPrintf ("(%d): ", proclocnum); 1360 - #else /* SCOTCH_PTSCOTCH */ 1361 - if (_SCOTCHerrorProgName[0] != '\0') 1362 - mexPrintf (": "); 1363 - #endif /* SCOTCH_PTSCOTCH */ 1364 - mexPrintf ("WARNING: "); 1365 - va_start (errlist, errstr); 1366 - mexPrintf (errstr, errlist); /* Print arguments */ 1367 - va_end (errlist); 1368 - mexPrintf ("\n"); 1369 - #endif /* MATLAB */ 1371 1370 } 1372 diff -rc src/src/libscotch/library_graph.c new4/src/libscotch/library_graph.c 1373 *** src/src/libscotch/library_graph.c 2008-05-22 07:28:12.000000000 -0700 1374 --- new4/src/libscotch/library_graph.c 2010-05-03 15:37:55.337090040 -0700 1375 *************** 1376 *** 137,143 **** 1377 SCOTCH_Graph * const grafptr, 1378 FILE * const stream, 1379 const SCOTCH_Num baseval, 1380 ! const SCOTCH_Num flagval) 1381 { 1382 GraphFlag srcgrafflag; /* Graph flags */ 1383 1384 --- 137,154 ---- 1371 --- 171,174 ---- 1372 diff -rc src/src/libscotch/library_graph.c old/src/libscotch/library_graph.c 1373 *** src/src/libscotch/library_graph.c 2010-07-19 10:53:22.962732194 -0700 1374 --- old/src/libscotch/library_graph.c 2008-05-22 07:28:12.000000000 -0700 1375 *************** 1376 *** 137,154 **** 1385 1377 SCOTCH_Graph * const grafptr, 1386 1378 FILE * const stream, … … 1401 1393 GraphFlag srcgrafflag; /* Graph flags */ 1402 1394 1403 *************** 1404 *** 153,159 **** 1405 --- 164,174 ---- 1395 --- 137,143 ---- 1396 SCOTCH_Graph * const grafptr, 1397 FILE * const stream, 1398 const SCOTCH_Num baseval, 1399 ! const SCOTCH_Num flagval) 1400 { 1401 GraphFlag srcgrafflag; /* Graph flags */ 1402 1403 *************** 1404 *** 164,174 **** 1406 1405 srcgrafflag = (((flagval & 1) != 0) ? GRAPHIONOLOADVERT : 0) + 1407 1406 (((flagval & 2) != 0) ? GRAPHIONOLOADEDGE : 0); 1408 1407 1409 +#ifndef MATLAB1408 - #ifndef MATLAB 1410 1409 return (graphLoad ((Graph * const) grafptr, stream, (Gnum) baseval, srcgrafflag)); 1411 +#else /* MATLAB */1412 +return (graphLoad ((Graph * const) grafptr, stream, (Gnum) baseval, srcgrafflag, (const Gnum) nvert, (const Gnum) nedge2, (const Gnum *) adjir, (const Gnum *) adjjc, (const Gnum *) vertlab, (const Gnum *) vertwgt, (const Gnum *) edgewgt));1413 +#endif /* MATLAB */1410 - #else /* MATLAB */ 1411 - return (graphLoad ((Graph * const) grafptr, stream, (Gnum) baseval, srcgrafflag, (const Gnum) nvert, (const Gnum) nedge2, (const Gnum *) adjir, (const Gnum *) adjjc, (const Gnum *) vertlab, (const Gnum *) vertwgt, (const Gnum *) edgewgt)); 1412 - #endif /* MATLAB */ 1414 1413 } 1415 1414 1416 1415 /*+ This routine saves the contents of the given 1417 diff -rc src/src/libscotch/library_graph_f.c new4/src/libscotch/library_graph_f.c 1418 *** src/src/libscotch/library_graph_f.c 2008-05-22 06:44:43.000000000 -0700 1419 --- new4/src/libscotch/library_graph_f.c 2010-05-03 15:37:55.344090046-07001420 *************** 1421 *** 136,142****1422 --- 136,146 ---- 1416 --- 153,159 ---- 1417 diff -rc src/src/libscotch/library_graph_f.c old/src/libscotch/library_graph_f.c 1418 *** src/src/libscotch/library_graph_f.c 2010-07-19 10:53:22.964732207 -0700 1419 --- old/src/libscotch/library_graph_f.c 2008-05-22 06:44:43.000000000 -0700 1420 *************** 1421 *** 136,146 **** 1423 1422 } 1424 1423 setbuf (stream, NULL); /* Do not buffer on input */ 1425 1424 1426 +#ifndef MATLAB1425 - #ifndef MATLAB 1427 1426 o = SCOTCH_graphLoad (grafptr, stream, *baseptr, *flagptr); 1428 +#else /* MATLAB */1429 +o = SCOTCH_graphLoad (grafptr, stream, *baseptr, *flagptr, 0, 0, NULL, NULL, NULL, NULL, NULL);1430 +#endif /* MATLAB */1427 - #else /* MATLAB */ 1428 - o = SCOTCH_graphLoad (grafptr, stream, *baseptr, *flagptr, 0, 0, NULL, NULL, NULL, NULL, NULL); 1429 - #endif /* MATLAB */ 1431 1430 1432 1431 fclose (stream); /* This closes filenum too */ 1433 1432 1434 diff -rc src/src/libscotch/library_graph_map.c new4/src/libscotch/library_graph_map.c 1435 *** src/src/libscotch/library_graph_map.c 2008-09-28 04:04:05.000000000 -0700 1436 --- new4/src/libscotch/library_graph_map.c 2010-05-03 15:37:55.350090051-07001437 *************** 1438 *** 182,192****1439 --- 182,200 ---- 1433 --- 136,142 ---- 1434 diff -rc src/src/libscotch/library_graph_map.c old/src/libscotch/library_graph_map.c 1435 *** src/src/libscotch/library_graph_map.c 2010-07-19 10:53:22.967732227 -0700 1436 --- old/src/libscotch/library_graph_map.c 2008-09-28 04:04:05.000000000 -0700 1437 *************** 1438 *** 182,200 **** 1440 1439 1441 1440 int 1442 1441 SCOTCH_graphMapSave ( 1443 +#ifdef MATLAB1444 +Gnum *pnvert,1445 +Gnum (**pmaptab)[2],1446 +#endif /* MATLAB */1442 - #ifdef MATLAB 1443 - Gnum *pnvert, 1444 - Gnum (**pmaptab)[2], 1445 - #endif /* MATLAB */ 1447 1446 const SCOTCH_Graph * const grafptr, /*+ Graph to order +*/ 1448 1447 const SCOTCH_Mapping * const mappptr, /*+ Mapping to save +*/ 1449 1448 FILE * const stream) /*+ Output stream +*/ 1450 1449 { 1451 +#ifndef MATLAB1450 - #ifndef MATLAB 1452 1451 return (mapSave (&((LibMapping *) mappptr)->m, ((Graph *) grafptr)->vlbltax, stream)); 1453 +#else /* MATLAB */1454 +return (mapSave (pnvert, pmaptab, &((LibMapping *) mappptr)->m, ((Graph *) grafptr)->vlbltax, stream));1455 +#endif /* MATLAB */1452 - #else /* MATLAB */ 1453 - return (mapSave (pnvert, pmaptab, &((LibMapping *) mappptr)->m, ((Graph *) grafptr)->vlbltax, stream)); 1454 - #endif /* MATLAB */ 1456 1455 } 1457 1456 1458 1457 /*+ This routine computes a mapping 1459 diff -rc src/src/libscotch/library_graph_map_f.c new4/src/libscotch/library_graph_map_f.c 1460 *** src/src/libscotch/library_graph_map_f.c 2008-06-28 03:44:26.000000000 -0700 1461 --- new4/src/libscotch/library_graph_map_f.c 2010-05-03 15:37:55.357090057-07001462 *************** 1463 *** 183,189****1464 --- 183,193 ---- 1458 --- 182,192 ---- 1459 diff -rc src/src/libscotch/library_graph_map_f.c old/src/libscotch/library_graph_map_f.c 1460 *** src/src/libscotch/library_graph_map_f.c 2010-07-19 10:53:22.969732239 -0700 1461 --- old/src/libscotch/library_graph_map_f.c 2008-06-28 03:44:26.000000000 -0700 1462 *************** 1463 *** 183,193 **** 1465 1464 return; 1466 1465 } 1467 1466 1468 +#ifndef MATLAB1467 - #ifndef MATLAB 1469 1468 o = SCOTCH_graphMapSave (grafptr, mapptr, stream); 1470 +#else /* MATLAB */1471 +o = SCOTCH_graphMapSave (NULL, NULL, grafptr, mapptr, stream);1472 +#endif /* MATLAB */1469 - #else /* MATLAB */ 1470 - o = SCOTCH_graphMapSave (NULL, NULL, grafptr, mapptr, stream); 1471 - #endif /* MATLAB */ 1473 1472 1474 1473 fclose (stream); /* This closes filenum too */ 1475 1474 1476 diff -rc src/src/libscotch/library.h new4/src/libscotch/library.h 1477 *** src/src/libscotch/library.h 2009-05-09 16:08:03.000000000 -0700 1478 --- new4/src/libscotch/library.h 2010-05-03 15:37:55.365090063-07001479 *************** 1480 *** 134,140****1481 --- 134,144 ---- 1475 --- 183,189 ---- 1476 diff -rc src/src/libscotch/library.h old/src/libscotch/library.h 1477 *** src/src/libscotch/library.h 2010-07-19 10:53:22.972732259 -0700 1478 --- old/src/libscotch/library.h 2009-05-09 16:08:03.000000000 -0700 1479 *************** 1480 *** 134,144 **** 1482 1481 1483 1482 int SCOTCH_archInit (SCOTCH_Arch * const); 1484 1483 void SCOTCH_archExit (SCOTCH_Arch * const); 1485 +#ifndef MATLAB1484 - #ifndef MATLAB 1486 1485 int SCOTCH_archLoad (SCOTCH_Arch * const, FILE * const); 1487 +#else /* MATLAB */1488 +int SCOTCH_archLoad (SCOTCH_Arch * const, FILE * const, const char *, const SCOTCH_Num, const SCOTCH_Num *);1489 +#endif /* MATLAB */1486 - #else /* MATLAB */ 1487 - int SCOTCH_archLoad (SCOTCH_Arch * const, FILE * const, const char *, const SCOTCH_Num, const SCOTCH_Num *); 1488 - #endif /* MATLAB */ 1490 1489 int SCOTCH_archSave (const SCOTCH_Arch * const, FILE * const); 1491 1490 int SCOTCH_archBuild (SCOTCH_Arch * const, const SCOTCH_Graph * const, const SCOTCH_Num, const SCOTCH_Num * const, const SCOTCH_Strat * const); 1492 1491 int SCOTCH_archCmplt (SCOTCH_Arch * const, const SCOTCH_Num); 1493 *************** 1494 *** 191,197****1495 --- 195,205 ---- 1492 --- 134,140 ---- 1493 *************** 1494 *** 195,205 **** 1496 1495 int SCOTCH_graphInit (SCOTCH_Graph * const); 1497 1496 void SCOTCH_graphExit (SCOTCH_Graph * const); 1498 1497 void SCOTCH_graphFree (SCOTCH_Graph * const); 1499 +#ifndef MATLAB1498 - #ifndef MATLAB 1500 1499 int SCOTCH_graphLoad (SCOTCH_Graph * const, FILE * const, const SCOTCH_Num, const SCOTCH_Num); 1501 +#else /* MATLAB */1502 +int SCOTCH_graphLoad (SCOTCH_Graph * const, FILE * const, const SCOTCH_Num, const SCOTCH_Num, const SCOTCH_Num, const SCOTCH_Num, const SCOTCH_Num *, const SCOTCH_Num *, const SCOTCH_Num *, const SCOTCH_Num *, const SCOTCH_Num *);1503 +#endif /* MATLAB */1500 - #else /* MATLAB */ 1501 - int SCOTCH_graphLoad (SCOTCH_Graph * const, FILE * const, const SCOTCH_Num, const SCOTCH_Num, const SCOTCH_Num, const SCOTCH_Num, const SCOTCH_Num *, const SCOTCH_Num *, const SCOTCH_Num *, const SCOTCH_Num *, const SCOTCH_Num *); 1502 - #endif /* MATLAB */ 1504 1503 int SCOTCH_graphSave (const SCOTCH_Graph * const, FILE * const); 1505 1504 int SCOTCH_graphBuild (SCOTCH_Graph * const, const SCOTCH_Num, const SCOTCH_Num, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num, const SCOTCH_Num * const, const SCOTCH_Num * const); 1506 1505 SCOTCH_Num SCOTCH_graphBase (SCOTCH_Graph * const, const SCOTCH_Num baseval); 1507 *************** 1508 *** 210,216****1509 --- 218,228 ---- 1506 --- 191,197 ---- 1507 *************** 1508 *** 218,228 **** 1510 1509 int SCOTCH_graphMapInit (const SCOTCH_Graph * const, SCOTCH_Mapping * const, const SCOTCH_Arch * const, SCOTCH_Num * const); 1511 1510 void SCOTCH_graphMapExit (const SCOTCH_Graph * const, SCOTCH_Mapping * const); 1512 1511 int SCOTCH_graphMapLoad (const SCOTCH_Graph * const, const SCOTCH_Mapping * const, FILE * const); 1513 +#ifndef MATLAB1512 - #ifndef MATLAB 1514 1513 int SCOTCH_graphMapSave (const SCOTCH_Graph * const, const SCOTCH_Mapping * const, FILE * const); 1515 +#else /* MATLAB */1516 +int SCOTCH_graphMapSave (SCOTCH_Num *, SCOTCH_Num (**)[2], const SCOTCH_Graph * const, const SCOTCH_Mapping * const, FILE * const);1517 +#endif /* MATLAB */1514 - #else /* MATLAB */ 1515 - int SCOTCH_graphMapSave (SCOTCH_Num *, SCOTCH_Num (**)[2], const SCOTCH_Graph * const, const SCOTCH_Mapping * const, FILE * const); 1516 - #endif /* MATLAB */ 1518 1517 int SCOTCH_graphMapView (const SCOTCH_Graph * const, const SCOTCH_Mapping * const, FILE * const); 1519 1518 int SCOTCH_graphMapCompute (const SCOTCH_Graph * const, SCOTCH_Mapping * const, const SCOTCH_Strat * const); 1520 1519 int SCOTCH_graphMap (const SCOTCH_Graph * const, const SCOTCH_Arch * const, const SCOTCH_Strat * const, SCOTCH_Num * const); 1521 diff -rc src/src/libscotch/Makefile new4/src/libscotch/Makefile 1522 *** src/src/libscotch/Makefile 2009-05-09 16:08:04.000000000 -0700 1523 --- new4/src/libscotch/Makefile 2010-06-17 09:55:33.101320246 -0700 1520 --- 210,216 ---- 1521 diff -rc src/src/libscotch/Makefile old/src/libscotch/Makefile 1522 *** src/src/libscotch/Makefile 2010-07-19 10:53:22.977732291 -0700 1523 --- old/src/libscotch/Makefile 2009-05-09 16:08:04.000000000 -0700 1524 1524 *************** 1525 1525 *** 49,55 **** … … 1527 1527 ## 1528 1528 1529 ! .PHONY : ptscotch scotch ptinstall install clean realclean1529 ! .PHONY : ptscotch scotch mexscotch ptinstall install clean realclean 1530 1530 1531 1531 scotch : clean … … 1535 1535 ## 1536 1536 1537 ! .PHONY : ptscotch scotch mexscotchptinstall install clean realclean1537 ! .PHONY : ptscotch scotch ptinstall install clean realclean 1538 1538 1539 1539 scotch : clean 1540 1540 $(MAKE) CC="$(CCS)" CCD="$(CCS)" SCOTCHLIB=scotch \ 1541 1541 *************** 1542 *** 68,73 **** 1543 --- 68,83 ---- 1542 *** 68,83 **** 1544 1543 libptscotcherr$(LIB) \ 1545 1544 libptscotcherrexit$(LIB) 1546 1545 1547 +mexscotch : clean1548 +$(MAKE) CFLAGS="$(CFLAGS)" CC="$(CCS)" CCD="$(CCS)" LDFLAGS="$(LDFLAGS)" SCOTCHLIB=scotch \1549 +dummysizes$(EXE)1550 +$(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 \1551 +scotch.h \1552 +scotchf.h \1553 +libmexscotch$(LIB) \1554 +libmexscotcherr$(LIB) \1555 +libmexscotcherrexit$(LIB)1556 +1546 - mexscotch : clean 1547 - $(MAKE) CFLAGS="$(CFLAGS)" CC="$(CCS)" CCD="$(CCS)" LDFLAGS="$(LDFLAGS)" SCOTCHLIB=scotch \ 1548 - dummysizes$(EXE) 1549 - $(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 \ 1550 - scotch.h \ 1551 - scotchf.h \ 1552 - libmexscotch$(LIB) \ 1553 - libmexscotcherr$(LIB) \ 1554 - libmexscotcherrexit$(LIB) 1555 - 1557 1556 install : 1558 1557 -$(CP) scotch.h scotchf.h $(includedir) 1559 1558 -$(CP) libscotch$(LIB) libscotcherr*$(LIB) $(libdir) 1560 *************** 1561 *** 77,82****1562 --- 87,96 ---- 1559 --- 68,73 ---- 1560 *************** 1561 *** 87,96 **** 1563 1562 -$(CP) scotchf.h $(includedir)/ptscotchf.h 1564 1563 -$(CP) libptscotch*$(LIB) $(libdir) 1565 1564 1566 +mexinstall :1567 +-$(CP) scotch.h scotchf.h $(includedir)1568 +-$(CP) libmexscotch$(LIB) libmexscotcherr*$(LIB) $(libdir)1569 +1565 - mexinstall : 1566 - -$(CP) scotch.h scotchf.h $(includedir) 1567 - -$(CP) libmexscotch$(LIB) libmexscotcherr*$(LIB) $(libdir) 1568 - 1570 1569 clean : 1571 1570 -$(RM) *~ *$(OBJ) lib*$(LIB) common2* parser_yy.c parser_ly.h parser_ll.c *scotch.h *scotchf.h y.output dummysizes$(EXE) 1572 1571 1573 *************** 1574 *** 2452,2457****1575 --- 2466,2632 ---- 1572 --- 77,82 ---- 1573 *************** 1574 *** 2466,2632 **** 1576 1575 $(AR) $(ARFLAGS) lib$(SCOTCHLIB)$(LIB) $(?) 1577 1576 -$(RANLIB) lib$(SCOTCHLIB)$(LIB) 1578 1577 1579 +libmexscotch$(LIB) : arch$(OBJ) \1580 +arch_build$(OBJ) \1581 +arch_cmplt$(OBJ) \1582 +arch_cmpltw$(OBJ) \1583 +arch_deco$(OBJ) \1584 +arch_hcub$(OBJ) \1585 +arch_mesh$(OBJ) \1586 +arch_tleaf$(OBJ) \1587 +arch_torus$(OBJ) \1588 +arch_vcmplt$(OBJ) \1589 +arch_vhcub$(OBJ) \1590 +bgraph$(OBJ) \1591 +bgraph_bipart_bd$(OBJ) \1592 +bgraph_bipart_df$(OBJ) \1593 +bgraph_bipart_ex$(OBJ) \1594 +bgraph_bipart_fm$(OBJ) \1595 +bgraph_bipart_gg$(OBJ) \1596 +bgraph_bipart_gp$(OBJ) \1597 +bgraph_bipart_ml$(OBJ) \1598 +bgraph_bipart_st$(OBJ) \1599 +bgraph_bipart_zr$(OBJ) \1600 +bgraph_check$(OBJ) \1601 +bgraph_store$(OBJ) \1602 +common$(OBJ) \1603 +common_file$(OBJ) \1604 +common_file_compress$(OBJ) \1605 +common_file_uncompress$(OBJ) \1606 +common_integer$(OBJ) \1607 +common_memory$(OBJ) \1608 +common_stub$(OBJ) \1609 +gain$(OBJ) \1610 +geom$(OBJ) \1611 +graph$(OBJ) \1612 +graph_base$(OBJ) \1613 +graph_check$(OBJ) \1614 +graph_coarsen$(OBJ) \1615 +graph_induce$(OBJ) \1616 +graph_io$(OBJ) \1617 +graph_io_chac$(OBJ) \1618 +graph_io_habo$(OBJ) \1619 +graph_io_mmkt$(OBJ) \1620 +graph_io_scot$(OBJ) \1621 +graph_list$(OBJ) \1622 +hall_order_hd$(OBJ) \1623 +hall_order_hf$(OBJ) \1624 +hall_order_hx$(OBJ) \1625 +hgraph$(OBJ) \1626 +hgraph_check$(OBJ) \1627 +hgraph_induce$(OBJ) \1628 +hgraph_order_bl$(OBJ) \1629 +hgraph_order_cp$(OBJ) \1630 +hgraph_order_gp$(OBJ) \1631 +hgraph_order_hd$(OBJ) \1632 +hgraph_order_hf$(OBJ) \1633 +hgraph_order_hx$(OBJ) \1634 +hgraph_order_nd$(OBJ) \1635 +hgraph_order_si$(OBJ) \1636 +hgraph_order_st$(OBJ) \1637 +hmesh$(OBJ) \1638 +hmesh_check$(OBJ) \1639 +hmesh_hgraph$(OBJ) \1640 +hmesh_induce$(OBJ) \1641 +hmesh_mesh$(OBJ) \1642 +hmesh_order_bl$(OBJ) \1643 +hmesh_order_cp$(OBJ) \1644 +hmesh_order_gr$(OBJ) \1645 +hmesh_order_gp$(OBJ) \1646 +hmesh_order_hd$(OBJ) \1647 +hmesh_order_hf$(OBJ) \1648 +hmesh_order_hx$(OBJ) \1649 +hmesh_order_nd$(OBJ) \1650 +hmesh_order_si$(OBJ) \1651 +hmesh_order_st$(OBJ) \1652 +kgraph$(OBJ) \1653 +kgraph_map_rb$(OBJ) \1654 +kgraph_map_rb_map$(OBJ) \1655 +kgraph_map_rb_part$(OBJ) \1656 +kgraph_map_st$(OBJ) \1657 +library_arch$(OBJ) \1658 +library_arch_f$(OBJ) \1659 +library_arch_build$(OBJ) \1660 +library_arch_build_f$(OBJ) \1661 +library_arch_cmpltw$(OBJ) \1662 +library_arch_cmpltw_f$(OBJ) \1663 +library_geom$(OBJ) \1664 +library_geom_f$(OBJ) \1665 +library_graph$(OBJ) \1666 +library_graph_f$(OBJ) \1667 +library_graph_base$(OBJ) \1668 +library_graph_base_f$(OBJ) \1669 +library_graph_check$(OBJ) \1670 +library_graph_check_f$(OBJ) \1671 +library_graph_io_chac$(OBJ) \1672 +library_graph_io_chac_f$(OBJ) \1673 +library_graph_io_habo$(OBJ) \1674 +library_graph_io_habo_f$(OBJ) \1675 +library_graph_io_mmkt$(OBJ) \1676 +library_graph_io_mmkt_f$(OBJ) \1677 +library_graph_io_scot$(OBJ) \1678 +library_graph_io_scot_f$(OBJ) \1679 +library_graph_map$(OBJ) \1680 +library_graph_map_f$(OBJ) \1681 +library_graph_map_view$(OBJ) \1682 +library_graph_map_view_f$(OBJ) \1683 +library_graph_order$(OBJ) \1684 +library_graph_order_f$(OBJ) \1685 +library_mesh$(OBJ) \1686 +library_mesh_f$(OBJ) \1687 +library_mesh_graph$(OBJ) \1688 +library_mesh_graph_f$(OBJ) \1689 +library_mesh_io_habo$(OBJ) \1690 +library_mesh_io_habo_f$(OBJ) \1691 +library_mesh_io_scot$(OBJ) \1692 +library_mesh_io_scot_f$(OBJ) \1693 +library_mesh_order$(OBJ) \1694 +library_mesh_order_f$(OBJ) \1695 +library_parser$(OBJ) \1696 +library_parser_f$(OBJ) \1697 +library_random$(OBJ) \1698 +library_random_f$(OBJ) \1699 +mapping$(OBJ) \1700 +mapping_io$(OBJ) \1701 +mesh$(OBJ) \1702 +mesh_check$(OBJ) \1703 +mesh_coarsen$(OBJ) \1704 +mesh_graph$(OBJ) \1705 +mesh_induce_sepa$(OBJ) \1706 +mesh_io$(OBJ) \1707 +mesh_io_habo$(OBJ) \1708 +mesh_io_scot$(OBJ) \1709 +order$(OBJ) \1710 +order_check$(OBJ) \1711 +order_io$(OBJ) \1712 +parser$(OBJ) \1713 +parser_ll$(OBJ) \1714 +parser_yy$(OBJ) \1715 +vgraph$(OBJ) \1716 +vgraph_check$(OBJ) \1717 +vgraph_separate_bd$(OBJ) \1718 +vgraph_separate_es$(OBJ) \1719 +vgraph_separate_fm$(OBJ) \1720 +vgraph_separate_gg$(OBJ) \1721 +vgraph_separate_gp$(OBJ) \1722 +vgraph_separate_ml$(OBJ) \1723 +vgraph_separate_st$(OBJ) \1724 +vgraph_separate_th$(OBJ) \1725 +vgraph_separate_vw$(OBJ) \1726 +vgraph_separate_zr$(OBJ) \1727 +vgraph_store$(OBJ) \1728 +vmesh$(OBJ) \1729 +vmesh_check$(OBJ) \1730 +vmesh_separate_fm$(OBJ) \1731 +vmesh_separate_gg$(OBJ) \1732 +vmesh_separate_gr$(OBJ) \1733 +vmesh_separate_ml$(OBJ) \1734 +vmesh_separate_zr$(OBJ) \1735 +vmesh_separate_st$(OBJ) \1736 +vmesh_store$(OBJ)1737 +$(AR) $(ARFLAGS) $(@) $(?)1738 +-$(RANLIB) $(@)1739 +1578 - libmexscotch$(LIB) : arch$(OBJ) \ 1579 - arch_build$(OBJ) \ 1580 - arch_cmplt$(OBJ) \ 1581 - arch_cmpltw$(OBJ) \ 1582 - arch_deco$(OBJ) \ 1583 - arch_hcub$(OBJ) \ 1584 - arch_mesh$(OBJ) \ 1585 - arch_tleaf$(OBJ) \ 1586 - arch_torus$(OBJ) \ 1587 - arch_vcmplt$(OBJ) \ 1588 - arch_vhcub$(OBJ) \ 1589 - bgraph$(OBJ) \ 1590 - bgraph_bipart_bd$(OBJ) \ 1591 - bgraph_bipart_df$(OBJ) \ 1592 - bgraph_bipart_ex$(OBJ) \ 1593 - bgraph_bipart_fm$(OBJ) \ 1594 - bgraph_bipart_gg$(OBJ) \ 1595 - bgraph_bipart_gp$(OBJ) \ 1596 - bgraph_bipart_ml$(OBJ) \ 1597 - bgraph_bipart_st$(OBJ) \ 1598 - bgraph_bipart_zr$(OBJ) \ 1599 - bgraph_check$(OBJ) \ 1600 - bgraph_store$(OBJ) \ 1601 - common$(OBJ) \ 1602 - common_file$(OBJ) \ 1603 - common_file_compress$(OBJ) \ 1604 - common_file_uncompress$(OBJ) \ 1605 - common_integer$(OBJ) \ 1606 - common_memory$(OBJ) \ 1607 - common_stub$(OBJ) \ 1608 - gain$(OBJ) \ 1609 - geom$(OBJ) \ 1610 - graph$(OBJ) \ 1611 - graph_base$(OBJ) \ 1612 - graph_check$(OBJ) \ 1613 - graph_coarsen$(OBJ) \ 1614 - graph_induce$(OBJ) \ 1615 - graph_io$(OBJ) \ 1616 - graph_io_chac$(OBJ) \ 1617 - graph_io_habo$(OBJ) \ 1618 - graph_io_mmkt$(OBJ) \ 1619 - graph_io_scot$(OBJ) \ 1620 - graph_list$(OBJ) \ 1621 - hall_order_hd$(OBJ) \ 1622 - hall_order_hf$(OBJ) \ 1623 - hall_order_hx$(OBJ) \ 1624 - hgraph$(OBJ) \ 1625 - hgraph_check$(OBJ) \ 1626 - hgraph_induce$(OBJ) \ 1627 - hgraph_order_bl$(OBJ) \ 1628 - hgraph_order_cp$(OBJ) \ 1629 - hgraph_order_gp$(OBJ) \ 1630 - hgraph_order_hd$(OBJ) \ 1631 - hgraph_order_hf$(OBJ) \ 1632 - hgraph_order_hx$(OBJ) \ 1633 - hgraph_order_nd$(OBJ) \ 1634 - hgraph_order_si$(OBJ) \ 1635 - hgraph_order_st$(OBJ) \ 1636 - hmesh$(OBJ) \ 1637 - hmesh_check$(OBJ) \ 1638 - hmesh_hgraph$(OBJ) \ 1639 - hmesh_induce$(OBJ) \ 1640 - hmesh_mesh$(OBJ) \ 1641 - hmesh_order_bl$(OBJ) \ 1642 - hmesh_order_cp$(OBJ) \ 1643 - hmesh_order_gr$(OBJ) \ 1644 - hmesh_order_gp$(OBJ) \ 1645 - hmesh_order_hd$(OBJ) \ 1646 - hmesh_order_hf$(OBJ) \ 1647 - hmesh_order_hx$(OBJ) \ 1648 - hmesh_order_nd$(OBJ) \ 1649 - hmesh_order_si$(OBJ) \ 1650 - hmesh_order_st$(OBJ) \ 1651 - kgraph$(OBJ) \ 1652 - kgraph_map_rb$(OBJ) \ 1653 - kgraph_map_rb_map$(OBJ) \ 1654 - kgraph_map_rb_part$(OBJ) \ 1655 - kgraph_map_st$(OBJ) \ 1656 - library_arch$(OBJ) \ 1657 - library_arch_f$(OBJ) \ 1658 - library_arch_build$(OBJ) \ 1659 - library_arch_build_f$(OBJ) \ 1660 - library_arch_cmpltw$(OBJ) \ 1661 - library_arch_cmpltw_f$(OBJ) \ 1662 - library_geom$(OBJ) \ 1663 - library_geom_f$(OBJ) \ 1664 - library_graph$(OBJ) \ 1665 - library_graph_f$(OBJ) \ 1666 - library_graph_base$(OBJ) \ 1667 - library_graph_base_f$(OBJ) \ 1668 - library_graph_check$(OBJ) \ 1669 - library_graph_check_f$(OBJ) \ 1670 - library_graph_io_chac$(OBJ) \ 1671 - library_graph_io_chac_f$(OBJ) \ 1672 - library_graph_io_habo$(OBJ) \ 1673 - library_graph_io_habo_f$(OBJ) \ 1674 - library_graph_io_mmkt$(OBJ) \ 1675 - library_graph_io_mmkt_f$(OBJ) \ 1676 - library_graph_io_scot$(OBJ) \ 1677 - library_graph_io_scot_f$(OBJ) \ 1678 - library_graph_map$(OBJ) \ 1679 - library_graph_map_f$(OBJ) \ 1680 - library_graph_map_view$(OBJ) \ 1681 - library_graph_map_view_f$(OBJ) \ 1682 - library_graph_order$(OBJ) \ 1683 - library_graph_order_f$(OBJ) \ 1684 - library_mesh$(OBJ) \ 1685 - library_mesh_f$(OBJ) \ 1686 - library_mesh_graph$(OBJ) \ 1687 - library_mesh_graph_f$(OBJ) \ 1688 - library_mesh_io_habo$(OBJ) \ 1689 - library_mesh_io_habo_f$(OBJ) \ 1690 - library_mesh_io_scot$(OBJ) \ 1691 - library_mesh_io_scot_f$(OBJ) \ 1692 - library_mesh_order$(OBJ) \ 1693 - library_mesh_order_f$(OBJ) \ 1694 - library_parser$(OBJ) \ 1695 - library_parser_f$(OBJ) \ 1696 - library_random$(OBJ) \ 1697 - library_random_f$(OBJ) \ 1698 - mapping$(OBJ) \ 1699 - mapping_io$(OBJ) \ 1700 - mesh$(OBJ) \ 1701 - mesh_check$(OBJ) \ 1702 - mesh_coarsen$(OBJ) \ 1703 - mesh_graph$(OBJ) \ 1704 - mesh_induce_sepa$(OBJ) \ 1705 - mesh_io$(OBJ) \ 1706 - mesh_io_habo$(OBJ) \ 1707 - mesh_io_scot$(OBJ) \ 1708 - order$(OBJ) \ 1709 - order_check$(OBJ) \ 1710 - order_io$(OBJ) \ 1711 - parser$(OBJ) \ 1712 - parser_ll$(OBJ) \ 1713 - parser_yy$(OBJ) \ 1714 - vgraph$(OBJ) \ 1715 - vgraph_check$(OBJ) \ 1716 - vgraph_separate_bd$(OBJ) \ 1717 - vgraph_separate_es$(OBJ) \ 1718 - vgraph_separate_fm$(OBJ) \ 1719 - vgraph_separate_gg$(OBJ) \ 1720 - vgraph_separate_gp$(OBJ) \ 1721 - vgraph_separate_ml$(OBJ) \ 1722 - vgraph_separate_st$(OBJ) \ 1723 - vgraph_separate_th$(OBJ) \ 1724 - vgraph_separate_vw$(OBJ) \ 1725 - vgraph_separate_zr$(OBJ) \ 1726 - vgraph_store$(OBJ) \ 1727 - vmesh$(OBJ) \ 1728 - vmesh_check$(OBJ) \ 1729 - vmesh_separate_fm$(OBJ) \ 1730 - vmesh_separate_gg$(OBJ) \ 1731 - vmesh_separate_gr$(OBJ) \ 1732 - vmesh_separate_ml$(OBJ) \ 1733 - vmesh_separate_zr$(OBJ) \ 1734 - vmesh_separate_st$(OBJ) \ 1735 - vmesh_store$(OBJ) 1736 - $(AR) $(ARFLAGS) $(@) $(?) 1737 - -$(RANLIB) $(@) 1738 - 1740 1739 libptscotcherr$(LIB) : library_error$(OBJ) 1741 1740 $(AR) $(ARFLAGS) $(@) $(?) 1742 1741 -$(RANLIB) $(@) 1743 *************** 1744 *** 2467,2469****1745 --- 2642,2651 ---- 1742 --- 2452,2457 ---- 1743 *************** 1744 *** 2642,2651 **** 1746 1745 libscotcherrexit$(LIB) : library_error_exit$(OBJ) 1747 1746 $(AR) $(ARFLAGS) $(@) $(?) 1748 1747 -$(RANLIB) $(@) 1749 + libmexscotcherr$(LIB) : library_error$(OBJ) 1750 + $(AR) $(ARFLAGS) $(@) $(?) 1751 + -$(RANLIB) $(@) 1752 + 1753 + libmexscotcherrexit$(LIB) : library_error_exit$(OBJ) 1754 + $(AR) $(ARFLAGS) $(@) $(?) 1755 + -$(RANLIB) $(@) 1756 Only in new4/src/libscotch: Makefile_save 1757 diff -rc src/src/libscotch/mapping.h new4/src/libscotch/mapping.h 1758 *** src/src/libscotch/mapping.h 2008-10-27 08:27:47.000000000 -0700 1759 --- new4/src/libscotch/mapping.h 2010-05-03 15:37:55.381090077 -0700 1760 *************** 1761 *** 106,112 **** 1762 --- 106,116 ---- 1748 - libmexscotcherr$(LIB) : library_error$(OBJ) 1749 - $(AR) $(ARFLAGS) $(@) $(?) 1750 - -$(RANLIB) $(@) 1751 - 1752 - libmexscotcherrexit$(LIB) : library_error_exit$(OBJ) 1753 - $(AR) $(ARFLAGS) $(@) $(?) 1754 - -$(RANLIB) $(@) 1755 --- 2467,2469 ---- 1756 diff -rc src/src/libscotch/mapping.h old/src/libscotch/mapping.h 1757 *** src/src/libscotch/mapping.h 2010-07-19 10:53:22.980732310 -0700 1758 --- old/src/libscotch/mapping.h 2008-10-27 08:27:47.000000000 -0700 1759 *************** 1760 *** 106,116 **** 1763 1761 int mapInit2 (Mapping * restrict const, const Gnum, const Gnum, const Arch * restrict const, const ArchDom * restrict const); 1764 1762 void mapExit (Mapping * const); 1765 1763 int mapLoad (Mapping * restrict const, const Gnum * restrict const, FILE * restrict const); 1766 +#ifndef MATLAB1764 - #ifndef MATLAB 1767 1765 int mapSave (const Mapping * restrict const, const Gnum * restrict const, FILE * restrict const); 1768 +#else /* MATLAB */1769 +int mapSave (Gnum *, Gnum (**)[2], const Mapping * restrict const, const Gnum * restrict const, FILE * restrict const);1770 +#endif /* MATLAB */1766 - #else /* MATLAB */ 1767 - int mapSave (Gnum *, Gnum (**)[2], const Mapping * restrict const, const Gnum * restrict const, FILE * restrict const); 1768 - #endif /* MATLAB */ 1771 1769 int mapView (const Mapping * restrict const, const Graph * restrict const, FILE * const); 1772 1770 1773 1771 #undef static 1774 diff -rc src/src/libscotch/mapping_io.c new4/src/libscotch/mapping_io.c 1775 *** src/src/libscotch/mapping_io.c 2008-05-22 06:44:43.000000000 -0700 1776 --- new4/src/libscotch/mapping_io.c 2010-05-03 15:37:55.388090082-07001777 *************** 1778 *** 199,204****1779 --- 199,208 ---- 1772 --- 106,112 ---- 1773 diff -rc src/src/libscotch/mapping_io.c old/src/libscotch/mapping_io.c 1774 *** src/src/libscotch/mapping_io.c 2010-07-19 10:53:22.983732330 -0700 1775 --- old/src/libscotch/mapping_io.c 2008-05-22 06:44:43.000000000 -0700 1776 *************** 1777 *** 199,208 **** 1780 1778 1781 1779 int 1782 1780 mapSave ( 1783 +#ifdef MATLAB1784 +Gnum *pnvert,1785 +Gnum (**pmaptab)[2],1786 +#endif /* MATLAB */1781 - #ifdef MATLAB 1782 - Gnum *pnvert, 1783 - Gnum (**pmaptab)[2], 1784 - #endif /* MATLAB */ 1787 1785 const Mapping * restrict const mappptr, 1788 1786 const Gnum * restrict const vlbltab, 1789 1787 FILE * restrict const stream) 1790 *************** 1791 *** 206,226 **** 1788 --- 199,204 ---- 1789 *************** 1790 *** 210,258 **** 1792 1791 const Gnum * restrict vlbltax; 1793 1792 Gnum vertnum; 1794 1793 1794 - #ifdef MATLAB 1795 - printf("mapSave - stream=%p\n",stream); 1796 - #endif /* MATLAB */ 1795 1797 vlbltax = (vlbltab != NULL) ? (vlbltab - mappptr->baseval) : NULL; 1796 1798 1799 - #ifndef MATLAB 1797 1800 if (fprintf (stream, "%ld\n", (long) mappptr->vertnbr) == EOF) { 1798 1801 errorPrint ("mapSave: bad output (1)"); 1799 1802 return (1); 1800 1803 } 1801 1802 for (vertnum = mappptr->baseval; vertnum < (mappptr->vertnbr + mappptr->baseval); vertnum ++) { 1803 if (fprintf (stream, "%ld\t%ld\n", 1804 ! (long) ((vlbltax != NULL) ? vlbltax[vertnum] : vertnum), 1805 (long) archDomNum (&mappptr->archdat, &mappptr->domntab[mappptr->parttax[vertnum]])) == EOF) { 1806 errorPrint ("mapSave: bad output (2)"); 1807 return (1); 1808 } 1809 } 1810 1811 return (0); 1812 } 1813 --- 210,258 ---- 1814 const Gnum * restrict vlbltax; 1815 Gnum vertnum; 1816 1817 + #ifdef MATLAB 1818 + printf("mapSave - stream=%p\n",stream); 1819 + #endif /* MATLAB */ 1820 vlbltax = (vlbltab != NULL) ? (vlbltab - mappptr->baseval) : NULL; 1821 1822 + #ifndef MATLAB 1823 if (fprintf (stream, "%ld\n", (long) mappptr->vertnbr) == EOF) { 1824 errorPrint ("mapSave: bad output (1)"); 1825 return (1); 1826 } 1827 + #else /* MATLAB */ 1828 + if (pnvert) { 1829 + *pnvert=mappptr->vertnbr; 1830 + printf("mapSave - nvert=%d\n",*pnvert); 1831 + } 1832 + if (pmaptab) { 1833 + *pmaptab = (Gnum (*)[2]) malloc(mappptr->vertnbr*2*sizeof(Gnum)); 1834 + printf("mapSave - maptab=%p\n",*pmaptab); 1835 + } 1836 + #endif /* MATLAB */ 1837 1838 + #ifndef MATLAB 1804 - #else /* MATLAB */ 1805 - if (pnvert) { 1806 - *pnvert=mappptr->vertnbr; 1807 - printf("mapSave - nvert=%d\n",*pnvert); 1808 - } 1809 - if (pmaptab) { 1810 - *pmaptab = (Gnum (*)[2]) malloc(mappptr->vertnbr*2*sizeof(Gnum)); 1811 - printf("mapSave - maptab=%p\n",*pmaptab); 1812 - } 1813 - #endif /* MATLAB */ 1814 1815 - #ifndef MATLAB 1839 1816 for (vertnum = mappptr->baseval; vertnum < (mappptr->vertnbr + mappptr->baseval); vertnum ++) { 1840 1817 if (fprintf (stream, "%ld\t%ld\n", … … 1847 1824 } 1848 1825 } 1849 +#else /* MATLAB */1850 +if (pmaptab && *pmaptab)1851 +for (vertnum = mappptr->baseval; vertnum < (mappptr->vertnbr + mappptr->baseval); vertnum ++) {1852 +/* not sure why, but need to offset vlbltax in other direction (jes, 12/11/09) */1853 +// (*pmaptab)[vertnum-mappptr->baseval][0]=((vlbltax != NULL) ? vlbltax[vertnum] : vertnum);1854 +(*pmaptab)[vertnum-mappptr->baseval][0]=((vlbltax != NULL) ? vlbltax[vertnum+mappptr->baseval] : vertnum);1855 +(*pmaptab)[vertnum-mappptr->baseval][1]=archDomNum (&mappptr->archdat, &mappptr->domntab[mappptr->parttax[vertnum]]);1856 +// printf("mapSave - vertnum=%d; vlbltax=%d,archDomNum=%d\n",1857 +// vertnum,((vlbltax != NULL) ? vlbltax[vertnum+mappptr->baseval] : -1),archDomNum (&mappptr->archdat, &mappptr->domntab[mappptr->parttax[vertnum]]));1858 +}1859 +#endif /* MATLAB */1826 - #else /* MATLAB */ 1827 - if (pmaptab && *pmaptab) 1828 - for (vertnum = mappptr->baseval; vertnum < (mappptr->vertnbr + mappptr->baseval); vertnum ++) { 1829 - /* not sure why, but need to offset vlbltax in other direction (jes, 12/11/09) */ 1830 - // (*pmaptab)[vertnum-mappptr->baseval][0]=((vlbltax != NULL) ? vlbltax[vertnum] : vertnum); 1831 - (*pmaptab)[vertnum-mappptr->baseval][0]=((vlbltax != NULL) ? vlbltax[vertnum+mappptr->baseval] : vertnum); 1832 - (*pmaptab)[vertnum-mappptr->baseval][1]=archDomNum (&mappptr->archdat, &mappptr->domntab[mappptr->parttax[vertnum]]); 1833 - // printf("mapSave - vertnum=%d; vlbltax=%d,archDomNum=%d\n", 1834 - // vertnum,((vlbltax != NULL) ? vlbltax[vertnum+mappptr->baseval] : -1),archDomNum (&mappptr->archdat, &mappptr->domntab[mappptr->parttax[vertnum]])); 1835 - } 1836 - #endif /* MATLAB */ 1860 1837 1861 1838 return (0); 1862 1839 } 1863 diff -rc src/src/libscotch/mesh_io_scot.c new4/src/libscotch/mesh_io_scot.c 1864 *** src/src/libscotch/mesh_io_scot.c 2008-05-22 06:44:43.000000000 -0700 1865 --- new4/src/libscotch/mesh_io_scot.c 2010-05-03 15:37:55.394090087 -0700 1866 *************** 1867 *** 85,91 **** 1868 --- 85,95 ---- 1840 --- 206,226 ---- 1841 const Gnum * restrict vlbltax; 1842 Gnum vertnum; 1843 1844 vlbltax = (vlbltab != NULL) ? (vlbltab - mappptr->baseval) : NULL; 1845 1846 if (fprintf (stream, "%ld\n", (long) mappptr->vertnbr) == EOF) { 1847 errorPrint ("mapSave: bad output (1)"); 1848 return (1); 1849 } 1850 1851 for (vertnum = mappptr->baseval; vertnum < (mappptr->vertnbr + mappptr->baseval); vertnum ++) { 1852 if (fprintf (stream, "%ld\t%ld\n", 1853 ! (long) ((vlbltax != NULL) ? vlbltax[vertnum] : vertnum), 1854 (long) archDomNum (&mappptr->archdat, &mappptr->domntab[mappptr->parttax[vertnum]])) == EOF) { 1855 errorPrint ("mapSave: bad output (2)"); 1856 return (1); 1857 } 1858 } 1859 1860 return (0); 1861 } 1862 diff -rc src/src/libscotch/mesh_io_scot.c old/src/libscotch/mesh_io_scot.c 1863 *** src/src/libscotch/mesh_io_scot.c 2010-07-19 10:53:22.986732349 -0700 1864 --- old/src/libscotch/mesh_io_scot.c 2008-05-22 06:44:43.000000000 -0700 1865 *************** 1866 *** 85,95 **** 1869 1867 int o; 1870 1868 1871 1869 if (filesrcptr != NULL) { 1872 +#ifndef MATLAB1870 - #ifndef MATLAB 1873 1871 if (graphLoad (meshptr, filesrcptr, -1, 0) != 0) 1874 +#else /* MATLAB */1875 +if (graphLoad (meshptr, filesrcptr, -1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL) != 0)1876 +#endif /* MATLAB */1872 - #else /* MATLAB */ 1873 - if (graphLoad (meshptr, filesrcptr, -1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL) != 0) 1874 - #endif /* MATLAB */ 1877 1875 return (1); 1878 1876 } 1879 1877 1880 diff -rc src/src/libscotch/module.h new4/src/libscotch/module.h 1881 *** src/src/libscotch/module.h 2009-04-26 23:07:14.000000000 -0700 1882 --- new4/src/libscotch/module.h 2010-05-03 15:37:55.402090094-07001883 *************** 1884 *** 156,161****1885 --- 156,162 ---- 1878 --- 85,91 ---- 1879 diff -rc src/src/libscotch/module.h old/src/libscotch/module.h 1880 *** src/src/libscotch/module.h 2010-07-19 10:53:22.990732375 -0700 1881 --- old/src/libscotch/module.h 2009-04-26 23:07:14.000000000 -0700 1882 *************** 1883 *** 156,162 **** 1886 1884 #define intSave _SCOTCHintSave 1887 1885 #define intAscn _SCOTCHintAscn 1888 1886 #define intPerm _SCOTCHintPerm 1889 +#define intRandResetStatic _SCOTCHintRandResetStatic1887 - #define intRandResetStatic _SCOTCHintRandResetStatic 1890 1888 #define intRandReset _SCOTCHintRandReset 1891 1889 #define intRandInit _SCOTCHintRandInit 1892 1890 /* #define intRandVal _SCOTCHintRandVal Already a macro */ 1893 diff -rc src/src/libscotch/parser_ll.l new4/src/libscotch/parser_ll.l 1894 *** src/src/libscotch/parser_ll.l 2008-05-22 06:44:43.000000000 -0700 1895 --- new4/src/libscotch/parser_ll.l 2010-05-03 15:37:55.410090101-07001896 *************** 1897 *** 192,197****1898 --- 192,214 ---- 1891 --- 156,161 ---- 1892 diff -rc src/src/libscotch/parser_ll.l old/src/libscotch/parser_ll.l 1893 *** src/src/libscotch/parser_ll.l 2010-07-19 10:53:22.993732394 -0700 1894 --- old/src/libscotch/parser_ll.l 2008-05-22 06:44:43.000000000 -0700 1895 *************** 1896 *** 192,214 **** 1899 1897 stratParserInit ( 1900 1898 const char * const string) /*+ Strategy string to parse +*/ 1901 1899 { 1902 +/* reset static variables from previous runs (jes, 4/29/10) */1903 +yy_current_buffer = 0;1904 +yy_hold_char = (char) 0;1905 +yy_n_chars=0; /* number of characters read into yy_ch_buf */1906 +yy_c_buf_p = (char *) 0;1907 +yy_init = 1; /* whether we need to initialize */1908 +yy_start = 0; /* start state number */1909 +yy_did_buffer_switch_on_eof=0;1910 +yy_last_accepting_state=0;1911 +yy_last_accepting_cpos = (char *) 0;1912 +stratparserstringptr = (char *) 0; /* Pointer to the string to parse */1913 +#if YY_STACK_USED1914 +yy_start_stack_ptr = 0;1915 +yy_start_stack_depth = 0;1916 +yy_start_stack = 0;1917 +#endif1918 +1900 - /* reset static variables from previous runs (jes, 4/29/10) */ 1901 - yy_current_buffer = 0; 1902 - yy_hold_char = (char) 0; 1903 - yy_n_chars=0; /* number of characters read into yy_ch_buf */ 1904 - yy_c_buf_p = (char *) 0; 1905 - yy_init = 1; /* whether we need to initialize */ 1906 - yy_start = 0; /* start state number */ 1907 - yy_did_buffer_switch_on_eof=0; 1908 - yy_last_accepting_state=0; 1909 - yy_last_accepting_cpos = (char *) 0; 1910 - stratparserstringptr = (char *) 0; /* Pointer to the string to parse */ 1911 - #if YY_STACK_USED 1912 - yy_start_stack_ptr = 0; 1913 - yy_start_stack_depth = 0; 1914 - yy_start_stack = 0; 1915 - #endif 1916 - 1919 1917 #ifdef FLEX_SCANNER 1920 1918 yyrestart (yyin); /* (Re-)initialize the parser */ 1921 1919 #endif /* FLEX_SCANNER */ 1922 diff -rc src/src/libscotch/parser_yy.y new4/src/libscotch/parser_yy.y 1923 *** src/src/libscotch/parser_yy.y 2008-10-22 15:12:48.000000000 -0700 1924 --- new4/src/libscotch/parser_yy.y 2010-05-03 15:37:55.418090107-07001925 *************** 1926 *** 774,779****1927 --- 774,780 ---- 1920 --- 192,197 ---- 1921 diff -rc src/src/libscotch/parser_yy.y old/src/libscotch/parser_yy.y 1922 *** src/src/libscotch/parser_yy.y 2010-07-19 10:53:22.997732420 -0700 1923 --- old/src/libscotch/parser_yy.y 2008-10-22 15:12:48.000000000 -0700 1924 *************** 1925 *** 774,780 **** 1928 1926 stratParserInit (string); /* Initialize the lexical parser */ 1929 1927 parserstrattab = strattab; /* Point to the parsing tables */ 1930 1928 parserstratcurr = NULL; /* Clear up the temporary strategy pointer */ 1931 +parserparamcurr = NULL; /* reset the last static (jes, 4/29/10) */1929 - parserparamcurr = NULL; /* reset the last static (jes, 4/29/10) */ 1932 1930 1933 1931 if (stratParserParse2 () != 0) { /* Parse the strategy string */ 1934 1932 if (parserstratcurr != NULL) 1935 diff -rc src/src/libscotch/vgraph_separate_vw.c new4/src/libscotch/vgraph_separate_vw.c 1936 *** src/src/libscotch/vgraph_separate_vw.c 2008-05-22 06:44:43.000000000 -0700 1937 --- new4/src/libscotch/vgraph_separate_vw.c 2010-05-03 15:37:55.425090113-07001938 *************** 1939 *** 83,88****1940 --- 83,89 ---- 1933 --- 774,779 ---- 1934 diff -rc src/src/libscotch/vgraph_separate_vw.c old/src/libscotch/vgraph_separate_vw.c 1935 *** src/src/libscotch/vgraph_separate_vw.c 2010-07-19 10:53:22.999732432 -0700 1936 --- old/src/libscotch/vgraph_separate_vw.c 2008-05-22 06:44:43.000000000 -0700 1937 *************** 1938 *** 83,89 **** 1941 1939 FILE * restrict fileptr; 1942 1940 Gnum vertnum; /* Vertex number */ 1943 1941 1944 +printf("vgraphSeparateVw begin -- vgraphseparatevwfilenum=%d\n",vgraphseparatevwfilenum);1942 - printf("vgraphSeparateVw begin -- vgraphseparatevwfilenum=%d\n",vgraphseparatevwfilenum); 1945 1943 sprintf (nametab, "vgraphseparatevw_output_%08d.map", vgraphseparatevwfilenum ++); 1946 1944 if ((fileptr = fopen (nametab, "w+")) == NULL) { 1947 1945 errorPrint ("vgraphSeparateVw: cannot open partition file"); 1948 *************** 1949 *** 102,106****1950 --- 103,108 ---- 1946 --- 83,88 ---- 1947 *************** 1948 *** 103,108 **** 1951 1949 } 1952 1950 } 1953 1951 1954 +printf("vgraphSeparateVw end -- vgraphseparatevwfilenum=%d\n",vgraphseparatevwfilenum);1952 - printf("vgraphSeparateVw end -- vgraphseparatevwfilenum=%d\n",vgraphseparatevwfilenum); 1955 1953 return (0); 1956 1954 } 1957 diff -rc src/src/Makefile new4/src/Makefile 1958 *** src/src/Makefile 2008-09-15 05:50:51.000000000 -0700 1959 --- new4/src/Makefile 2010-06-17 09:31:54.881418932-07001960 *************** 1961 *** 97,102****1962 --- 97,106 ---- 1955 --- 102,106 ---- 1956 diff -rc src/src/Makefile old/src/Makefile 1957 *** src/src/Makefile 2010-07-19 10:53:23.001732445 -0700 1958 --- old/src/Makefile 2008-09-15 05:50:51.000000000 -0700 1959 *************** 1960 *** 97,106 **** 1963 1961 (cd scotch ; $(MAKE) VERSION=\"$(VERSION)\" ptscotch && $(MAKE) ptinstall) 1964 1962 (cd libscotchmetis ; $(MAKE) ptscotch && $(MAKE) ptinstall) 1965 1963 1966 +mexscotch : required1967 +(cd libscotch ; $(MAKE) VERSION=\"$(VERSION)\" mexscotch && $(MAKE) mexinstall)1968 +(cd scotch ; $(MAKE) VERSION=\"$(VERSION)\" mexscotch && $(MAKE) mexinstall)1969 +1964 - mexscotch : required 1965 - (cd libscotch ; $(MAKE) VERSION=\"$(VERSION)\" mexscotch && $(MAKE) mexinstall) 1966 - (cd scotch ; $(MAKE) VERSION=\"$(VERSION)\" mexscotch && $(MAKE) mexinstall) 1967 - 1970 1968 install : required $(bindir) $(includedir) $(libdir) $(mandir)/man1 1971 1969 -$(CP) -f ../bin/[agm]*$(EXE) $(bindir) 1972 1970 -$(CP) -f ../include/*scotch*.h $(includedir) 1973 Only in new4/src: Makefile.inc 1974 Only in new4/src/scotch: gmap_mex.c 1975 Only in new4/src/scotch: gmapx.c 1976 diff -rc src/src/scotch/Makefile new4/src/scotch/Makefile 1977 *** src/src/scotch/Makefile 2009-04-27 02:19:43.000000000 -0700 1978 --- new4/src/scotch/Makefile 2010-06-17 10:09:39.718475100 -0700 1979 *************** 1980 *** 49,59 **** 1971 --- 97,102 ---- 1972 Only in src/src: Makefile.inc 1973 Only in src/src/scotch: gmap_mex.c 1974 Only in src/src/scotch: gmapx.c 1975 diff -rc src/src/scotch/Makefile old/src/scotch/Makefile 1976 *** src/src/scotch/Makefile 2010-07-19 10:53:23.004732465 -0700 1977 --- old/src/scotch/Makefile 2009-04-27 02:19:43.000000000 -0700 1978 *************** 1979 *** 49,62 **** 1981 1980 %$(EXE) : %.c 1982 1981 $(CC) $(CFLAGS) -I$(includedir) -I../libscotch -DSCOTCH_VERSION=\"$(VERSION)\" $(<) -o $(@) -L$(libdir) -l$(SCOTCHLIB) -l$(SCOTCHLIB)errexit $(LDFLAGS) 1983 1982 1983 - %$(MEX) : %.c 1984 - $(CCM) $(MFLAGS) -I$(includedir) -I../libscotch -DSCOTCH_VERSION=\"$(VERSION)\" $(<) -o $(@) -L$(libdir) -l$(SCOTCHLIB) -l$(SCOTCHLIB)errexit $(LDFLAGS) 1985 - 1984 1986 ## 1985 1987 ## Project rules. 1986 1988 ## 1987 1989 1988 ! .PHONY : ptscotch scotch ptinstallinstall clean realclean1990 ! .PHONY : ptscotch scotch mexscotch ptinstall install mexinstall clean realclean 1989 1991 1990 1992 scotch : clean 1991 1993 $(MAKE) CC="$(CCS)" SCOTCHLIB=scotch \ 1992 --- 49, 62----1994 --- 49,59 ---- 1993 1995 %$(EXE) : %.c 1994 1996 $(CC) $(CFLAGS) -I$(includedir) -I../libscotch -DSCOTCH_VERSION=\"$(VERSION)\" $(<) -o $(@) -L$(libdir) -l$(SCOTCHLIB) -l$(SCOTCHLIB)errexit $(LDFLAGS) 1995 1997 1996 + %$(MEX) : %.c1997 + $(CCM) $(MFLAGS) -I$(includedir) -I../libscotch -DSCOTCH_VERSION=\"$(VERSION)\" $(<) -o $(@) -L$(libdir) -l$(SCOTCHLIB) -l$(SCOTCHLIB)errexit $(LDFLAGS)1998 +1999 1998 ## 2000 1999 ## Project rules. 2001 2000 ## 2002 2001 2003 ! .PHONY : ptscotch scotch mexscotch ptinstall install mexinstall clean realclean2002 ! .PHONY : ptscotch scotch ptinstall install clean realclean 2004 2003 2005 2004 scotch : clean 2006 2005 $(MAKE) CC="$(CCS)" SCOTCHLIB=scotch \ 2007 2006 *************** 2008 *** 94,99 **** 2009 --- 97,108 ---- 2007 *** 97,108 **** 2010 2008 dgscat$(EXE) \ 2011 2009 dgtst$(EXE) 2012 2010 2013 +mexscotch : clean2014 +$(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 \2015 +gmapx$(OBJ)2016 +$(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 \2017 +gmap_mex$(MEX)2018 +2011 - mexscotch : clean 2012 - $(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 \ 2013 - gmapx$(OBJ) 2014 - $(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 \ 2015 - gmap_mex$(MEX) 2016 - 2019 2017 install : 2020 2018 -$(CP) acpl$(EXE) amk_ccc$(EXE) amk_fft2$(EXE) amk_grf$(EXE) amk_hy$(EXE) amk_m2$(EXE) amk_p2$(EXE) atst$(EXE) gbase$(EXE) gcv$(EXE) gmap$(EXE) gmk_hy$(EXE) gmk_m2$(EXE) gmk_m3$(EXE) gmk_msh$(EXE) gmk_ub2$(EXE) gmtst$(EXE) gord$(EXE) gotst$(EXE) gout$(EXE) *gtst$(EXE) gscat$(EXE) mcv$(EXE) mmk_m2$(EXE) mmk_m3$(EXE) mord$(EXE) mtst$(EXE) $(bindir) 2021 2019 -$(RM) $(bindir)/gpart$(EXE) 2022 *************** 2023 *** 104,111****2024 --- 113,126 ---- 2020 --- 94,99 ---- 2021 *************** 2022 *** 113,126 **** 2025 2023 -$(RM) $(bindir)/dgpart$(EXE) 2026 2024 -$(LN) $(bindir)/dgmap$(EXE) $(bindir)/dgpart$(EXE) 2027 2025 2028 +mexinstall :2029 +-$(CP) gmap_mex$(MEX) $(bindir)2030 +-$(RM) $(bindir)/gpart_mex$(MEX)2031 +-$(LN) $(bindir)/gmap_mex$(MEX) $(bindir)/gpart_mex$(MEX)2032 +2026 - mexinstall : 2027 - -$(CP) gmap_mex$(MEX) $(bindir) 2028 - -$(RM) $(bindir)/gpart_mex$(MEX) 2029 - -$(LN) $(bindir)/gmap_mex$(MEX) $(bindir)/gpart_mex$(MEX) 2030 - 2033 2031 clean : 2034 2032 -$(RM) *~ *$(OBJ) acpl$(EXE) amk_ccc$(EXE) amk_fft2$(EXE) amk_grf$(EXE) amk_hy$(EXE) amk_m2$(EXE) amk_p2$(EXE) atst$(EXE) gbase$(EXE) gcv$(EXE) *gmap$(EXE) gmk_hy$(EXE) gmk_m2$(EXE) gmk_m3$(EXE) gmk_msh$(EXE) gmk_ub2$(EXE) gmtst$(EXE) *gord$(EXE) gotst$(EXE) gout$(EXE) *gpart$(EXE) *gscat$(EXE) *gtst$(EXE) mcv$(EXE) mmk_m2$(EXE) mmk_m3$(EXE) mord$(EXE) mtst$(EXE) 2035 +-$(RM) gmap_mex$(MEX)2033 - -$(RM) gmap_mex$(MEX) 2036 2034 2037 2035 realclean : clean 2038 2036 2039 *************** 2040 *** 365,367****2041 --- 380,403 ---- 2037 --- 104,111 ---- 2038 *************** 2039 *** 380,403 **** 2042 2040 $(libdir)/libscotch$(LIB) \ 2043 2041 $(libdir)/libscotcherrexit$(LIB) \ 2044 2042 mtst.h 2045 + 2046 + gmapx$(OBJ) : gmapx.c \ 2047 + ../libscotch/module.h \ 2048 + ../libscotch/common.h \ 2049 + $(includedir)/scotch.h \ 2050 + $(libdir)/libscotch$(LIB) \ 2051 + $(libdir)/libscotcherrexit$(LIB) \ 2052 + gmap.h 2053 + 2054 + gmap_mex$(MEX) : gmap_mex.c \ 2055 + ../libscotch/module.h \ 2056 + ../libscotch/common.h \ 2057 + $(includedir)/scotch.h \ 2058 + $(libdir)/libscotch$(LIB) \ 2059 + $(libdir)/libscotcherrexit$(LIB) \ 2060 + gmap.h 2061 + 2062 + gpart_mex$(MEX) : gmap_mex$(MEX) 2063 + -$(RM) gpart_mex$(MEX) 2064 + -$(LN) gmap_mex$(MEX) gpart_mex$(MEX) 2065 + 2043 - 2044 - gmapx$(OBJ) : gmapx.c \ 2045 - ../libscotch/module.h \ 2046 - ../libscotch/common.h \ 2047 - $(includedir)/scotch.h \ 2048 - $(libdir)/libscotch$(LIB) \ 2049 - $(libdir)/libscotcherrexit$(LIB) \ 2050 - gmap.h 2051 - 2052 - gmap_mex$(MEX) : gmap_mex.c \ 2053 - ../libscotch/module.h \ 2054 - ../libscotch/common.h \ 2055 - $(includedir)/scotch.h \ 2056 - $(libdir)/libscotch$(LIB) \ 2057 - $(libdir)/libscotcherrexit$(LIB) \ 2058 - gmap.h 2059 - 2060 - gpart_mex$(MEX) : gmap_mex$(MEX) 2061 - -$(RM) gpart_mex$(MEX) 2062 - -$(LN) gmap_mex$(MEX) gpart_mex$(MEX) 2063 - 2064 --- 365,367 ----
Note:
See TracChangeset
for help on using the changeset viewer.