Skip to content
Snippets Groups Projects
Commit b0aca33d authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Remove the random selection method, not adding much to the party.

Test that methods known to fail, failback to vectorize.
Tidyup message and remove commented code cruft.
Use standard formatting (mostly, some choices really suck).
Use the one true cell_getid macro in space.h.
parent 255d51d3
Branches
Tags
2 merge requests!136Master,!76Add new initial partition schemes and extend repartition ones.
...@@ -178,7 +178,7 @@ int main(int argc, char *argv[]) { ...@@ -178,7 +178,7 @@ int main(int argc, char *argv[]) {
if (!strcpy(ICfileName, optarg)) error("Error parsing IC file name."); if (!strcpy(ICfileName, optarg)) error("Error parsing IC file name.");
break; break;
case 'p': case 'p':
/* Parition type is one of "g", "r", "m", "w", or "v"; "g" can be /* Parition type is one of "g", "m", "w", or "v"; "g" can be
* followed by three numbers defining the grid. */ * followed by three numbers defining the grid. */
switch (optarg[0]) { switch (optarg[0]) {
case 'g': case 'g':
...@@ -189,9 +189,6 @@ int main(int argc, char *argv[]) { ...@@ -189,9 +189,6 @@ int main(int argc, char *argv[]) {
error("Error parsing grid."); error("Error parsing grid.");
} }
break; break;
case 'r':
ipart.type = INITPART_RANDOM;
break;
case 'm': case 'm':
ipart.type = INITPART_METIS_NOWEIGHT; ipart.type = INITPART_METIS_NOWEIGHT;
break; break;
...@@ -251,7 +248,7 @@ int main(int argc, char *argv[]) { ...@@ -251,7 +248,7 @@ int main(int argc, char *argv[]) {
#if defined(WITH_MPI) #if defined(WITH_MPI)
if (myrank == 0) { if (myrank == 0) {
message("Running with %i thread(s) per node.", nr_threads); message("Running with %i thread(s) per node.", nr_threads);
message("Initial partition: %s", initpart_name[ipart.type]); message("Using initial partition %s", initpart_name[ipart.type]);
if (ipart.type == INITPART_GRID) if (ipart.type == INITPART_GRID)
message("grid set to [ %i %i %i ].", ipart.grid[0], ipart.grid[1], ipart.grid[2]); message("grid set to [ %i %i %i ].", ipart.grid[0], ipart.grid[1], ipart.grid[2]);
message("Using %s repartitioning", repart_name[reparttype]); message("Using %s repartitioning", repart_name[reparttype]);
......
This diff is collapsed.
This diff is collapsed.
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
/* Initial partitioning types. */ /* Initial partitioning types. */
enum initpart_type { enum initpart_type {
INITPART_GRID = 0, INITPART_GRID = 0,
INITPART_RANDOM,
INITPART_VECTORIZE, INITPART_VECTORIZE,
INITPART_METIS_WEIGHT, INITPART_METIS_WEIGHT,
INITPART_METIS_NOWEIGHT INITPART_METIS_NOWEIGHT
...@@ -52,14 +51,13 @@ enum repart_type { ...@@ -52,14 +51,13 @@ enum repart_type {
/* Simple descriptions of types for reports. */ /* Simple descriptions of types for reports. */
extern const char *repart_name[]; extern const char *repart_name[];
int part_pick_random(struct space *s, int nregions, float *samplelist);
void part_split_random(struct space *s, int nregions, float *samplelist);
void part_pick_vector(struct space *s, int nregions, int *samplecells); void part_pick_vector(struct space *s, int nregions, int *samplecells);
void part_split_vector(struct space *s, int nregions, int *samplecells); void part_split_vector(struct space *s, int nregions, int *samplecells);
void part_pick_metis(struct space *s, int nregions, int *vertexw, void part_pick_metis(struct space *s, int nregions, int *vertexw, int *edgew,
int *edgew, int *celllist); int *celllist);
void part_split_metis(struct space *s, int nregions, int *celllist); void part_split_metis(struct space *s, int nregions, int *celllist);
int part_check_complete(struct space *s, int verbose, int nregions);
#endif /* SWIFT_PARTITION_H */ #endif /* SWIFT_PARTITION_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment