RFA: Patch: Fix Parallel Performance of PrintField.h

Jeffrey Oldham oldham at codesourcery.com
Wed Oct 17 02:05:16 UTC 2001


This request replaces my early request.

Scott, would you please verify my use of a.applyRelations() rather
than a.update(), for the mainline?

Anyone, OK to commit these two patches?

**** Patch to 'mainline'
 
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.

Mainline:
Tested on       sequential Linux using gcc3.1 by running src/Field/tests/FieldTour[123]

blanca-2001Oct01:
Tested on       sequential Linux using gcc3.1 by running src/Field/tests/FieldTour[12]
 
Approved by     ???you???

Thanks,
Jeffrey D. Oldham
oldham at codesourcery.com
-------------- next part --------------
Index: PrintField.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Field/PrintField.h,v
retrieving revision 1.3
diff -c -p -r1.3 PrintField.h
*** PrintField.h	2001/08/30 01:15:07	1.3
--- PrintField.h	2001/10/16 22:54:24
*************** PerformPrintField<S,A,1>::print(const Pr
*** 377,382 ****
--- 377,387 ----
  
    CTAssert(A::dimensions == 1);
  
+   // Output should update the field before printing.
+ 
+   a.applyRelations();
+   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 
*** 462,467 ****
--- 467,477 ----
    // make sure this is the right function
  
    CTAssert(A::dimensions == Dim && Dim > 1);
+ 
+   // Output should update the field before printing.
+ 
+   a.applyRelations();
+   Pooma::blockAndEvaluate();
  
    // determine the domain and domain-iterator type in the given field
  
-------------- 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