I think I might of solved my problem by disabling the partitioning on the
pid_mesh (pid_mesh.skip_partioning(true)). I still need to do some testing.

On Tue, Nov 20, 2012 at 3:36 PM, Andrew E Slaughter <
[email protected]> wrote:

> Hello,
> I am working on writing files in parallel and would like to work on each
> portion of the partitioned mesh, so I am trying to work with the
> create_pid_mesh. If I understand correctly, this function should create a
> Mesh object that behaves like an unpartitioned mesh, so if I have a file
> that can write my file from a Mesh object is would also work from the
> object initialized with create_pid_mesh. Am I correct in this thinking?
>
> Using the rational above the following test program should run, but I am
> getting a segmentation violation when run in parallel at the
> create_pid_mesh call. The program runs fine without MPI and runs with MPI
> if the pid variable is not defined as mesh.processor_id(), but given
> explicitly a number such as 0 or 1. I am using the svn trunk from a few
> days ago.
>
> ------- Test Program ----------------------------------------------
>
> #include <libmesh.h>
> #include <mesh.h>
> #include <mesh_generation.h>
> using namespace libMesh;
>
> int main(int argc, char** argv){
>
> LibMeshInit init (argc, argv);
>
> Mesh mesh;
> MeshTools::Generation::build_square(mesh, 4, 4, -1, 1, -1, 1, QUAD4);
> mesh.prepare_for_use();
>
> const unsigned int pid = mesh.processor_id(); // runs in parallel with pid
> = 0 or pid = 1 etc.
>
> Mesh pid_mesh;
> mesh.create_pid_mesh(pid_mesh, pid);
>
> // my_write_function_goes_here(pid_mesh);
> }
>
> --
> Andrew E. Slaughter, PhD
> [email protected]
>
> Materials Process Design and Control Laboratory
> Sibley School of Mechanical and Aerospace Engineering
> 169 Frank H. T. Rhodes Hall
> Cornell University
> Ithaca, NY 14853-3801
> (607) 229-1829
> http://aeslaughter.github.com/
>
>


-- 
Andrew E. Slaughter, PhD
[email protected]

Materials Process Design and Control Laboratory
Sibley School of Mechanical and Aerospace Engineering
169 Frank H. T. Rhodes Hall
Cornell University
Ithaca, NY 14853-3801
(607) 229-1829
http://aeslaughter.github.com/
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to