1 /* Copyright 2008,2010,2011 ENSEIRB, INRIA & CNRS 2 ** 3 ** This file is part of the Scotch software package for static mapping, 4 ** graph partitioning and sparse matrix ordering. 5 ** 6 ** This software is governed by the CeCILL-C license under French law 7 ** and abiding by the rules of distribution of free software. You can 8 ** use, modify and/or redistribute the software under the terms of the 9 ** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following 10 ** URL: "http://www.cecill.info". 11 ** 12 ** As a counterpart to the access to the source code and rights to copy, 13 ** modify and redistribute granted by the license, users are provided 14 ** only with a limited warranty and the software's author, the holder of 15 ** the economic rights, and the successive licensors have only limited 16 ** liability. 17 ** 18 ** In this respect, the user's attention is drawn to the risks associated 19 ** with loading, using, modifying and/or developing or reproducing the 20 ** software by the user in light of its specific status of free software, 21 ** that may mean that it is complicated to manipulate, and that also 22 ** therefore means that it is reserved for developers and experienced 23 ** professionals having in-depth computer knowledge. Users are therefore 24 ** encouraged to load and test the software's suitability as regards 25 ** their requirements in conditions enabling the security of their 26 ** systems and/or data to be ensured and, more generally, to use and 27 ** operate it in the same conditions as regards security. 28 ** 29 ** The fact that you are presently reading this means that you have had 30 ** knowledge of the CeCILL-C license and that you accept its terms. 31 */ 32 /************************************************************/ 33 /** **/ 34 /** NAME : kdgraph_map_rb_part.h **/ 35 /** **/ 36 /** AUTHOR : Francois PELLEGRINI **/ 37 /** **/ 38 /** FUNCTION : These lines are the data declaration **/ 39 /** for the Parallel Dual Recursive **/ 40 /** Bipartitioning mapping algorithm. **/ 41 /** **/ 42 /** DATES : # Version 5.1 : from : 23 jun 2008 **/ 43 /** to 31 aug 2011 **/ 44 /** **/ 45 /************************************************************/ 46 47 /* 48 ** The type and structure definitions. 49 */ 50 51 /*+ This structure holds folded graph data, whether centralized or distributed +*/ 52 53 typedef struct KdgraphMapRbPartGraph_ { 54 ArchDom domnorg; /*+ Domain to bipartition at this stage +*/ 55 int procnbr; /*+ Number of processes holding graph +*/ 56 INT levlnum; /*+ Level number +*/ 57 union { 58 Graph cgrfdat; /*+ Centralized graph +*/ 59 Dgraph dgrfdat; /*+ Distributed graph +*/ 60 } data; 61 } KdgraphMapRbPartGraph; 62 63 /*+ This structure holds the data passed to the subgraph building threads. +*/ 64 65 typedef struct KdgraphMapRbPartThread_ { 66 Dmapping * mappptr; /*+ Pointer to mapping structure +*/ 67 Dgraph * orggrafptr; /*+ Pointer to original graph +*/ 68 const ArchDom * inddomnptr; /*+ Pointer to subjob domain +*/ 69 Gnum indvertnbr; /*+ Local number of vertices in subgraph +*/ 70 GraphPart indpartval; /*+ Graph part from which to extract subgraph +*/ 71 GraphPart * indparttax; /*+ Based local vertex partition flags in subgraph +*/ 72 KdgraphMapRbPartGraph * fldgrafptr; /*+ Pointer to folded graph union area +*/ 73 int fldpartval; /*+ Part of processor array to which to fold to +*/ 74 int fldprocnbr; /*+ Number of processes in folded communicator +*/ 75 int fldprocnum; /*+ Rank of process in folded communicator, or -1 +*/ 76 MPI_Comm fldproccomm; /*+ Communicator for the folded graph, if any +*/ 77 } KdgraphMapRbPartThread; 78 79 /*+ This structure holds the data passed to each bipartitioning job. +*/ 80 81 typedef struct KdgraphMapRbPartData_ { 82 Dmapping * mappptr; 83 const KdgraphMapRbParam * paraptr; 84 double comploadrat; /*+ Ideal vertex load per target load +*/ 85 double comploadmin; /*+ Minimum vertex load per target load +*/ 86 double comploadmax; /*+ Maximum vertex load per target load +*/ 87 } KdgraphMapRbPartData; 88 89 /* 90 ** The function prototypes. 91 */ 92 93 #ifndef KDGRAPH_MAP_RB 94 #define static 95 #endif 96 97 int kdgraphMapRbPart (Kdgraph * const, Kdmapping * const, const KdgraphMapRbParam * const); 98 99 #undef static 100