mpi + shmem issues

Tim Robbins tjr at FreeBSD.ORG
Sun May 25 19:40:03 PDT 2003


On Sun, May 25, 2003 at 05:17:30PM -0400, Anthony Schneider wrote:

> so, does this mean that mpich somehow exhausted all shmem locks?
> after running the program only 10 times, i see this as infeasible,
> considering
> 	a) mpich (presumably in MPI_Init()) would only want 1 or
> 	   2 locks on init
> and
> 	b) any shared memory locks mpich grabs should be freed
> 	   upon process completion (whether clean or not) by the
> 	   operating system, no?

No, semaphores stay around until they are removed. Perhaps there's an MPI_Xyz
function you should be calling before your program exits. In any case, you can
use "ipcs -s" to list semaphores, and "ipcrm -s semid" to remove semaphores.

It looks like the program is leaking semaphores -- notice how your program
fails when you run it for the 11th time, and the default maximum number of
semaphores in the GENERIC kernel is 10 (sysctl kern.ipc.semmni).


Tim


More information about the freebsd-current mailing list