Ice Sheet System Model  4.18
Code documentation
Scotchx.h
Go to the documentation of this file.
1 
5 #ifndef _SCOTCHX_H
6 #define _SCOTCHX_H
7 
8 #undef __FUNCT__
9 #define __FUNCT__ "Scotchx"
10 
11 #ifdef HAVE_CONFIG_H
12 #include <config.h>
13 #else
14 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
15 #endif
16 
17 #include <stdio.h>
18 #include <string.h>
19 #include "../../classes/classes.h"
20 
21 #ifdef _HAVE_SCOTCH_ //only works if scotch library has been compiled in.
22 
23  #define GMAP
24 
25  #ifdef _PETSC_SCOTCH_
26  #include "scotch_module.h"
27  #include "scotch_common.h"
28  #include "scotch_gmap.h"
29  #endif
30 
31  #ifdef _HAVE_MPI_
32  #include "ptscotch.h"
33  #else
34  #include "scotch.h"
35  #endif
36 
37  /*
38  ** The static variables.
39  */
40 
41  static int C_partNbr = 2; /* Default number of parts */
42  static int C_paraNum = 0; /* Number of parameters */
43  static int C_paraNbr = 0; /* No parameters for mapping */
44  static int C_fileNum = 0; /* Number of file in arg list */
45  static int C_fileNbr = 4; /* Number of files for mapping */
46  static File C_fileTab[C_FILENBR] = { /* File array */
47  { "-", NULL, "r" },
48  { "-", NULL, "r" },
49  { "-", NULL, "w" },
50  { "-", NULL, "w" } };
51 
52  static const char * C_usageList[] = { /* Usage */
53  "gmap [<input source file> [<input target file> [<output mapping file> [<output log file>]]]] <options>",
54  "gpart [<nparts>] [<input source file> [<output mapping file> [<output log file>]]] <options>",
55  " -h : Display this help",
56  " -m<strat> : Set mapping strategy (see user's manual)",
57  " -s<obj> : Force unity weights on <obj>:",
58  " e : edges",
59  " v : vertices",
60  " -V : Print program version and copyright",
61  " -v<verb> : Set verbose mode to <verb>:",
62  " m : mapping information",
63  " s : strategy information",
64  " t : timing information",
65  "",
66  "See default strategy with option '-vs'",
67  NULL };
68 
69 #endif
70 
71 /* local prototypes: */
72 int gmapx ( int (**pmaptabi)[2], int argcm, char *argvm[], int nvi, int ne2i, int *ir, int *jc, int *vli, int *vwi, int *ewi, char archtyp[], int nai, int *api);
73 
74 #endif /* _SCOTCHX_H */
gmapx
int gmapx(int(**pmaptabi)[2], int argcm, char *argvm[], int nvi, int ne2i, int *ir, int *jc, int *vli, int *vwi, int *ewi, char archtyp[], int nai, int *api)
Definition: Scotchx.cpp:71