file parallelism with obj/stl

I have a python script that read obj/mtl files and shows the right material. it uses the obj_mtl_importer.py shared here.
When I run it under mpi/pvbatch doesn’t escalate. I think because of the way to applying the material to the data is sequential
I am thinking of load the files, do the mtl mapping and render in parallel and merge the rendering in some way. I have read that paraview/vtk can do something like this but I don’t catch how to do.
Can some give some light or point to some example of how to do this?
Thanks

@jourdain

I’m guessing what you were hoping was to load a file per mpi process?
Moreover in the case of pvbatch, the script should guard which action should be done on which process. The scripts don’t do that as they assume local + serial execution.

Hi, yes. I want to load one obj/mtl file per mpi process, do the mapping using the mtl definition and render in a common view. How can I do this in a python script? Do you have some script that load the geometry and do the mapping for it and later render in a common view?
Thanks
Reynaldo

It will be tricky to do but possible. You will have to create a trivial producer per material then load the data using the proper vtk reader while dealing with which file should belong to which MPI rank and bind the reader output dataset to the correct trivial producer.

Then map the material to the representation of each trivial producer.

Also you should run pvbacth in symmetric mode unless you guard the proxy interaction to just process 0.

1 Like

Thanks, I can think about. Can you give a link to any python mpi example that load data from file and save the final result?