Re: [AMBER] Max filename length in Sander?

From: Robert Duke <rduke.email.unc.edu>
Date: Mon, 8 Jun 2009 18:30:47 +0100

Hi Paul,
Okay, I have looked at this for both pmemd and sander, and while I
understand what happens with pmemd, what I don't understand is why this
fails in sander. I would guess that somewhere in the stream of filename
handling there is an 80 char buffer, but it is not arg() in mdfil.f as Dave
suggested - that reads the option flags and then the full filename buffer
should be used for the following read of the filename (so 256 chars
available). But the name gets truncated somehow before the amopen() is
attempted. Now, getarg() is indeed supposed to truncate any returned command
line arg longer than the output buffer, but why it is happening is very
unclear to me here. It could be that some other code is modifying the
length of the filename in the ntb 1 codepath but not the ntb 0 codepath.
Not a clue.
For pmemd, the situation is much simpler. Here I purely have 80 char
buffers, and if you go longer than that, you are dead. And since I don't
support ntb 0 except for generalized Born, I would expect we can't test for
the difference - it will just fail. I will leave it to the sander guys to
figure out why things are getting truncated, but it is not obvious from
looking at the code. For pmemd, it SHOULD work to just bump up max_fn_len
in file_io_dat.fpp, and in fact it does (ie., I just ran it for the ntb 1
case with both the long and short filenames and a max_fn_len of 128 chars).
Best Regards - Bob

----- Original Message -----
From: "David A. Case" <case.biomaps.rutgers.edu>
To: "AMBER Mailing List" <amber.ambermd.org>
Sent: Monday, June 08, 2009 8:28 AM
Subject: Re: [AMBER] Max filename length in Sander?


> On Mon, Jun 08, 2009, Paul Mortenson wrote:
>>
>> it seems that when periodic boundary conditions are turned on, the
>> maximum filename length for the inpcrd file is 80 characters.
>
> The relevant code is the length of "arg" in mdfil.f. You can probably
> increase that to 256 if you want (not tested). I don't see what this has
> to
> do with periodic boundary conditions, though.
>
> Workaround is to create links for long file names.
>
> ....dac
>
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>



_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Jun 09 2009 - 01:12:21 PDT
Custom Search