Re: CCL:G98 and %nproc=2 on Linux
- From: "George D. Parks" <gdp-: at :-ppco.com>
- Subject: Re: CCL:G98 and %nproc=2 on Linux
- Date: Tue, 03 Aug 1999 07:29:42 -0500
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.