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
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
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<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.firedrakeproject.org%2Fcheckpointing.html&data=04%7C01%7Cwalker%40lsu.edu%7Cca39c31d9a454847e53308d9826442e1%7C2d4dad3f50ae47d983a09ae2b1f466f8%7C0%7C0%7C637684189425310388%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=c6uADgf7dX7VSslGT9Snj2VBpmvLF4%2FK7oSoDAIWVfc%3D&reserved=0>). 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<mailto:firedrake-bounces@imperial.ac.uk> <firedrake-bounces@imperial.ac.uk<mailto:firedrake-bounces@imperial.ac.uk>> on behalf of Andrew Hicks <ahick17@lsu.edu<mailto:ahick17@lsu.edu>> Sent: Tuesday, September 28, 2021 3:53 AM To: firedrake <firedrake@imperial.ac.uk<mailto: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
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-exter... 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<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.firedrakeproject.org%2Fcheckpointing.html&data=04%7C01%7Cwalker%40lsu.edu%7Cca39c31d9a454847e53308d9826442e1%7C2d4dad3f50ae47d983a09ae2b1f466f8%7C0%7C0%7C637684189425310388%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=c6uADgf7dX7VSslGT9Snj2VBpmvLF4%2FK7oSoDAIWVfc%3D&reserved=0>). 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<mailto:firedrake-bounces@imperial.ac.uk> <firedrake-bounces@imperial.ac.uk<mailto:firedrake-bounces@imperial.ac.uk>> on behalf of Andrew Hicks <ahick17@lsu.edu<mailto:ahick17@lsu.edu>> Sent: Tuesday, September 28, 2021 3:53 AM To: firedrake <firedrake@imperial.ac.uk<mailto: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
participants (4)
- 
                
                Andrew Hicks
- 
                
                Ham, David A
- 
                
                Sagiyama, Koki
- 
                
                Shawn W Walker