Ignore:
Timestamp:
04/18/13 11:10:45 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: fixed some missing cast

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/modules/Chacox/Chacox.cpp

    r13622 r14644  
    2222        #ifdef _HAVE_CHACO_ //only works if Chaco library has been compiled in.
    2323
    24         extern int Using_Main;  /* is main routine being called? */
    25         extern char *PARAMS_FILENAME;   /* name of file with parameter updates */
    26         extern double EIGEN_TOLERANCE;  /* tolerance for eigen calculations */
    27         extern int OUTPUT_ASSIGN;       /* whether to write assignment to file */
    28         extern int DEBUG_MEMORY;        /* debug memory allocation and freeing? */
    29         extern int DEBUG_TRACE; /* trace main execution path */
    30         extern int DEBUG_PARAMS;        /* debug flag for reading parameters */
    31         extern long RANDOM_SEED;        /* seed for random number generators */
    32         extern int ECHO;                /* controls amount of output */
    33         extern int PROMPT;              /* prompt for input or not? */
    34         extern int PRINT_HEADERS;       /* print lines for output sections? */
    35         extern int MATCH_TYPE;      /* matching routine to call */
    36         extern double input_time;       /* times data file input */
    37         extern double start_time;       /* time partitioning starts */
    38         FILE     *params_file;  /* file with parameter value updates */
    39         int       global_method;        /* global partitioning method */
    40         int       local_method; /* local partitioning method */
    41         double    eigtol;               /* tolerance in eigenvector calculation */
    42         int       ndims;                /* dimension of recursive partitioning */
    43         int       architecture; /* 0 => hypercube, d => d-dimensional mesh */
    44         int       ndims_tot;    /* total number of cube dimensions to divide */
    45         int       mesh_dims[3]; /* dimensions of mesh of processors */
    46         long      seed;         /* for random graph mutations */
    47         int       rqi_flag;             /* use RQI/Symmlq eigensolver? */
    48         int       vmax;         /* if so, how many vertices to coarsen down to? */
    49         char      outassignname[NAME_LENGTH];   /* assignment output file name */
    50         char      outfilename[NAME_LENGTH];     /* name of output file */
    51         char     *outassignptr; /* name or null pointer for output assignment */
    52         char     *outfileptr;   /* name or null pointer for output file */
    53         int       nprocs;               /* number of processors being divided into */
    54         double    time;         /* timing marker */
    55         int       flag;         /* return code from input routines */
    56         double   *smalloc();    /* safe version of malloc */
    57         //double    seconds();  /* returns elapsed time in seconds */
    58         /*int       sfree(), interface(), affirm();
    59         void      input_queries(), smalloc_stats(), read_params(), clear_timing();*/
     24        extern int     Using_Main;                   /* is main routine being called?                */
     25        extern char   *PARAMS_FILENAME;              /* name of file with parameter updates          */
     26        extern double  EIGEN_TOLERANCE;              /* tolerance for eigen calculations            */
     27        extern int     OUTPUT_ASSIGN;                /* whether to write assignment to file          */
     28        extern int     DEBUG_MEMORY;                 /* debug memory allocation and freeing?        */
     29        extern int     DEBUG_TRACE;                  /* trace main execution path                    */
     30        extern int     DEBUG_PARAMS;                 /* debug flag for reading parameters            */
     31        extern long    RANDOM_SEED;                  /* seed for random number generators            */
     32        extern int     ECHO;                         /* controls amount of output                    */
     33        extern int     PROMPT;                       /* prompt for input or not?                    */
     34        extern int     PRINT_HEADERS;                /* print lines for output sections?            */
     35        extern int     MATCH_TYPE;                   /* matching routine to call                    */
     36        extern double  input_time;                   /* times data file input                        */
     37        extern double  start_time;                   /* time partitioning starts                    */
     38        FILE          *params_file;                  /* file with parameter value updates            */
     39        int            global_method;                /* global partitioning method                  */
     40        int            local_method;                 /* local partitioning method                    */
     41        double         eigtol;                       /* tolerance in eigenvector calculation        */
     42        int            ndims;                        /* dimension of recursive partitioning          */
     43        int            architecture;                 /* 0 => hypercube, d => d-dimensional mesh      */
     44        int            ndims_tot;                    /* total number of cube dimensions to divide    */
     45        int            mesh_dims[3];                 /* dimensions of mesh of processors            */
     46        long           seed;                         /* for random graph mutations                  */
     47        int            rqi_flag;                     /* use RQI/Symmlq eigensolver?                  */
     48        int            vmax;                         /* if so, how many vertices to coarsen down to? */
     49        char           outassignname[NAME_LENGTH];   /* assignment output file name                  */
     50        char           outfilename[NAME_LENGTH];     /* name of output file                          */
     51        char          *outassignptr;                 /* name or null pointer for output assignment  */
     52        char          *outfileptr;                   /* name or null pointer for output file        */
     53        int            nprocs;                       /* number of processors being divided into      */
     54        double         time;                         /* timing marker                                */
     55        int            flag;                         /* return code from input routines              */
     56        double        *smalloc();                    /* safe version of malloc                      */
     57        //double       seconds();                    /* returns elapsed time in seconds              */
     58        /*int sfree(), interface(), affirm();
     59        void input_queries()  , smalloc_stats(), read_params(), clear_timing();  */
    6060
    6161        int i,tvwgt;
     
    7474        params_file = fopen(PARAMS_FILENAME, "r");
    7575        if (params_file == NULL && DEBUG_PARAMS > 1) {
    76                 printf("Parameter file `%s' not found; using default parameters.\n",
    77                            PARAMS_FILENAME);
     76                printf("Parameter file `%s' not found; using default parameters.\n",PARAMS_FILENAME);
    7877        }
    7978
     
    10099
    101100        if ((int)options[OPT_VWGTS] && vwgts) {
    102                 printf("%s -- Applying weights for %d vertices.\n",
    103                            __FUNCT__,nvtxs);
     101                printf("%s -- Applying weights for %d vertices.\n",__FUNCT__,nvtxs);
    104102                tvwgt = 0;
    105103                for (i=0; i<nvtxs; i++)
     
    109107                tvwgt = nvtxs;
    110108                if      ( (int)options[OPT_VWGTS] && !vwgts)
    111                         printf("%s -- Vertex weight flag=%d, but no vertex weights specified.\n",
    112                                    __FUNCT__,options[OPT_VWGTS]);
     109                        printf("%s -- Vertex weight flag=%d, but no vertex weights specified.\n",__FUNCT__,(int)options[OPT_VWGTS]);
    113110                else if (!(int)options[OPT_VWGTS] &&  vwgts)
    114                         printf("%s -- Vertex weight flag=%d, so specified vertex weights ignored.\n",
    115                                    __FUNCT__,options[OPT_VWGTS]);
     111                        printf("%s -- Vertex weight flag=%d, so specified vertex weights ignored.\n",__FUNCT__,(int)options[OPT_VWGTS]);
    116112        }
    117113
     
    122118        else {
    123119                if      ( (int)options[OPT_EWGTS] && !ewgts)
    124                         printf("%s -- Edge weight flag=%d, but no edge weights specified.\n",
    125                                    __FUNCT__,options[OPT_EWGTS]);
     120                        printf("%s -- Edge weight flag=%d, but no edge weights specified.\n",__FUNCT__,(int)options[OPT_EWGTS]);
    126121                else if (!(int)options[OPT_EWGTS] &&  ewgts)
    127                         printf("%s -- Edge weight flag=%d, so specified edge weights ignored.\n",
    128                                    __FUNCT__,options[OPT_EWGTS]);
     122                        printf("%s -- Edge weight flag=%d, so specified edge weights ignored.\n",__FUNCT__,(int)options[OPT_EWGTS]);
    129123        }
    130124
     
    155149        for (i=0; i<start[nvtxs]; adjacency[i++]++);
    156150
    157         printf("\n%s -- Calling Chaco interface:\n\n",
    158                    __FUNCT__);
     151        printf("\n%s -- Calling Chaco interface:\n\n",__FUNCT__);
    159152        flag = interface(nvtxs, start, adjacency,
    160153                  ((int)options[OPT_VWGTS] && vwgts ? vwgts : NULL),
     
    166159                  global_method, local_method, rqi_flag, vmax, ndims,
    167160                  eigtol, seed);
    168         printf("\n%s -- Chaco interface returning flag=%d.\n",
    169                    __FUNCT__,flag);
     161        printf("\n%s -- Chaco interface returning flag=%d.\n",__FUNCT__,flag);
    170162
    171163/*  Reset adjacency matrix in case calling function needs it.  */
Note: See TracChangeset for help on using the changeset viewer.