Subject: G: Summary: shmget failed on SGI

From: Guido Germano <[email-masked]>
Date: Tue, 22 Dec 1998 21:02:26 +0000 (BST)

The problem: g94 D4 compiled on a SGI R10000 with the 7.2.1 compiler and
the 6.5.1 OS revision core dumps with the error message "shmget failed".

The solution, due to Joe Ochterski, one of the authors of g98: compile
with the flag -OPT:reorg_common=OFF. This flag is necessary with SGI
compilers more recent than g94 D4, and is present in g98 A6. Add
:reorg_common=OFF to the second line starting with ROF after # R10000
in bsd/sgi.make.

Comment: there are other less elegant workarounds as launching a shell
that calls clearipc every 5' (works only for scalar execution though) or
increasing the shmmax kernel parameter. The latter might be underdimensioned
on IRIX 6.4 (less than 25% of the total RAM), but on 6.5 it is already set
by default to 80% of the total RAM: see Appendix 1 of the IRIX Admin: System
Configuration and Operation manual and the file /var/sysgen/mtune/kernel.

After upgrading the OS to 6.5.2 the next problem was around the corner:
g94/98 gave lots of segv (segmentation violations). Joe was at help again,
telling me that it is a known bug of the mp libraries that won't be fixed
before 6.5.3. The workaround for the meanwhile is

setenv MP_STACK_OVERFLOW OFF

Thanks to all others who replied; they're in cc.
Apologies for the late summary.

Guido Germano

University of Bristol, +44-117-928 9000 ext. 8755
http://www.phy.bris.ac.uk/staff/germano_g.html