From chemistry-request@server.ccl.net  Tue Aug  3 08:37:45 1999
Received: from ccl.net (atlantis.ccl.net [192.148.249.4])
	by server.ccl.net (8.8.7/8.8.7) with ESMTP id IAA25462
	for <chemistry@ccl.net>; Tue, 3 Aug 1999 08:37:45 -0400
Received: from relay.ppco.com (relay.ppco.com [207.27.254.3])
	by ccl.net (8.8.6/8.8.6/OSC 1.1) with SMTP id IAA10637
	for <chemistry@www.ccl.net>; Tue, 3 Aug 1999 08:31:03 -0400 (EDT)
Received: by relay.ppco.com id HAA18601
  (InterLock SMTP Gateway 4.2 for chemistry@www.ccl.net);
  Tue, 3 Aug 1999 07:29:40 -0500
Message-Id: <199908031229.HAA18601@relay.ppco.com>
Received: by relay.ppco.com (Internal Mail Agent-1);
  Tue, 3 Aug 1999 07:29:40 -0500
Date: Tue, 03 Aug 1999 07:29:42 -0500
From: "George D. Parks" <gdp@ppco.com>
X-Mailer: Mozilla 4.61 [en] (WinNT; U)
X-Accept-Language: en
Mime-Version: 1.0
To: Gert Kruger <kruger@eng.und.ac.za>
Cc: chemistry@www.ccl.net
Subject: Re: CCL:G98 and %nproc=2 on Linux
References: <s7a6d568.064@gwmail>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

We had a similar problem.  Here's a note we got from Doug Fox of Gaussian on how to correct the problem.

George Parks
Phillips Petroleum
==============
Parallel operation uses shared memory, which is a kernel resource,
instead of process memory.   I have a note below on adjusting this.  Also
we find that the 2.2 kernel is far superior for parallel execution,
also easier to adjust shared memory.

Increasing the size of the Linux shared memory segment

The size of the shared memory segment is set by the parameter
SHMMAX, in /usr/src/linux/include/asm/shmparam.h.  The default
value in 2.0 and 2.2 kernels is 0x2000000, or 32MB.  To increase
the value of SHMMAX, edit shmparam.h, rebuild the kernel, and reboot.

If you are comfortable with the process of building the Linux kernel,
we suggest you try the recently released 2.2.1 kernel (get it from
ftp.kernel.org or a mirror site).  The 2.2 kernels have improved SMP
performance and the ability to change the shared memory size on the fly,
by changing the value in /proc/sys/kernel/shmmax.  For example,

# echo "67108864" >/proc/sys/kernel/shmmax

would set the maximum shared memory segment size to 64MB.

If you are not familiar with the procedure for building the kernel,
and you are using the kernel distributed with Red Hat Linux 5.2,
here is a step-by-step guide to rebuilding the Red Hat kernel:

1) Make sure the kernel source and headers are installed, by doing

% rpm -qa | grep kern
kernel-2.0.36-0.7
kernel-pcmcia-cs-2.0.36-0.7
kernelcfg-0.5-3
kernel-headers-2.0.36-0.7
kernel-source-2.0.36-0.7

If you do not see

kernel-headers-2.0.36-0.7
kernel-source-2.0.36-0.7

you must install them from the Red Hat CD, by doing, as root

# rpm -i kernel-headers-2.0.36-0.7.i386.rpm
# rpm -i kernel-source-2.0.36-0.7.i386.rpm

2) Now, as root, edit /usr/src/linux/include/asm/shmparam.h and
change the value of SHMMAX to an appropriate value (3/4 of the amount of
physical memory would be reasonable).

3) Now do, as root

# cd /usr/src/linux
# make mproper
# make config

make config will ask a series of configuration questions, it will look like:

# make config
rm -f include/asm
( cd include ; ln -sf asm-i386 asm)
/bin/sh scripts/Configure arch/i386/config.in
#
# Using defaults found in arch/i386/defconfig
#
*
* Code maturity level options
*
Prompt for development and/or incomplete code/drivers (CONFIG_EXPERIMENTAL) [Y/n/?]

and so on.  To every question, TAKE THE DEFAULT VALUE BY HITTING ENTER.
When you are done, do:

# make dep; make boot

A great deal of output will scroll by as a new kernel is compiled.  When
the build is complete, the new kernel will be in the file
/usr/src/linux/arch/i386/boot/zImage.

4)  Now you may test the new kernel by booting it from a floppy.  Put a blank
diskette in you floppy drive and do, as root:

# dd if=/usr/src/linux/arch/i386/boot/zImage of=/dev/fd0

5)  Now reboot from this floppy.  If all seems well you may configure LILO
to boot the new kernel, or continue to boot from floppy.

The Red Hat Linux 5.2 manual discusses building a custom kernel, and using
LILO to boot it in Section 11.6, pp 197-200, to which we refer you for
further details.


