[SCM] Gerris Flow Solver branch, upstream, updated. e8f73a07832050124d2b8bf6c6f35b33180e65a8

Stephane Popinet popinet at users.sf.net
Tue Nov 24 12:24:34 UTC 2009


The following commit has been merged in the upstream branch:
commit 7a20f68eef309ec7592003e9bb74325994ec31b4
Author: Stephane Popinet <popinet at users.sf.net>
Date:   Wed Jul 15 13:51:13 2009 +1000

    New '--pid' option for gerris2D/3D
    
    darcs-hash:20090715035113-d4795-fe0a4bba5cd37fab8c8329733cb474d25f42ff54.gz

diff --git a/doc/manpages/gerris2D.1 b/doc/manpages/gerris2D.1
index b521f4c..bb134ed 100644
--- a/doc/manpages/gerris2D.1
+++ b/doc/manpages/gerris2D.1
@@ -19,6 +19,9 @@ A summary of options is included below.
 .B \-s N, \-\-split=N
 Splits the domain N times and returns the corresponding simulation.
 .TP
+.B \-i, \-\-pid
+Keep box pids when splitting. The default is to allocate one pid per box.
+.TP
 .B \-P N, \-\-partition=N
 Partition the domain in 2^N subdomains and returns the corresponding simulation.
 .TP
diff --git a/src/gerris.c b/src/gerris.c
index 6b2861b..3cfa39b 100644
--- a/src/gerris.c
+++ b/src/gerris.c
@@ -49,7 +49,7 @@ int main (int argc, char * argv[])
   int c = 0;
   guint split = 0;
   guint npart = 0;
-  gboolean profile = FALSE, macros = FALSE;
+  gboolean profile = FALSE, macros = FALSE, one_box_per_pe = TRUE;
   gchar * m4_options = g_strdup ("-P");
   gint maxlevel = -2;
 
@@ -60,6 +60,7 @@ int main (int argc, char * argv[])
 #ifdef HAVE_GETOPT_LONG
     static struct option long_options[] = {
       {"split", required_argument, NULL, 's'},
+      {"pid", no_argument, NULL, 'i'},
       {"partition", required_argument, NULL, 'p'},
       {"profile", no_argument, NULL, 'P'},
       {"define", required_argument, NULL, 'D'},
@@ -70,10 +71,10 @@ int main (int argc, char * argv[])
       { NULL }
     };
     int option_index = 0;
-    switch ((c = getopt_long (argc, argv, "hVs:p:PD:md",
+    switch ((c = getopt_long (argc, argv, "hVs:ip:PD:md",
 			      long_options, &option_index))) {
 #else /* not HAVE_GETOPT_LONG */
-    switch ((c = getopt (argc, argv, "hVs:p:PD:md"))) {
+    switch ((c = getopt (argc, argv, "hVs:ip:PD:md"))) {
 #endif /* not HAVE_GETOPT_LONG */
     case 'P': /* profile */
       profile = TRUE;
@@ -84,6 +85,9 @@ int main (int argc, char * argv[])
     case 's': /* split */
       split = atoi (optarg);
       break;
+    case 'i': /* pid */
+      one_box_per_pe = FALSE;
+      break;
     case 'D': { /* define */
       gchar * tmp = g_strjoin (" ", m4_options, "-D", optarg, NULL);
       g_free (m4_options);
@@ -103,6 +107,7 @@ int main (int argc, char * argv[])
 	     "\n"
 	     "  -s N   --split=N     splits the domain N times and returns\n"
              "                       the corresponding simulation\n"
+	     "  -i     --pid         keep box pids when splitting\n"
              "  -p N   --partition=N partition the domain in 2^N subdomains and returns\n" 
              "                       the corresponding simulation\n"
 	     "  -d     --data        when splitting or partitioning, output all data\n"
@@ -246,7 +251,7 @@ int main (int argc, char * argv[])
     gfs_simulation_refine (simulation);
     gfs_clock_stop (domain->timer);
     while (split) {
-      gfs_domain_split (domain, TRUE);
+      gfs_domain_split (domain, one_box_per_pe);
       split--;
     }
     gfs_simulation_write (simulation, maxlevel, stdout);

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list