diff mbox

ibsim: fix non-debug path in run_opensm.sh script

Message ID E1QpTpr-00026L-B8@rvml.edm.orcorp.ca (mailing list archive)
State New, archived
Headers show

Commit Message

Rolf Manderscheid Aug. 5, 2011, 11:29 p.m. UTC
Signed-off-by: Rolf Manderscheid <rvm@obsidianresearch.com>
---
 scripts/run_opensm.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Alex Netes Aug. 9, 2011, 2:57 p.m. UTC | #1
Hi Rolf,

On 17:29 Fri 05 Aug     , Rolf Manderscheid wrote:
> 
> Signed-off-by: Rolf Manderscheid <rvm@obsidianresearch.com>
> ---
>  scripts/run_opensm.sh |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/scripts/run_opensm.sh b/scripts/run_opensm.sh
> index a225d81..a299dc0 100755
> --- a/scripts/run_opensm.sh
> +++ b/scripts/run_opensm.sh
> @@ -29,7 +29,7 @@ if [ -z "$debug" ] ; then
>  	export SIM_HOST
>  	export OSM_TMP_DIR
>  	export OSM_CACHE_DIR
> -	time LD_PRELOAD=${umad2sim} ${cmd} ${cmd_args}
> +	LD_PRELOAD=${umad2sim} time ${cmd} ${cmd_args}
>  	rc=$?
>  	exit $rc
>  else
> -- 

This is what I get, when running the commands in the old way:

$ time LD_PRELOAD=/home/ibsim/umad2sim/libumad2sim.so smpquery nd -D 0
ibwarn: [18137] sim_connect: attached as client 0 at node "S-0008f10500650bfe"
Node Description:.Voltaire sLB-4018    Line 8  Chip 1 4700 #4700-A368

real	0m0.016s
user	0m0.002s
sys	0m0.013s


This what I get, when running the commands in the new way:

$ LD_PRELOAD=/home/ibsim/umad2sim/libumad2sim.so time smpquery nd -D 0
ibwarn: [18139] sim_connect: attached as client 0 at node "S-0008f10500650bfe"
Node Description:.Voltaire sLB-4018    Line 8  Chip 1 4700 #4700-A368
0.00user 0.01system 0:00.02elapsed 80%CPU (0avgtext+0avgdata 876maxresident)k
0inputs+416outputs (0major+322minor)pagefaults 0swaps


-- Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jason Gunthorpe Aug. 9, 2011, 5:53 p.m. UTC | #2
On Tue, Aug 09, 2011 at 05:57:27PM +0300, Alex Netes wrote:

> This is what I get, when running the commands in the old way:

The construct 'time FOO=x cmd' is a bashism. The script either needs
to use #!/bin/bash or the patch from Rolf to make it work properly on
systems that use a POSIX shell as /bin/sh (ie Debian and dervied)

The difference in time output reflects one being the bash built in and
the other being the shell utils command.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rolf Manderscheid Aug. 10, 2011, 4:08 p.m. UTC | #3
Hi Alex,

On 11-08-09 08:57 AM, Alex Netes wrote
> This is what I get, when running the commands in the old way:
>
> ...
I get:

time: cannot run LD_PRELOAD=scripts/../umad2sim/libumad2sim.so: No such 
file or directory
Command exited with non-zero status 127
0.00user 0.00system 0:00.00elapsed ?%CPU (0avgtext+0avgdata 
1344maxresident)k
0inputs+0outputs (0major+70minor)pagefaults 0swaps


     Rolf
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/scripts/run_opensm.sh b/scripts/run_opensm.sh
index a225d81..a299dc0 100755
--- a/scripts/run_opensm.sh
+++ b/scripts/run_opensm.sh
@@ -29,7 +29,7 @@  if [ -z "$debug" ] ; then
 	export SIM_HOST
 	export OSM_TMP_DIR
 	export OSM_CACHE_DIR
-	time LD_PRELOAD=${umad2sim} ${cmd} ${cmd_args}
+	LD_PRELOAD=${umad2sim} time ${cmd} ${cmd_args}
 	rc=$?
 	exit $rc
 else