nmode on Linux : another memory question

From: E.S. <strand.chop.swmed.edu>
Date: Thu, 27 Feb 2003 16:42:15 -0600

Dear Amber users --

I recently increased the physical RAM on my Linux box from 1 GB to 2 GB,
hoping that it would enable me to run 'nmode' with a MAXMEMX setting
(in nmode/sizes.h) larger than the value

   parameter (MAXMEMX=115000000)

which I could get when I had only 1 GB.

Unfortunately this doesn't seem to be happening -- I get segmentation
when I run 'nmode' compiled with MAXMEMX set above 115000000, just
as I did when I had only 1 GB of RAM.

I gather from


that 115000000 corresponds to about 1 GB.

Other programs seem to see all the memory. E.g., partial output of the
program 'free' on my system is

                     total used free
Mem: 2064528 80780 1983748

And the C program below returns

   i = 2097152000

when SIZE = (2000*1024*1024) and

    Error: could not allocate buf...exiting

when SIZE = (2024*1024*1024).

Some of the (probably ill-advised) things I've tried, to get 'nmode'
to use all the memory are:

1) running the bash shell command 'ulimit -v nnnnnn'
  for various memory nnnnnn settings.

2) recompiling amber or just nmode with various command
  line parameters passed to the g77 command.

3) recompiling the (RedHat 8.0) kernel 2.4.18-24.8.0smp
  with various values of


  (Currently the kernel boots up and says

      1151MB HIGHMEM available
        896MB LOWMEM available

     and I've not been able to find parameter
     settings that would give me more LOWMEM.)

4) appending a 'mem=nnnnM' line to LILO's lilo.conf

Nothing seems to help.

Any suggestions?

-- E. S.

** allocatable memory
** modified from:
** http://strasbourg.linuxfr.org/jl3/features-2.3-2.html#ss2.1

#include <stdio.h>

#define SIZE (2000*1024*1024)

   int i;

   char *buf = malloc(SIZE);

   if ( !buf )
       printf("Error: could not allocate buf...exiting\n");

   i = 0;
   for ( ; i < SIZE; i += 4096, buf += 4096)
       *(int *)buf = 0;

   printf("i = %12d \n", i );
Received on Thu Feb 27 2003 - 22:53:00 PST
Custom Search