Re: kernel related MPI problem?
Re: kernel related MPI problem?
- Subject: Re: kernel related MPI problem?
- From: Paul Ripke <email@hidden>
- Date: Sat, 22 Nov 2003 11:09:24 +1100
On Friday, Nov 21, 2003, at 20:56 Australia/Sydney, Peter Klaver wrote:
Hi everyone,
A collegue in my lab, knowledgeable in unix but not specifically in
Darwin, wants to run MPI code on a dual G5, but there some problems
when using the smp-compiled libraries (-comm=share). He suspects it's
a kernel-related matter, see below. From his description, can anyone
see if this is indeed the case? If anyone on this list happens to
have smp-MPI running ok, then any other relevant info is of course
also much welcomed.
kind greets,
Peter
Shared memory problem.
During testing the smp-MPICH software the following error occurs:
P4xxxxx shmget error -1
This looks like a shmget error. Testing the operating system with:
sysctl -a |grep sysv
kern.sysv.shmmax: 4194304
kern.sysv.shmmin: 1
kern.sysv.shmmni: 32
kern.sysv.shmseg: 8
kern.sysv.shmall: 1024
Looks allright to me.
I have tested the shmget call by the following C-program.
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
int main()
{
key_t key;
int size;
int shmflg;
int shmid;
size = 100;
key = IPC_PRIVATE;
shmflg = IPC_CREAT & IPC_EXCL & (7+7*8+7*64);
shmflg = shmflg&IPC_CREAT;
Don't you really mean:
shmflg = IPC_CREAT | IPC_EXCL | 0777;
Do you?
shmid=shmget(key, size, shmflg);
printf("result %d/ \n",shmid);
return 1;
}
It always returns -1. Runnig the C-program on other (non G5)
platforms returns a normal shmid.
my hardware platform is dual-G5
my OS version is 10.3 or 10.2.8, similar problems on both.
Worked fine for me on 10.2.7 and 10.3. Remember:
- those shm segments are persistent. They'll have to be manually
deleted.
- there's only 4 MB available.
- you might have run out of space!
- you're really better off using mmap(2) under Darwin.
Cheers,
--
Paul Ripke
Unix/OpenVMS/TSM/DBA
I love deadlines. I like the whooshing sound they make as they fly by.
-- Douglas Adams
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.