> On Jan 4, 2017, at 4:21 PM, Manuel Valera <[email protected]> wrote: > > Hello all, happy new year, > > I'm working on parallelizing my code, it worked and provided some results > when i just called more than one processor, but created artifacts because i > didn't need one image of the whole program in each processor, conflicting > with each other. > > Since the pressure solver is the main part i need in parallel im chosing mpi > to run everything in root processor until its time to solve for pressure, at > this point im trying to create a distributed vector using either > > call VecCreateMPI(PETSC_COMM_WORLD,PETSC_DECIDE,nbdp,xp,ierr) > or > call VecCreate(PETSC_COMM_WORLD,xp,ierr); CHKERRQ(ierr) > call VecSetType(xp,VECMPI,ierr) > call VecSetSizes(xp,PETSC_DECIDE,nbdp,ierr); CHKERRQ(ierr) > > > In both cases program hangs at this point, something it never happened on the > naive way i described before. I've made sure the global size, nbdp, is the > same in every processor. What can be wrong?
How are you insuring that all processes are calling the VecCreateMPI()? My guess is that one process in MPI_COMM_WORLD is calling it and the other is not hence it is hanging waiting for that process. Run with two processes with option -start_in_debugger and two xterms should pop up, type cont in both, when it hangs wait a little while and then do control c in each terminal and type bt to see where each process is. Barry > > Thanks for your kind help, > > Manuel.
