[Dart-dev] [4096] DART/trunk/doc/mpi: fix the syntax in the test programs if you are using the include file for mpi , and make the system block consistent with the main line code

nancy at ucar.edu nancy at ucar.edu
Mon Oct 5 14:50:30 MDT 2009


An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/dart-dev/attachments/20091005/200ff47e/attachment.html 
-------------- next part --------------
Modified: DART/trunk/doc/mpi/ftest_go.f90
===================================================================
--- DART/trunk/doc/mpi/ftest_go.f90	2009-10-05 20:45:57 UTC (rev 4095)
+++ DART/trunk/doc/mpi/ftest_go.f90	2009-10-05 20:50:30 UTC (rev 4096)
@@ -32,9 +32,12 @@
 ! which defines the interfaces to the MPI library routines, or an include
 ! file which defines constants.  Try to use the module if it is available.
 
-!use mpi
-include "mpif.h"
+use mpi
 
+implicit none
+
+!include "mpif.h"
+
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
 
@@ -46,18 +49,17 @@
 ! you an error about an undefined symbol (something like '_system_').  
 ! Comment this block in or out as needed.
 
-! ! interface block for getting return code back from system() routine
-! interface
-!  function system(string)
-!   character(len=*) :: string
-!   integer :: system
-!  end function system
-! end interface
-! ! end block
+  ! interface block for getting return code back from system() routine
+  interface
+   function system(string)
+    character(len=*) :: string
+    integer :: system
+   end function system
+  end interface
+  ! end block
 
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-implicit none
 
 ! integer variables
 integer :: ierror, myrank, totalprocs

Modified: DART/trunk/doc/mpi/ftest_stop.f90
===================================================================
--- DART/trunk/doc/mpi/ftest_stop.f90	2009-10-05 20:45:57 UTC (rev 4095)
+++ DART/trunk/doc/mpi/ftest_stop.f90	2009-10-05 20:50:30 UTC (rev 4096)
@@ -33,9 +33,12 @@
 ! which defines the interfaces to the MPI library routines, or an include
 ! file which defines constants.  Try to use the module if it is available.
 
-!use mpi
-include "mpif.h"
+use mpi
 
+implicit none
+
+!include "mpif.h"
+
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
 
 
@@ -47,18 +50,17 @@
 ! you an error about an undefined symbol (something like '_system_').  
 ! Comment this block in or out as needed.
 
-! ! interface block for getting return code back from system() routine
-! interface
-!  function system(string)
-!   character(len=*) :: string
-!   integer :: system
-!  end function system
-! end interface
-! ! end block
+  ! interface block for getting return code back from system() routine
+  interface
+   function system(string)
+    character(len=*) :: string
+    integer :: system
+   end function system
+  end interface
+  ! end block
 
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
 
-implicit none
 
 ! integer variables
 integer :: ierror, myrank, totalprocs


More information about the Dart-dev mailing list