Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

irace 4 on windows won't start #79

Closed
abeham opened this issue Jan 22, 2025 · 12 comments
Closed

irace 4 on windows won't start #79

abeham opened this issue Jan 22, 2025 · 12 comments

Comments

@abeham
Copy link

abeham commented Jan 22, 2025

Install R-4.4.2 fresh on windows, e.g. to C:\R\R-4.4.2, then install.packages("irace"). In a shell, e.g. Powershell launching irace.exe says

Error: '\R' is an unrecognized escape in character string (<input>:1:17)

Before I had installed R to C:\Program Files\R\R-4.4.2\ and the user library to C:\Users\... and it would complain about "\U' being an unrecognized escape, because irace was in the users library.

irace.exe can't even be started with --version or --help, it crashes right away after starting from powershell or cmd.

I used devtools and rtools to build irace 3.5 within the same r installation (using install_version) and that worked (on the same machine). I also tested a build of 4.0 and it is also broken. So something changed from 3.5 to 4.0 that breaks it on Windows. I am using Windows 11 24H2 x64 machine.

Maybe you have some time to investigate into this.

@MLopez-Ibanez
Copy link
Owner

Hi @abeham could you test the development version? You can download it for Windows by following the instructions here:

https://github.com/MLopez-Ibanez/irace/#github-development-version

@abeham
Copy link
Author

abeham commented Jan 23, 2025

Better, but not quite there yet:

> irace --version
> Error: unexpected end of input
Execution halted

@TheIronBorn
Copy link

I am also seeing this

@MLopez-Ibanez
Copy link
Owner

It is strange that the Windows github action cannot see this...

@MLopez-Ibanez
Copy link
Owner

Hi @abeham,

I have uploaded a new version that prints some debug info. Could you try again?

In addition, could you execute from within R the following R code and report the output?

irace::irace_cmdline("--version")
sessionInfo()

@abeham
Copy link
Author

abeham commented Jan 24, 2025

Now it works!

Here's the info you requested:

> irace::irace_cmdline("--version")
#------------------------------------------------------------------------------
# irace: An implementation in R of (Elitist) Iterated Racing
# Version: 4.1.0.900.ab2c292-dirty
# Copyright (C) 2010-2025
# Manuel Lopez-Ibanez     <[email protected]>
# Jeremie Dubois-Lacoste
# Leslie Perez Caceres    <[email protected]>
#
# This is free software, and you are welcome to redistribute it under certain
# conditions.  See the GNU General Public License for details. There is NO
# WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# irace builds upon previous code from the race package:
#     race: Racing methods for the selection of the best
#     Copyright (C) 2003 Mauro Birattari
#------------------------------------------------------------------------------
# installed at: C:/R/R-4.4.2/library/irace
# called with: --version
To cite package 'irace' in publications, please use

  Manuel López-Ibáñez, Jérémie Dubois-Lacoste, Leslie Pérez Cáceres,
  Thomas Stützle, and Mauro Birattari. The irace package: Iterated
  Racing for Automatic Algorithm Configuration. Operations Research
  Perspectives, 3:43-58, 2016. doi:10.1016/j.orp.2016.09.002

A BibTeX entry for LaTeX users is

  @Article{,
    title = {The irace package: Iterated Racing for Automatic Algorithm Configuration},
    author = {Manuel López-Ibáñez and Jérémie Dubois-Lacoste and Leslie {Pérez Cáceres} and Thomas Stützle and Mauro Birattari},
    year = {2016},
    journal = {Operations Research Perspectives},
    doi = {10.1016/j.orp.2016.09.002},
    volume = {3},
    pages = {43--58},
  }
> sessionInfo()
R version 4.4.2 (2024-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 26100)

Matrix products: default


locale:
[1] LC_COLLATE=English_United Kingdom.utf8
[2] LC_CTYPE=English_United Kingdom.utf8
[3] LC_MONETARY=English_United Kingdom.utf8
[4] LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.utf8

time zone: Europe/Vienna
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_4.4.2    R6_2.5.1          tools_4.4.2       withr_3.0.2
[5] spacefillr_0.3.3  Rcpp_1.0.14       irace_4.1.0.900   data.table_1.16.4
[9] matrixStats_1.5.0

@MLopez-Ibanez
Copy link
Owner

Now it works!

But what is the output from the command-line if you call "irace --version"?

Could you re-install the github version? I added even more debug output, so it should print quite a number of lines.

Thanks!

Manuel.

@abeham
Copy link
Author

abeham commented Jan 24, 2025

More output from the shell:

❯ irace --version
fullpath: C:\R\R-4.4.2\library\irace\bin\x64\irace.exe (34)
path: C:/R/R-4.4.2/library (20)
".libPaths(c(r'{C:/R/R-4.4.2/library}', .libPaths()));library(irace);irace_cmdline()"
0: C:\R\R-4.4.2\library\irace\bin\x64\irace.exe
1: --vanilla
2: --slave
3: -e
4: ".libPaths(c(r'{C:/R/R-4.4.2/library}', .libPaths()));library(irace);irace_cmdline()"
5: --args
6: --version

~\
❯ #------------------------------------------------------------------------------
# irace: An implementation in R of (Elitist) Iterated Racing
# Version: 4.1.0.900.ab2c292-dirty
# Copyright (C) 2010-2025
# Manuel Lopez-Ibanez     <[email protected]>
# Jeremie Dubois-Lacoste
# Leslie Perez Caceres    <[email protected]>
#
# This is free software, and you are welcome to redistribute it under certain
# conditions.  See the GNU General Public License for details. There is NO
# WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# irace builds upon previous code from the race package:
#     race: Racing methods for the selection of the best
#     Copyright (C) 2003 Mauro Birattari
#------------------------------------------------------------------------------
# installed at: C:/R/R-4.4.2/library/irace
# called with: --version
To cite package 'irace' in publications, please use

  Manuel López-Ibáñez, Jérémie Dubois-Lacoste, Leslie Pérez Cáceres,
  Thomas Stützle, and Mauro Birattari. The irace package: Iterated
  Racing for Automatic Algorithm Configuration. Operations Research
  Perspectives, 3:43-58, 2016. doi:10.1016/j.orp.2016.09.002

A BibTeX entry for LaTeX users is

  @Article{,
    title = {The irace package: Iterated Racing for Automatic Algorithm Configuration},
    author = {Manuel López-Ibáñez and Jérémie Dubois-Lacoste and Leslie {Pérez Cáceres} and Thomas Stützle and Mauro Birattari},
    year = {2016},
    journal = {Operations Research Perspectives},
    doi = {10.1016/j.orp.2016.09.002},
    volume = {3},
    pages = {43--58},
  }

@MLopez-Ibanez
Copy link
Owner

That's great. All looks as expected!

Could you make another test for me? Could you copy the whole folder C:/R/R-4.4.2/library to some temporary folder, like C:/temp-library-for-testing/, then call C:/temp-library-for-testing/irace/bin/x64/irace.exe --version ?

I want to test that it is able to identify correctly from where it is being called.

@abeham
Copy link
Author

abeham commented Jan 24, 2025

Sure!

❯ C:\temp-library-for-testing\irace\bin\x64\irace.exe --version
fullpath: C:\temp-library-for-testing\irace\bin\x64\irace.exe (41)
path: C:/temp-library-for-testing (27)
".libPaths(c(r'{C:/temp-library-for-testing}', .libPaths()));library(irace);irace_cmdline()"
0: C:\temp-library-for-testing\irace\bin\x64\irace.exe
1: --vanilla
2: --slave
3: -e
4: ".libPaths(c(r'{C:/temp-library-for-testing}', .libPaths()));library(irace);irace_cmdline()"
5: --args
6: --version

@MLopez-Ibanez
Copy link
Owner

Thanks, but does it print?

# installed at: C:/R/R-4.4.2/library/irace

@abeham
Copy link
Author

abeham commented Jan 24, 2025

No, it prints installed at temp...:

C:\🔒
❯ #------------------------------------------------------------------------------
# irace: An implementation in R of (Elitist) Iterated Racing
# Version: 4.1.0.900.ab2c292-dirty
# Copyright (C) 2010-2025
# Manuel Lopez-Ibanez     <[email protected]>
# Jeremie Dubois-Lacoste
# Leslie Perez Caceres    <[email protected]>
#
# This is free software, and you are welcome to redistribute it under certain
# conditions.  See the GNU General Public License for details. There is NO
# WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# irace builds upon previous code from the race package:
#     race: Racing methods for the selection of the best
#     Copyright (C) 2003 Mauro Birattari
#------------------------------------------------------------------------------
# installed at: C:/temp-library-for-testing/irace
# called with: --version
To cite package 'irace' in publications, please use

  Manuel López-Ibáñez, Jérémie Dubois-Lacoste, Leslie Pérez Cáceres,
  Thomas Stützle, and Mauro Birattari. The irace package: Iterated
  Racing for Automatic Algorithm Configuration. Operations Research
  Perspectives, 3:43-58, 2016. doi:10.1016/j.orp.2016.09.002

A BibTeX entry for LaTeX users is

  @Article{,
    title = {The irace package: Iterated Racing for Automatic Algorithm Configuration},
    author = {Manuel López-Ibáñez and Jérémie Dubois-Lacoste and Leslie {Pérez Cáceres} and Thomas Stützle and Mauro Birattari},
    year = {2016},
    journal = {Operations Research Perspectives},
    doi = {10.1016/j.orp.2016.09.002},
    volume = {3},
    pages = {43--58},
  }

MLopez-Ibanez added a commit that referenced this issue Jan 28, 2025
 * tests/testthat/test-target-runner-dummy.R: Run more tests on Windows.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants