[petsc-dev] DMplex: Natural Ordering and subDM

2017-11-21 Thread Blaise A Bourdin
Hi,
I am fighting with natural ordering in DMplex with multi-fields / multi 
components DM.
I need to read / write files in a distribution-independent ordering. The 
natural way to do so is to define the natural ordering as that of the file, 
then call DMPlexGlobalToNaturalBegin/End before VecView:
The pseudo code would be

  DMPlexCreateFromFile(PETSC_COMM_WORLD,ifilename,interpolate,);
  // create default section associated with a complicated layout of multiple 
fields 
  // (U,\alpha,\sigma)
  DMSetUseNatural(dmUAS,PETSC_TRUE);
  DMPlexDistribute(dmUAS,0,,);

  DMGetGlobalVector(dmDist,);
  DMGetGlobalVector(dmDist,);
  DMPlexGlobalToNaturalBegin(dmDist,UAS,UASNatural);
  DMPlexGlobalToNaturalEnd(dmDist,UAS,UASNatural);
  // Do my I/O stuff using UASNatural

If I try to do the same thing one field at a time, things break:
Say that I get the subDM for the first field (U):

  DMCreateSubDM(dmDist,1,,,);

Then dmU->useNatural is PETSC_FALSE and  I cannot compute dmU->sfnatural using 
DMPlexCreateGlobalToNaturalSF since I do not have the “sequential” version of 
dmU.

What is the proper way to handle this situation? Creating sequential subDMs and 
calling DMDistribute on each of them is ugly and possibly costly.

Regards,

Blaise

-- 
Department of Mathematics and Center for Computation & Technology
Louisiana State University, Baton Rouge, LA 70803, USA
Tel. +1 (225) 578 1612, Fax  +1 (225) 578 4276 http://www.math.lsu.edu/~bourdin









Re: [petsc-dev] test harness chokes

2017-11-21 Thread Scott Kruger



PR here:
https://bitbucket.org/petsc/petsc/pull-requests/805/bug-fix-for-empty-tests-default/diff



On 11/20/17 2:11 PM, Smith, Barry F. wrote:


on

/*TEST

  test:

  test:
 suffix: 2
 nsize: 2

TEST*/

with

$ ./config/gmakegentest.py
KeyError: 0



--
Tech-X Corporation   kru...@txcorp.com
5621 Arapahoe Ave, Suite A   Phone: (720) 974-1841
Boulder, CO 80303Fax:   (303) 448-7756


Re: [petsc-dev] test harness with tests that depend on multiple source files

2017-11-21 Thread Scott Kruger



On 11/20/17 8:59 PM, Smith, Barry F. wrote:




On Nov 20, 2017, at 9:37 PM, Jed Brown  wrote:

Scott Kruger  writes:


depends keyword:

From:
   dm/examples/tutorials/ex13f90.F90

!/*TEST
!
!   build:
!  requires: !complex
!  depends:  ex13f90aux.F90
!
!TEST*/


How would anyone know that "requires" refers to PETSc configuration
while "depends" refers to files?  Why not something like
"requires_file"?


   And hence requires_config ?



My own view is that `requires` was is meant
for a *user* interested in that particular test,

whereas

`depends` is something a *developer*, who
presumably understands the concepts of build
dependencies trees, would specify as he is
developing the test

so trying to correlate these two keywords is
not required.

But happy to change these if that is what the
consensus is.

Scott

P.S.  I'll note that the literal answer to Jed's
original question of RTFM does work and has been
there for over a year:

gabrielle 44: git blame developers.tex | grep depends:
29921a8f05c src/docs/tex/manual/developers.tex (Scott Kruger 
2016-09-28 09:56:26 -0500 1662) \item[{depends:




--
Tech-X Corporation   kru...@txcorp.com
5621 Arapahoe Ave, Suite A   Phone: (720) 974-1841
Boulder, CO 80303Fax:   (303) 448-7756