I am trying to automate the submission of many executables with variable parameter values via Mathematica on Windows 10 x64.
Running the executable from Mathematica works great for executables that take no arguments via the following:
If – however – you wish to feed in parameter values, the following is the closest I get to the desired behavior (where the “900…” are my arguments to be passed to the EXE):
RunProcess["myExecutable.exe","ExitCode","900 0.01 2 30 30"]
However, on my machine this requires 15% CPU usage by the executable (as expected) & another 15% CPU usage from the Mathematica kernel itself, unlike the
Run[~] above. This is because
RunProcess[~] returns something to the Mathematica kernel, whereas
Run[~] does not; this bug is reported here. This halves the efficiency of scripting and makes it unfeasible!
To avoid this bug in
RunProcess[~], I am wondering if there is either:
1) a likely undocumented way to make
RunProcess[~]not return anything, thus preventing the kernel from chunking away @ 15% CPU usage waiting on an exit code (or other info),
2) a way to feed in arguments via
For (1), I’ve no idea; there is no “None” option available as argument 2.
For (2), there are guides on how to make
Run[~] feed in arguments here from a WRI employee and elsewhere on the Stack Exchange site, e.g. here.
(2) boils down to my not understanding what the Windows Command Prompt needs to see in order to feed in those parameters. This is addressed in part in the first of the above two links, but I cannot for the life of me figure it out. However, I would think
RunProcess[~] must know, because it works, it just hogs 2x the necessary CPU usage! But I do not know what it “says” to the command prompt in order to run the executable and feed in the arguments! Another resource regarding this topic is here
Does anyone know how to do this? While I don’t have a minimal working example with a personally compiled exectuable, the behavior can be observed using this (again from here):
However, unlike for the Linux instantiation I believe users in that referenced question are using,
Run["sleep 10"] does not pass the argument appropriately on Windows, (i.e.
Run["myExecutable.exe 900 0.01 2 30 30"] does not work on Windows as an equivalent to the resource-hogging yet functional
RunProcess["myExecutable.exe",...] above)! 🙁
Does anyone know how to use
Run[~] to appropriately pass multiple arguments to an executable on Windows??? I do not have spaces in my executable file path (simply
SetDirectory[~] to its folder before-hand), just multiple arguments.
✓ Extra quality
ExtraProxies brings the best proxy quality for you with our private and reliable proxies
✓ Extra anonymity
Top level of anonymity and 100% safe proxies – this is what you get with every proxy package
✓ Extra speed
1,ooo mb/s proxy servers speed – we are way better than others – just enjoy our proxies!
USA proxy location
We offer premium quality USA private proxies – the most essential proxies you can ever want from USA
Our proxies have TOP level of anonymity + Elite quality, so you are always safe and secure with your proxies
Use your proxies as much as you want – we have no limits for data transfer and bandwidth, unlimited usage!
Superb fast proxy servers with 1,000 mb/s speed – sit back and enjoy your lightning fast private proxies!
99,9% servers uptime
Alive and working proxies all the time – we are taking care of our servers so you can use them without any problems
No usage restrictions
You have freedom to use your proxies with every software, browser or website you want without restrictions
Perfect for SEO
We are 100% friendly with all SEO tasks as well as internet marketing – feel the power with our proxies
Buy more proxies and get better price – we offer various proxy packages with great deals and discounts
We are working 24/7 to bring the best proxy experience for you – we are glad to help and assist you!