~ubuntu-branches/ubuntu/trusty/scotch/trusty

« back to all changes in this revision

Viewing changes to src/libscotch/order_io.c

  • Committer: Bazaar Package Importer
  • Author(s): "Adam C. Powell, IV", Christophe Trophime, Adam C. Powell, IV
  • Date: 2010-12-29 13:07:19 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20101229130719-jwalolw5d6av6wqx
Tags: 5.1.11.dfsg-1
[Christophe Trophime]
* New upstream release
* Forward-ported patches to version 5.1.10b.
* Install scotch headers properly.
* Fix chrpath commands in debian/rules.
* Fix (pt)scotch library install paths.
* Fix lintian errors and warnings.

[Adam C. Powell, IV]
* Forward-ported patches to version 5.1.11.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright 2004,2007,2008 ENSEIRB, INRIA & CNRS
 
1
/* Copyright 2004,2007,2008,2010 ENSEIRB, INRIA & CNRS
2
2
**
3
3
** This file is part of the Scotch software package for static mapping,
4
4
** graph partitioning and sparse matrix ordering.
43
43
/**                                 to     28 jun 2004     **/
44
44
/**                # Version 5.0  : from : 12 sep 2007     **/
45
45
/**                                 to     27 feb 2008     **/
 
46
/**                # Version 5.1  : from : 11 aug 2010     **/
 
47
/**                                 to     11 aug 2010     **/
46
48
/**                                                        **/
47
49
/************************************************************/
48
50
 
141
143
    return     (1);
142
144
  }
143
145
 
144
 
  if (fprintf (stream, "%ld\n", (long) ordeptr->vnodnbr) == EOF) {
 
146
  if (fprintf (stream, GNUMSTRING "\n",
 
147
               (Gnum) ordeptr->vnodnbr) == EOF) {
145
148
    errorPrint ("orderSave: bad output (1)");
146
149
    memFree    (permtab);
147
150
    return     (1);
151
154
 
152
155
  if (vlbltax != NULL) {                          /* If ordering has label array */
153
156
    for (vertnum = 0; vertnum < ordeptr->vnodnbr; vertnum ++) {
154
 
      if (fprintf (stream, "%ld\t%ld\n",
155
 
                   (long) vlbltax[vertnum + ordeptr->baseval],
156
 
                   (long) vlbltax[permtab[vertnum]]) == EOF) {
 
157
      if (fprintf (stream, GNUMSTRING "\t" GNUMSTRING "\n",
 
158
                   (Gnum) vlbltax[vertnum + ordeptr->baseval],
 
159
                   (Gnum) vlbltax[permtab[vertnum]]) == EOF) {
157
160
        errorPrint ("orderSave: bad output (2)");
158
161
        memFree    (permtab);
159
162
        return     (1);
162
165
  }
163
166
  else {
164
167
    for (vertnum = 0; vertnum < ordeptr->vnodnbr; vertnum ++) {
165
 
      if (fprintf (stream, "%ld\t%ld\n",
166
 
                   (long) (vertnum + ordeptr->baseval),
167
 
                   (long) permtab[vertnum]) == EOF) {
 
168
      if (fprintf (stream, GNUMSTRING "\t" GNUMSTRING "\n",
 
169
                   (Gnum) (vertnum + ordeptr->baseval),
 
170
                   (Gnum) permtab[vertnum]) == EOF) {
168
171
        errorPrint ("orderSave: bad output (3)");
169
172
        memFree    (permtab);
170
173
        return     (1);
198
201
  Gnum                  cblknum;
199
202
  int                   o;
200
203
 
201
 
  if (fprintf (stream, "%ld\n", (long) ordeptr->vnodnbr) == EOF) {
 
204
  if (fprintf (stream, GNUMSTRING "\n",
 
205
               (Gnum) ordeptr->vnodnbr) == EOF) {
202
206
    errorPrint ("orderSaveMap: bad output (1)");
203
207
    return     (1);
204
208
  }
222
226
 
223
227
  vlbltax = (vlbltab != NULL) ? (vlbltab - ordeptr->baseval) : NULL;
224
228
  for (vnodnum = ordeptr->baseval, o = 0; vnodnum < vnodnnd; vnodnum ++) {
225
 
    if (fprintf (stream, "%ld\t%ld\n",
226
 
                 (long) ((vlbltax != NULL) ? vlbltax[vnodnum] : vnodnum),
227
 
                 (long) cblktax[vnodnum]) == EOF) {
 
229
    if (fprintf (stream, GNUMSTRING "\t" GNUMSTRING "\n",
 
230
                 (Gnum) ((vlbltax != NULL) ? vlbltax[vnodnum] : vnodnum),
 
231
                 (Gnum) cblktax[vnodnum]) == EOF) {
228
232
      errorPrint ("orderSaveMap: bad output (2)");
229
233
      o = 1;
230
234
      break;
258
262
  Gnum                  cblknum;
259
263
  int                   o;
260
264
 
261
 
  if (fprintf (stream, "%ld\n", (long) ordeptr->vnodnbr) == EOF) {
 
265
  if (fprintf (stream, GNUMSTRING "\n",
 
266
               (Gnum) ordeptr->vnodnbr) == EOF) {
262
267
    errorPrint ("orderSaveTree: bad output (1)");
263
268
    return     (1);
264
269
  }
284
289
 
285
290
  vlbltax = (vlbltab != NULL) ? (vlbltab - ordeptr->baseval) : NULL;
286
291
  for (vnodnum = ordeptr->baseval, o = 0; vnodnum < vnodnnd; vnodnum ++) {
287
 
    if (fprintf (stream, "%ld\t%ld\n",
288
 
                 (long) ((vlbltax != NULL) ? vlbltax[vnodnum] : vnodnum),
289
 
                 (long) cblktax[vnodnum]) == EOF) {
 
292
    if (fprintf (stream, GNUMSTRING "\t" GNUMSTRING "\n",
 
293
                 (Gnum) ((vlbltax != NULL) ? vlbltax[vnodnum] : vnodnum),
 
294
                 (Gnum) cblktax[vnodnum]) == EOF) {
290
295
      errorPrint ("orderSaveMap: bad output (2)");
291
296
      o = 1;
292
297
      break;