- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
...
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Diego,
You have also submitted the issue via Intel Online Service Center, I have reproduced the issue and escalated it to the developers. Thanks.
Best regards,
Zhuowei
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It does not seem to work with mpiexec; Could you provide a sintax working with mpiexec ?
1) J:\Users\diego\abc DRuiz>impi5\mpiexec.exe -delegate -n 1 "J:\Users\diego\abc DRuiz\test2.bat "tu tu""
[-1:11284]ERROR:execvp error on file: J:\Users\diego\abc DRuiz\test2.bat tu, The filename, directory name, or volume label syntax is incorrect.
2) J:\Users\diego\abc DRuiz>impi5\mpiexec.exe -delegate -n 1 "J:\Users\diego\abc DRuiz\test2.bat \"tu tu\""
[-1:13644]ERROR:execvp error on file: J:\Users\diego\abc DRuiz\test2.bat "tu tu", The filename, directory name, or volume label syntax is incorrect.
3) J:\Users\diego\abc DRuiz>impi5\mpiexec.exe -delegate -n 1 ""J:\Users\diego\abc DRuiz\test2.bat" "tu tu""
[-1:9604]ERROR:execvp error on file: J:\Users\diego\abc, The filename, directory name, or volume label syntax is incorrect.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel(R) MPI Library 2017 for Windows* Target Build Environment for Intel(R) 64 applications Copyright (C) 2007-2016 Intel Corporation. All rights reserved. C:\Windows\system32>cd \ C:\>md "test\diego" C:\>md "test\diego\abc DRuiz" C:\>echo arg1=%1, arg2=%2>"test\diego\abc DRuiz\test2.bat" C:\>type "test\diego\abc DRuiz\test2.bat" arg1=%1, arg2=%2 C:\>notepad "test\diego\abc DRuiz\test2.bat" C:\>mpiexec -n 1 "C:\test\diego\abc DRuiz\test2.bat" X Y C:\>echo arg1=X, arg2=Y arg1=X, arg2=Y C:\>
Note, the notepad was to edit the test2.bat file to insert the missing "echo "
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Edit, added:
C:\>mpiexec -n 1 "C:\test\diego\abc DRuiz\test2.bat" "X Y" "a b" 'C:\test\diego\abc' is not recognized as an internal or external command, operable program or batch file.
So the problem is not on the program, but rather on the arguments. Let me experiment more...
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Awful hack:
C:\>type "test\diego\abc DRuiz\test2.bat" echo arg1=%arg1%, arg2=%arg2% C:\>set arg1=X Y C:\>set arg2=a b C:\>mpiexec -n 1 "C:\test\diego\abc DRuiz\test2.bat" C:\>echo arg1=X Y, arg2=a b arg1=X Y, arg2=a b
Using environment variables to pass args, ugly as it is, may get you by for now.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I do not like the solution with environment variables for two reasons:
1) I will need to pass the environment variable to remote processes (kind of ok with -genvall or similar)
2) Each call to mpiexec made by my application needs to set a different value to the environment variable. Therefore I can not make concurrent calls anymore* !! (For example, we start 10 different mesh generations simultanesouly, each one relying on a mpi session ).
* Using different environment variable names is not a solution: If I have to write the script to change the variable name each time, then I also need to transmit the script to remote computers ... Furthermore, if the script needs to be slightly different on each machine, then I have to prefetch it ... and I need to clean used environment variable names ... plus risk of environment variable name collision.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page