Newsgroups: comp.parallel.mpi
From: Oliver Heinz <heinz@uni-paderborn.de>
Reply-To: heinz@uni-paderborn.de
Subject: Mapping shared memory fails on Linux SMP machine
Organization: Paderborn Center for Parallel Computing, PC2
Date: Tue, 22 Jul 1997 11:05:35 +0200
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <33D477DF.3BF@uni-paderborn.de>

Hi everybody,

I've compiled the MPI source for using the shared memory device on
a Linux SMP machine (4 Intel PPro, Linux 2.0.30 with SMP support). 
The source compiles fine (without errors and warnings), but running
the example programs results in a shared memory error:

> mmap failed: Invalid argument
> OOPS: mmap failed: cannot map shared memory, size= 4194304
> Abort 

Mapping of the shared memory region takes place at line 129 in file
mpid/ch_shmem/p2p.c in function void p2p_init(maxprocs, memsize):

> p2p_start_shared_area = (char *) mmap((caddr_t) 0, memsize, > PROT_READ|PROT_WRITE|PROT_EXEC, MAP_SHARED, p2p_shared_map_fd, (off_t) > 0);

The above call returns with MAP_FAILED (-1) and errno is set to EINVAL,
indicating that either the start value (= 0), length (= memsize =
4194304) or the offset value (= 0) are illegal. The mmap man page
claims about aligning the memory on a pagesize boundary (Linux pagesize
is 4096 bytes), but 4194304 bytes should completely fit into 1024 pages
and the start value is only a hint for mmap.

Any good ideas ???

Thanks in advance ...

Oliver


 
Oliver Heinz,	Paderborn Center for Parallel Computing,
University of Paderborn, Fuerstenalle 11, D-33095 Paderborn, Germany
voice: 	+49 (0) 5251 60-6323	fax: +49 (0) 5251 60-6297
mailto:heinz@uni-paderborn.de	http://www.uni-paderborn.de

