freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Add --mpi configure switch


From: Jeffrey D. Oldham
Subject: Re: [PATCH] Add --mpi configure switch
Date: Mon, 05 Jan 2004 13:12:38 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

Richard Guenther wrote:
Hi!

This (finally) adds --mpi configure switch to enable POOMA_MPI.  It checks
for mpiCC or mpic++ in either $MPICH_ROOT/bin or the current $PATH and
uses the first one found as new $cpp and $link.

I didn't change the Cheetah configure switch which now has the slightly
confusing name --messaging.  Maybe we want to change this to --cheetah.

Ok?

Yes.  This is good progress.

I'll start full testing of serial, MPI and Cheetah to see if I forgot a
part of the changes after the pending stuff is committed.

Thanks,

Richard.


2004Jan02  Richard Guenther <address@hidden>

        * configure: add --mpi switch to enable MPI messaging using
        mpiCC/mpic++.

--- /home/richard/src/pooma/cvs/r2/configure    2003-12-30 18:19:29.000000000 
+0100
+++ configure   2004-01-02 00:40:10.000000000 +0100
@@ -209,8 +208,9 @@
 $hdf5nm = "--hdf5";
 $fftwnm = "--fftw";
 $cheetahnm = "--messaging";
+$mpinm = "--mpi";
 $strictnm = "--strict";
 $archfnsnm = "--arch-specific-functions";

 ### configure options
 $dbgprntnm = "-v";           # turn on verbose output from configure
@@ -236,10 +237,11 @@
   [$sharednm,    "",         "create a shared library."],
   [$finternm,    "",         "include fortran support libraries."],
   [$nofinternm,  "",         "do not include the fortran libraries."],
   [$preinstnm,   "",         "build preinstantiations of several classes."],
   [$serialnm,    "",         "configure to run serially, no parallelism."],
-  [$threadsnm,  "",         "include threads capability, if available."],
+  [$threadsnm,   "",         "include threads capability, if available."],
   [$cheetahnm,   "",         "enable use of CHEETAH communications package."],
+  [$mpinm,       "",         "enable use of MPI communications package."],
   [$schednm,     "<scheduler>", "use <scheduler> for thread scheduling."],
   [$pawsnm,      "",         "enable PAWS program coupling, if available."],
   [$pawsdevnm,   "",         "enable PAWS program coupling for PAWS devel."],
@@ -1276,13 +1266,22 @@
     {
       $cheetah = 1;
     }
-  print "Set cheetah = $cheetah\n" if $dbgprnt;
+  if (scalar @{$arghash{$mpinm}} > 1)
+    {
+      $mpi = 1;
+    }
   $messaging = $cheetah + $mpi;
+  if ($messaging>1 or $messaging and scalar @{$arghash{$serialnm}}> 1)
+    {
+      printerror "$cheetahnm and/or $mpinm and/or $serialnm given.  Use only 
one.";
+    }
+  print "Set messaging = $messaging\n" if $dbgprnt;

   # add a define indicating whether CHEETAH/MPI is available, and configure
   # extra options to include and define lists
   my $defmessaging = $messaging;
   my $defcheetah = 0;
+  my $defmpi = 0;
   if ($cheetah)
     {
       if (exists $ENV{"CHEETAHDIR"})
@@ -1299,7 +1298,6 @@
         }

       $defcheetah = 1;
-
       $scheduler = "serialAsync";

       # add in the extra compilation settings for CHEETAH.
@@ -1315,8 +1313,40 @@
          $link = $cheetah_link;
         }
     }
+  elsif ($mpi)
+    {
+      my $mpiCC = "\$(MPICH_ROOT)/bin/mpiCC";
+      if (system("test -x $MPICH_ROOT/bin/mpiCC") == 0)
+        {
+          $mpiCC = "\$(MPICH_ROOT)/bin/mpiCC";
+        }
+      elsif (system("test -x $MPICH_ROOT/bin/mpic++") == 0)
+        {
+          $mpiCC = "\$(MPICH_ROOT)/bin/mpic++";
+        }
+      elsif (system("which mpiCC") == 0)
+        {
+          $mpiCC = "mpiCC";
+        }
+      elsif (system("which mpic++") == 0)
+        {
+          $mpiCC = "mpic++";
+        }
+      else
+        {
+          die "There is no known MPI location.  Select one by setting MPICH_ROOT or 
adjusting your PATH.\n";
+        }
+
+      $defmpi = 1;
+      $scheduler = "serialAsync";
+
+      # use special compiler script for MPI.
+      $cpp  = $mpiCC;
+      $link = $mpiCC;
+    }
   add_yesno_define("POOMA_MESSAGING", $defmessaging);
   add_yesno_define("POOMA_CHEETAH", $defcheetah);
+  add_yesno_define("POOMA_MPI", $defmpi);
 }




--
Jeffrey D. Oldham
address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]