|Parallel execution of Webots: Cannot open temporary file||by Erkan Tuncali (Webots PRO - 4) 2016-12-31 06:09:20|
I am using genetic algorithms and I want to run parallel simulations.
I have downloaded the license to the local computer.
All webots instaces simulate similar worlds. (each has a separate world file but they have same objects like straight road segment and automobiles)
However, all but one of the webots instances receive "cannot find temporary file" errors for .proto files. It looks like one of the webots instances lock the files and the others can not open the proto files.
Any solution recommendations?
(Windows 10 / Webots 8.5.2 / PRO license)
|Re: Parallel execution of Webots: Cannot open temporary file||by Stefania Pedrazzi (Webots PRO - 532) 2017-01-03 08:07:47|
do you use a script to start the multiple instances of Webots or do you start manually?
If it is the case could you please post your script so that we can try to reproduce the error?
Theoretically all the Webots instances should use separate temporary resources and there shouldn't be any interferences, but I will now check if the mechanism works as expected.
|Re: Parallel execution of Webots: Cannot open temporary file||by Erkan Tuncali (Webots PRO - 4) 2017-01-03 23:18:14|
I figured out what's causing the problem.
I have created copies of "webots.exe" and "webots.exe.config" files as "webots_2.exe", "webots_2.exe.config"...
If I run the executables with different names in parallel (webots.exe and webots_2.exe), I get the error that I have mentioned. However, if I just run 2 instances of webot.exe there is no problem.
I do it because I start Webots from Matlab and I need to kill specific instances of webots. It is much easier to kill when I know the executable name for each instance compared to getting pid in Windows (I still don't know how to do it in a Matlab script).
I would appreciate if you can let me know if there is a way to change config files or anything else to run webots.exe and webots_2.exe in parallel. Otherwise, this is not a Webots problem and I am sorry for taking your time on this.
|Re: Parallel execution of Webots: Cannot open temporary file||by Stefania Pedrazzi (Webots PRO - 532) 2017-01-04 10:19:41|
A workaround could be to first start 2 instances of webots.exe (for exampoe in pause mode no need to run any simulation), then if two instances of 'webots.exe' are running you can start any renamed webots executable without any issue.
I'm now checking if we can improve the behavior in the next version of Webots but I cannot guarantee we could fix it.
|Re: Parallel execution of Webots: Cannot open temporary file||by Fabien Rohrer (Webots PRO - 1261) 2017-01-04 10:55:42|
Note that it's not recommended at all to modify the Webots installation files (in your case, to rename the webots.exe executable, which causes issues at least in the temporary files management). The best solution is to find another way to manage the Webots instances. Could you not simply store the Webots process pid and base the process kill on this pid, instead of renaming the webots.exe executable?