First time here? Check out the FAQ!
![]() | 1 | initial version |
Thank you very much for your answer. What I'm looking for is a simple procedure from Wing IDE so that my students would be able to debug the code they write for my class on parallel and concurrent programming. I want they to learn how to use mpi4py's mpi_comm_world as processes' communicator. Thus what I need is to launch X number of processes from Wing IDE and debug each of them as well as their interactions through mpi_comm_world. They will be working on python scripts like this: from mpi4py import MPI import numpy
comm = MPI.COMM_WORLD rank = comm.Get_rank()
if rank == 0: data = numpy.arange(1000, dtype='i') comm.Send([data, MPI.INT], dest=1, tag=77) elif rank == 1: data = numpy.empty(1000, dtype='i') comm.Recv([data, MPI.INT], source=0, tag=77)
if rank == 0: data = numpy.arange(100, dtype=numpy.float64) comm.Send(data, dest=1, tag=13) elif rank == 1: data = numpy.empty(100, dtype=numpy.float64) comm.Recv(data, source=0, tag=13) I think i understood your previous suggestion on how to debug externally launched processes, but so far seems to me similar as using pdb to debug processes and I'm looking for a simpler debugging method which take advantage of graphic representation of stack, variables, etc that we have on Wing IDE.
![]() | 2 | No.2 Revision |
Thank you very much for your answer. What I'm looking for is a simple procedure from Wing IDE so that my students would be able to debug the code they write for my class on parallel and concurrent programming. I want they to learn how to use mpi4py's mpi_comm_world as processes' communicator. Thus what I need is to launch X number of processes from Wing IDE and debug each of them as well as their interactions through mpi_comm_world. They will be working on python scripts like this:
this:
from mpi4py import MPI
import numpy numpy
comm = MPI.COMM_WORLD
rank = comm.Get_rank() comm.Get_rank()
# passing MPI datatypes explicitly explicitly
if rank == 0:
data = numpy.arange(1000, dtype='i')
comm.Send([data, MPI.INT], dest=1, tag=77)
elif rank == 1:
data = numpy.empty(1000, dtype='i')
comm.Recv([data, MPI.INT], source=0, tag=77) tag=77)
# automatic MPI datatype discovery discovery
if rank == 0:
data = numpy.arange(100, dtype=numpy.float64)
comm.Send(data, dest=1, tag=13)
elif rank == 1:
data = numpy.empty(100, dtype=numpy.float64)
comm.Recv(data, source=0, tag=13)
I think i understood your previous suggestion on how to debug externally launched processes, but so far seems to me similar as using pdb to debug processes and I'm looking for a simpler debugging method which take advantage of graphic representation of stack, variables, etc that we have on Wing IDE.