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

« back to all changes in this revision

Viewing changes to src/libscotch/graph_io_mmkt.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 2008 ENSEIRB, INRIA & CNRS
 
1
/* Copyright 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
/**   DATES      : # Version 5.0  : from : 17 jan 2008     **/
44
44
/**                                 to   : 21 mar 2008     **/
45
45
/**                # Version 5.1  : from : 27 apr 2010     **/
46
 
/**                                 to   : 27 apr 2010     **/
 
46
/**                                 to   : 11 aug 2010     **/
47
47
/**                                                        **/
48
48
/************************************************************/
49
49
 
269
269
 
270
270
  baseadj = 1 - grafptr->baseval;                 /* Output base is always 1 */
271
271
 
272
 
  o = (fprintf (filesrcptr, "%%%%MatrixMarket matrix coordinate pattern symmetric\n%% Produced by Scotch graphGeomSaveMmkt\n%ld %ld %ld\n", /* Write graph header */
273
 
                (long) grafptr->vertnbr,
274
 
                (long) grafptr->vertnbr,
275
 
                (long) ((grafptr->edgenbr / 2) + grafptr->vertnbr)) == EOF);
 
272
  o = (fprintf (filesrcptr, "%%%%MatrixMarket matrix coordinate pattern symmetric\n%% Produced by Scotch graphGeomSaveMmkt\n" GNUMSTRING " " GNUMSTRING " " GNUMSTRING "\n", /* Write graph header */
 
273
                (Gnum) grafptr->vertnbr,
 
274
                (Gnum) grafptr->vertnbr,
 
275
                (Gnum) ((grafptr->edgenbr / 2) + grafptr->vertnbr)) == EOF);
276
276
 
277
277
  for (vertnum = grafptr->baseval; (o == 0) && (vertnum < grafptr->vertnnd); vertnum ++) {
278
278
    Gnum              vlblnum;                    /* Vertex label to output */
279
279
 
280
280
    vlblnum = ((grafptr->vlbltax != NULL) ? grafptr->vlbltax[vertnum] : vertnum) + baseadj;
281
281
 
282
 
    if (fprintf (filesrcptr, "%ld %ld\n",         /* Write diagonal term */
283
 
                 (long) vlblnum, (long) vlblnum) < 0) {
 
282
    if (fprintf (filesrcptr, GNUMSTRING " " GNUMSTRING "\n", /* Write diagonal term */
 
283
                 (Gnum) vlblnum,
 
284
                 (Gnum) vlblnum) < 0) {
284
285
      o = 1;
285
286
      break;
286
287
    }
294
295
      vlblend += baseadj;
295
296
 
296
297
      if (vlblend < vlblnum) {
297
 
        if (fprintf (filesrcptr, "%ld %ld\n",
298
 
                     (long) vlblnum, (long) vlblend) < 0) {
 
298
        if (fprintf (filesrcptr, GNUMSTRING " " GNUMSTRING "\n",
 
299
                     (Gnum) vlblnum,
 
300
                     (Gnum) vlblend) < 0) {
299
301
          o = 1;
300
302
          break;
301
303
        }