Patch: Fix Parallel Performance of PrintField.h

Jeffrey Oldham oldham at codesourcery.com
Fri Oct 19 21:36:39 UTC 2001


2001-10-16  Jeffrey D. Oldham  <oldham at codesourcery.com>

        These changes were suggested by Dave Nystrom and John Hall's
        use of 'blanca-2001Oct01'.

        * PrintField.h (PerformPrintField<S,A,1>::print): Ensure the field
        is up-to-date before printing.
        (PerformPrintField<S,A,Dim>::print): Likewise.
 
Tested on       sequential Linux using gcc3.1 by running src/Field/tests/FieldTour[12]
Approved by     Scott Haney
Applied to	blanca-2001Oct01

Thanks,
Jeffrey D. Oldham
oldham at codesourcery.com
-------------- next part --------------
Index: PrintField.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/NewField/Attic/PrintField.h,v
retrieving revision 1.3
diff -c -p -r1.3 PrintField.h
*** PrintField.h	2001/03/29 18:17:32	1.3
--- PrintField.h	2001/10/17 00:19:53
*************** PerformPrintField<S,A,1>::print(const Pr
*** 379,384 ****
--- 379,389 ----
  
    CTAssert(A::dimensions == 1);
  
+   // Output should update the field before printing.
+ 
+   a.update();
+   Pooma::blockAndEvaluate();
+ 
    // determine the domain and domain-iterator type in the given field
  
    typedef typename A::Domain_t              Domain_t;
*************** PerformPrintField<S,A,Dim>::print(const 
*** 464,469 ****
--- 469,479 ----
    // make sure this is the right function
  
    CTAssert(A::dimensions == Dim && Dim > 1);
+ 
+   // Output should update the field before printing.
+ 
+   a.update();
+   Pooma::blockAndEvaluate();
  
    // determine the domain and domain-iterator type in the given field
  


More information about the pooma-dev mailing list