AMBER Archive (2004)

Subject: RE: AMBER: problems with mdcrd

From: Ross Walker (ross_at_rosswalker.co.uk)
Date: Thu Jul 08 2004 - 14:54:08 CDT


Dear Carsten
 
> the file size is 2.0 Gbyte. I have read and write permission

This is your problem. The theoretical maximum file size on a 32 bit machine
is 2^31 (for a signed integer) = 2147483648 bytes (2GB). Some compilers and
later linux distributions support large file sizes by emulating 64 bit file
pointers. However, in my experience the use of large files can be a pain
since not everything is compiled to support them. E.g some versions of gzip
etc will corrupt files bigger than 2GB.

In theory you could recompile ALL of the amber executables to use large file
support (refer to the manual for the compiler you are using) as long as you
are using a v2.4 or later linux kernel. Don't even attempt to move such
files over NFS shares with non-compliant machines!

However, it is probably far simpler and safer to just split your run up into
several stages such that the mdcrd file never exceeds 2GB. For your current
run you will probably have to run it again as the mdcrd file is likely to be
corrupted. Chances are the file got truncated at 2GB. Do a rough calculation
for the number of bytes per mdcrd frame = 8 ascii characters per coordinate
and 3x8 for the box info so 1 frame will be approximately (not counting
carriage returns)

24+(24*TOTAL_ATOMS) bytes (uncompressed)

Note, you should add about another 1.25% to this figure to account for
carriage returns at the end of each line.

So if you know how many atoms you have you should work out out the maximum
number of frames you can get in 2GB and ensure your job is split into stages
such that you don't exceed this. In this way you can avoid exceeding the 2GB
limit.

Note: 64bit machines do suffer from these problems, there limit is 2^63 =
8,388,608 TB!!!

All the best
Ross

/\
\/
|\oss Walker

| Department of Molecular Biology TPC15 |
| The Scripps Research Institute |
| Tel:- +1 858 784 8889 | EMail:- ross_at_rosswalker.co.uk |
| http://www.rosswalker.co.uk/ | PGP Key available on request |

> and as far
> as I can tell, no processes lock the file. I can open it
> with vi, but
> it takes an awful lot of time.
> I copied it over to a new file, but the problems are still the same.
> The file is located on a local drive, and I am working on a dual Xeon
> processor machine.
> I checked my .out file and couldnt find anything unusual.
> Which log files are you referring to?
>
> Thanks
> Carsten
>
>
> Ross Walker wrote:
>
> > Dear Carsten
> >
> >
> >>PTRAJ: trajin md.prod.mdcrd
> >>Checking coordinates: md.prod.mdcrd
> >>
> >>Could not open file (md.prod.mdcrd) with mode (r)
> >>WARNING in checkCoordinates(): Could not open file (md.prod.mdcrd)
> >>WARNING in ptrajSetupIO(): trajin md.prod.mdcrd, cannot open file...
> >
> >
> > This error is triggered by the following piece of code in ptraj.c
> >
> > if ( openFile(&fp, filename, "r") == 0 ) {
> > fprintf(stdout,
> > "WARNING in checkCoordinates(): Could not open
> file (%s)\n",
> > filename);
> > return NULL;
> > }
> >
> > From this code it should be obvious that all this is trying
> to do is open
> > the file. It has not actually done any IO on the file at
> this point. This
> > means that the problem is with the file being accessed and
> NOT with its
> > contents. Are you certain you have the filename correct
> (including case?) Do
> > you have read permission to the file? Can you open it in
> something else like
> > 'vi'?
> >
> > Also are you sure no other process currently has a lock on
> this file? You
> > could try copying the file to a new file and then using
> this new file:
> >
> > cp md.prod.mdcrd md.prod.mdcrdnew
> > diff md.prod.mdcrd md.prod.mdcrdnew
> >
> > If the file is on a network drive try copying it to a local
> drive. Also,
> > what is the size of this file? Is it bigger than 2GB? If it
> is this will
> > cause you problems on a 32bit machine.
> >
> > Then try using md.prod.mdcrdnew instead.
> >
> > If this still doesn't work then I would check you log files
> to see if there
> > are any reports of read errors etc.
> >
> > All the best
> > Ross
> >
> > /\
> > \/
> > |\oss Walker
> >
> > | Department of Molecular Biology TPC15 |
> > | The Scripps Research Institute |
> > | Tel:- +1 858 784 8889 | EMail:- ross_at_rosswalker.co.uk |
> > | http://www.rosswalker.co.uk/ | PGP Key available on request |
> >
> >
> --------------------------------------------------------------
> ---------
> > The AMBER Mail Reflector
> > To post, send mail to amber_at_scripps.edu
> > To unsubscribe, send "unsubscribe amber" to majordomo_at_scripps.edu
>

-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber_at_scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo_at_scripps.edu