Hi Shawn,

 

To answer your second question first, Firedrake does not support OpenMP. The key reason for this is that PETSc does not support OpenMP.

 

The mesh vertex coordinates are available by projecting the mesh coordinates to linear (if they aren’t already) and accessing the .dat. This is documented in the manual: https://www.firedrakeproject.org/interpolation.html#interpolation-from-external-data

 

Cheers,

 

David

 

From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Shawn W Walker <walker@lsu.edu>
Date: Tuesday, 28 September 2021 at 13:54
To: Sagiyama, Koki <k.sagiyama@imperial.ac.uk>, Andrew Hicks <ahick17@lsu.edu>, firedrake <firedrake@imperial.ac.uk>
Subject: Re: [firedrake] Writing to file in parallel

Hello.

 

Is there a way to loop through the vertices of a mesh and output their coordinates?

 

Also, what if the code is only doing shared memory parallelization (openMP instead of MPI).  Is it really an issue then?

 

-Shawn

 

From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> On Behalf Of Sagiyama, Koki
Sent: Tuesday, September 28, 2021 4:42 AM
To: Andrew Hicks <ahick17@lsu.edu>; firedrake <firedrake@imperial.ac.uk>
Subject: Re: [firedrake] Writing to file in parallel

 

Dear Andrew,

 

What is currently available for checkpointing is DumbCheckpoint (https://www.firedrakeproject.org/checkpointing.html).

It, however, does not save functions in association with the mesh, so, when loading those functions, you would need to provide the exact same mesh with the same parallel distribution as that those functions were originally defined on.

 

A new checkpointing feature though will be available in a month or so, which facilitates saving functions in associations with meshes using arbitrary number of MPI processes. It is designed for a general DoF layout, so it will still save DoF values serialised.

 

 

Thank you,

Koki

 


From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Andrew Hicks <ahick17@lsu.edu>
Sent: Tuesday, September 28, 2021 3:53 AM
To: firedrake <firedrake@imperial.ac.uk>
Subject: [firedrake] Writing to file in parallel

 

Hello all,

 

The website mentions a way to print data from a function that has been computed in parallel:

 

with u.dat.vec_ro as vu:

    vu.view()

 

However, I want to write this data to a file, and I’m not sure how. Moreover, is there a way I can format this so that instead of printing everything in one row, it prints it in as many rows as there are coordinates of the function? So for instance, can I write a file with three rows of data for a three dimensional function space?

 

Thank you,

Andrew Hicks