[AMBER] test_amber_cuda.sh requires small fix

From: Jan-Philip Gehrcke <jgehrcke.googlemail.com>
Date: Wed, 02 Nov 2011 16:13:39 +0100

Hey,

after I've finally managed to build AmberTools & Amber & pmemd.cuda, I
tried to test pmemd.cuda:

$ cd $AMBERHOME/test
$ ./test_amber_cuda.sh 2>&1 | tee test_amber_cuda.log
[: 35: unexpected operator
[: 42: unexpected operator
Warning. DO_PARALLEL is set to mpirun -np 4. This environment variable
is being unset.
cd cuda && make -k test.pmemd.cuda GPU_ID= PREC_MODEL=
make[1]: Entering directory
`/home/bioinfp/jang/sumpf/Amber11/test/amber11/test/cuda'
------------------------------------
Running CUDA Implicit solvent tests.
   Precision Model =
            GPU_ID =
------------------------------------
cd trpcage/ && ./Run_md_trpcage netcdf.mod
../../../bin/pmemd.cuda_: Command not found.


This is the same problem as reported here:
http://archive.ambermd.org/201104/0296.html

On my Ubuntu 10.04, /bin/sh is dash and not bash, which is a bit more
sensitive to unclean code. POSIX compliant scripts run on both, dash and
bash. I've consolidated the following part of test_amber_cuda.sh a bit:

if [ "x$1" = "x" ]; then
     echo "Using default GPU_ID = -1"
     GPU_ID="-1"
else
     GPU_ID="$1"
fi

if [ "x$2" = "x" ]; then
     echo "Using default PREC_MODEL = SPDP"
     PREC_MODEL="SPDP"
else
     PREC_MODEL="$2"
fi

Using that, the defaults of PREC_MODEL and GPU_ID are set correctly.


Now I will have fun with my new GPU machine :-)

Jan-Philip

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Nov 02 2011 - 08:30:05 PDT
Custom Search