current irace on MS Windows 7, target-runner-windows

346 views
Skip to first unread message

M. Wagner

unread,
Jun 12, 2017, 9:08:31 AM6/12/17
to The irace package: Iterated Racing for Automatic Configuration
Dear irace team,

I have been trying to help a friend to get irace to work on a windows machine. So far, everything seems to be configured, we just have a little bit of trouble with target-runner-windows:

== race == raget runner 'C:\User\...\target-runner-windows' is not executable

I am a little stuck here and Google was of limited help - and my "MS Windows" days have long gone.

When I go to the (Windows Explorer) Properties of target-runner-windows I see on the Security...-tab that "Read & execute" has a tick. Huh? What comes to mind, what are common pitfalls here? This is with the target-runner-windows, not with any external executable/script that we'd like to call.

Thank you! :)

Best wishes,
Markus

Manuel López-Ibáñez

unread,
Jun 12, 2017, 11:03:09 AM6/12/17
to The irace package: Iterated Racing for Automatic Configuration
On Monday, 12 June 2017 14:08:31 UTC+1, M. Wagner wrote:

I am a little stuck here and Google was of limited help - and my "MS Windows" days have long gone.

Same for us. But let's see.
 

When I go to the (Windows Explorer) Properties of target-runner-windows I see on the Security...-tab that "Read & execute" has a tick. Huh? What comes to mind, what are common pitfalls here? This is with the target-runner-windows, not with any external executable/script that we'd like to call.

What happens if you execute it directly via cmd.exe ? It may also happen that Windows does not recognize that it is a .bat file unless it has the .bat extension.
Another thing to check: If you open it in NOTEPAD, does it show Windows newline?

Given how inflexible Windows is for scripting, it may be worth to change the executable to work directly as target-runner.

Cheers,

Manuel.

M. Wagner

unread,
Jun 14, 2017, 9:13:41 AM6/14/17
to Manuel López-Ibáñez, The irace package: Iterated Racing for Automatic Configuration, Carola Doerr
Hi Manuel,

Thanks a lot for your swift reply. We encountered a couple of issues, see below.
Long story short: we will try our luck with a linux machine next.

On 12 Jun 2017, at 5:03 pm, Manuel López-Ibáñez <manuel.lo...@manchester.ac.uk> wrote:

On Monday, 12 June 2017 14:08:31 UTC+1, M. Wagner wrote:

I am a little stuck here and Google was of limited help - and my "MS Windows" days have long gone.

Same for us. But let's see.
 

When I go to the (Windows Explorer) Properties of target-runner-windows I see on the Security...-tab that "Read & execute" has a tick. Huh? What comes to mind, what are common pitfalls here? This is with the target-runner-windows, not with any external executable/script that we'd like to call.

What happens if you execute it directly via cmd.exe ?

Not even an error message then.

It may also happen that Windows does not recognize that it is a .bat file unless it has the .bat extension.

Interesting, I was about to give up.
What we did: renamed the file to target-runner-windows.bat, then we got errors like “exec not …”. Alright, then we removed the exec. Then we had problems with the %candidate…% not being recognised, so we hardcoded it (just to get it to run once). Then irace said “echo is off”. For fun I used @echo on in a random position, however, I did not get lucky. Also, %candidate…% seemed to contain *all* parameters, not only the configuration, so our python script was not happy with the unknown parameters.

Another thing to check: If you open it in NOTEPAD, does it show Windows newline?

This is fine - although we did encounter this problem a few times (config file, instances file, …), but this was addressed easily.

Given how inflexible Windows is for scripting, it may be worth to change the executable to work directly as target-runner.

We will consider it - let us try to run my friend’s code on their computing infrastructure now.

Oh, in addition we tried cygwin, but there R could not find irace, and a new installation (under cygwin via R) was not possible as one of the directories was not readable.

Cheers,
Markus


--
You received this message because you are subscribed to a topic in the Google Groups "The irace package: Iterated Racing for Automatic Configuration" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/irace-package/gP1FWP-b1KU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to irace-packag...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/irace-package/a3ab8daa-ca12-4819-b0ab-b12dba194ef7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

andre....@uniriotec.br

unread,
Aug 18, 2017, 10:53:03 AM8/18/17
to The irace package: Iterated Racing for Automatic Configuration, manuel.lo...@manchester.ac.uk, carola...@mpi-inf.mpg.de
Hi M. Wagner, 

About your description:
"Interesting, I was about to give up.
What we did: renamed the file to target-runner-windows.bat, then we got errors like “exec not …”. Alright, then we removed the exec. Then we had problems with the %candidate…% not being recognised, so we hardcoded it (just to get it to run once). Then irace said “echo is off”. For fun I used @echo on in a random position, however, I did not get lucky. Also, %candidate…% seemed to contain *all* parameters, not only the configuration, so our python script was not happy with the unknown parameters.".

This happens ("problems with the %candidate…% not being recognised") because the target-runner.bat isn't fine at all (version inside of acotsp-example.tar.gz file, downloaded from http://iridia.ulb.ac.be/~lperez/matheuristics2016-irace/).

I did some modifications in target-runner.bat and all the things worked very well, i.e., the execution of instructions in R "> checkIraceScenario(scenario=scenario)" and "> irace(scenario = scenario, parameters = parameters)".

Basically, two parts of the script were modified:

1. I replaced this part:

SET candidate=%1
SHIFT
SET instance_id=%1
SHIFT
SET seed=%1
SHIFT
SET instance=%1
SHIFT
SET candidate_parameters=%*

by this:

FOR /f "tokens=1-4*" %%a IN ("%*") DO (
SET candidate=%%a
SET instance_id=%%b
SET seed=%%c
SET instance=%%d
SET candidate_parameters=%%e
)

2. I also replaced this part:

%exe% %FIXED_PARAMS% -i %instance% --seed %seed% %candidate_parameters% 1>%stdout% 2>%stderr%

By this:

%exe% %fixed_params% -i %instance% --seed %seed% %candidate_parameters% 1>%stdout% 2>%stderr%

In 1., the reason is that "%*" will always expand to all original parameters, sadly.

In 2., although variable names are not case-sensitive in Windows batch script, I decided, for the reason of coherence, keep the same spelling for the same variable ("fixed_params" appears in lower case at the beginning of the script).

I can send you the target-runner file if you want (I think I cannot attach it here in this group).

Best wishes,

Andre

M. Wagner

unread,
Aug 18, 2017, 9:24:53 PM8/18/17
to The irace package: Iterated Racing for Automatic Configuration, manuel.lo...@manchester.ac.uk, carola...@mpi-inf.mpg.de
Hi Andre,

Awesome details, thanks a lot for sharing!

I have forwarded your details to my colleague Carola (@different institution). She might get in touch with you then.

Best wishes,
Markus

André de Souza Andrade

unread,
Aug 19, 2017, 9:09:32 AM8/19/17
to M. Wagner, The irace package: Iterated Racing for Automatic Configuration, manuel.lo...@manchester.ac.uk, carola...@mpi-inf.mpg.de
Hi Markus,

No problem. Email me whenever you want.

Best wishes,

André
> --
> You received this message because you are subscribed to a topic in the Google Groups "The irace package: Iterated Racing for Automatic Configuration" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/irace-package/gP1FWP-b1KU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to irace-packag...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/irace-package/d7a3e073-7e0d-4655-b4de-af2fcf536682%40googlegroups.com.

vict...@gmail.com

unread,
Oct 30, 2017, 9:15:33 AM10/30/17
to The irace package: Iterated Racing for Automatic Configuration
Hi André.

I am trying to run irace from windows and am not succeeding.
Could you send me your target-runner file for the example tsp problem?

My problem is that when I run from R, an error message informs that the file is not executable.
When I change to a .bat file, the message is that the file does not exist.

Thank you for your help.

Att
Victor

Manuel López-Ibáñez

unread,
Oct 30, 2017, 9:19:21 AM10/30/17
to The irace package: Iterated Racing for Automatic Configuration
On Monday, 30 October 2017 13:15:33 UTC, Victor Abu wrote:
Hi André.

I am trying to run irace from windows and am not succeeding.
Could you send me your target-runner file for the example tsp problem?

My problem is that when I run from R, an error message informs that the file is not executable.
When I change to a .bat file, the message is that the file does not exist.


Is the error that the file target-runner.bat does not exist or that irace cannot find target-runner? If you change the filename to target-runner.bat, then you need to tell irace about the new name in scenario.txt.

Cheers,

Manuel.

tare...@gmail.com

unread,
May 8, 2020, 5:16:19 PM5/8/20
to The irace package: Iterated Racing for Automatic Configuration
hi vict
did you solved that problem??
Reply all
Reply to author
Forward
0 new messages