Discussion:
Creating MPI enabled daemon process
(too old to reply)
Kiran Desai
2008-12-04 06:52:12 UTC
Permalink
Hello,

I am relatively new to the world of MPI. I am trying to create a
daemon process that would communicate with other processes using MPI
(MPICH2). It is similar to socket based client-server model. Every
attempt to do so results in segmentation fault, daemon never kicks
off. Here is what I have tried so far:

1. Follow std steps in creating a daemon process. (fork, umask,
setssid.. )
2. Before the big loop of daemon code, I initialize MPI (by calling
MPI_Init()).

Please let me know if I am missing something here. My main objective
is to kick off a daemon process that only communicates over MPI.

Thanks,
Kiran
Michael Hofmann
2008-12-05 14:22:47 UTC
Permalink
Post by Kiran Desai
Hello,
I am relatively new to the world of MPI. I am trying to create a
daemon process that would communicate with other processes using MPI
(MPICH2). It is similar to socket based client-server model. Every
attempt to do so results in segmentation fault, daemon never kicks
1. Follow std steps in creating a daemon process. (fork, umask,
setssid.. )
2. Before the big loop of daemon code, I initialize MPI (by calling
MPI_Init()).
Please let me know if I am missing something here. My main objective
is to kick off a daemon process that only communicates over MPI.
The commonly used fork-exec mechanism cannot be used in MPI to create new
MPI processes. There is special support for dynamic creation of MPI
processes (http://www.mpi-forum.org/docs/mpi21-report-bw/node207.htm).

A client-server based model (open port, connect, accept connection) is
also supported
(http://www.mpi-forum.org/docs/mpi21-report-bw/node207.htm). Examples are
given here: http://www.mpi-forum.org/docs/mpi21-report-bw/node213.htm

Bringing both techniques together (similar to a socket based model) is a
(very) non-trivial task.


Michael

Loading...