On Wed, Nov 2, 2011 at 2:24 PM, Jan-Philip Gehrcke
<jgehrcke.googlemail.com>wrote:
> Ross:
> First, because the code itself just should be compliant with POSIX
> standard. Cleaning the code is the better solution than using a more
> "sloppy" interpreter. Second, the changes are small. Third, maybe at
> some point someone does not have the bash... I don't know :)
>
I agree we should maintain POSIX compliance where possible. And the fix is
a 1-liner, just in the "if" statement rather than the shebang line ;)
>
>
> Jason:
> It's totally fine.. additional comments: when testing for the number of
> arguments, I'd say: Only if exactly two are given, assign them to GPU_ID
> and PREC_MODEL, otherwise keep the defaults. This is well-defined
> behavior then. The "x" trick can make sense in longer test compounds, as
> explained in this foot note:
>
http://tldp.org/LDP/abs/html/comparison-ops.html#FTN.AEN3638
>
True, if you were doing something like
if [ "$var" = "" -a "$var2" = "" ]; then
But I was suggesting the -z operator, which doesn't preclude longer test
compounds
if [ -z "$var" -a -z "$var2" ]; then
but at this point we're arguing tomAto tomAHto :)
Thanks!
Jason
>
>
> On 11/02/2011 07:14 PM, Ross Walker wrote:
> >> Thanks for the report! I recently switched away from Ubuntu on my main
> >> Machine, so I don't catch bash-isms in scripts anymore. This has been
> >> fixed in the developer tree for both test_amber_cuda.sh and
> >> test_amber_cuda_parallel.sh. I altered it slightly to be
> >>
> >> if [ $# -lt 1 ]; then
> >>
> >
> > Why not the more simple 1 line fix?
> >
> > #!/bin/sh ---> #!/bin/bash
> >
> > All the best
> > Ross
> >
> > /\
> > \/
> > |\oss Walker
> >
> > ---------------------------------------------------------
> > | Assistant Research Professor |
> > | San Diego Supercomputer Center |
> > | Adjunct Assistant Professor |
> > | Dept. of Chemistry and Biochemistry |
> > | University of California San Diego |
> > | NVIDIA Fellow |
> > | http://www.rosswalker.co.uk | http://www.wmd-lab.org/ |
> > | Tel: +1 858 822 0854 | EMail:- ross.rosswalker.co.uk |
> > ---------------------------------------------------------
> >
> > Note: Electronic Mail is not secure, has no guarantee of delivery, may
> not
> > be read every day, and should not be used for urgent or sensitive issues.
> >
> >
> >
> >
> >
> > _______________________________________________
> > 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
>
--
Jason M. Swails
Quantum Theory Project,
University of Florida
Ph.D. Candidate
352-392-4032
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Nov 02 2011 - 12:30:03 PDT