Quantcast
Channel: Clusters and HPC Technology
Viewing all articles
Browse latest Browse all 930

Executing a BAT sript with white space in its path + passing arguments with white spaces

$
0
0

Dear All, 

We recently switched from mpich2 to intel mpi. I have problems starting a bat script when the path to the script and the argument passed to the script both contain whitespaces: 

"path-To-MPI\mpiexec" -delegate -n 1 "path with spaces"\test.bat "argument with space"

Is there a solution to this problem ? 

Thanks

Diego

Example 1) : 

J:\Users\diego>"C:\Users\diego\AppData\Local\XXX Software\MPI\impi5\mpiexec.exe" -delegate -n 1 "J:\Users\diego\abc DRuiz\test2.bat""tu tu"

'J:\Users\diego\abc' is not recognized as an internal or external command, operable program or batch file.

2) If my argument does not contain white spaces, then it works 

J:\Users\diego>"C:\Users\diego\AppData\Local\XXX Software\MPI\impi5\mpiexec.exe" -delegate -n 1 "J:\Users\diego\abc DRuiz\test2.bat""tu-tu"

J:\Users\diego>echo LOCAL "test2.BAT" STARTED
LOCAL "test2.BAT" STARTED

3) If I use an executable instead of a BAT script, it also works: 

J:\Users\diego>"abc DRuiz\qt2.bat

J:\Users\diego>"C:\Users\diego\AppData\Local\XXX Software\MPI\impi5\mpiexec.exe" -delegate -n 1 "J:\Users\diego\abc DRuiz\bin\abcd.exe""tu tu"

  <***>   Software - rev 98765
Info    : Welcome diego

...                     

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             

 

 

 

Zone: 

Thread Topic: 

How-To

Viewing all articles
Browse latest Browse all 930

Trending Articles