-
Notifications
You must be signed in to change notification settings - Fork 15
/
BUGS
140 lines (109 loc) · 6.41 KB
/
BUGS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
------------------------------------------------------------*- mode: text -*-
Please report bugs here: https://github.com/MLopez-Ibanez/irace/issues
This file is only kept for historical purposes.
###############################################################
# FIXED bugs
###############################################################
#1 --- fixed at revision 1590
$ irace --debug-level
Error in if (scenario$debugLevel >= 1) { :
missing value where TRUE/FALSE needed
Calls: irace.cmdline -> irace.main -> checkScenario
Execution halted
#5 --- fixed at revision 1343
Paths in the command-line should be relative to the current working
directory. Paths in scenario.txt should be relative to
scenario.txt. However, currently the latter are also relative to the working
directory of irace. Example:
$ ls test
test/hook-run
test/scenario.txt
$ cat test/scenario.txt
########################
hookRun <- "./hook-run"
#######################
$ irace -c test/scenario.txt
Error in file.check(scenario$hookRun, executable = TRUE, text = "run program hook") :
run program hook '/home/manu/./hook-run' does not exist
Calls: irace.cmdline -> irace.main -> checkScenario -> file.check
#3 -- fixed at revision 1101
$ irace --version (or any other unknown parameter)
It should say "unknown parameter" or something like that.
#4 -- fixed at revision 827
$ irace --hook-run my-hook-run
doesn't work. One needs to use ./my-hook-run
#7 -- fixed at revision r882 ------------------------------
When using MPI, if hook-run exits with status 1, the error-handling
does not work correctly. It should print the hookRun call, but it
doesn't. It prints:
Error: The output of `hookRun' is not numeric!
The output was:
Error : running command '/home/mascia/tuning_paradiseo/experiments/PFSPWT/tuning_2/./hook-run /home/mascia/tuning_paradiseo/experiments/PFSPWT/tuning_2/./Instances//90x20_5 402 --sa-code_definition%ps-initialisation=1 --sa-code_definition%sa-algo_choice@0=7 --sa-code_definition%sa-algo_choice@0%7%sa-perturbation=0 --sa-code_definition%sa-algo_choice@0%7%sa-acceptance=3 --sa-code_definition%sa-algo_choice@0%7%sa-acceptance%3%sa-cooling_schedule=0 --sa-code_definition%sa-algo_choice@0%7%sa-acceptance%3%sa-cooling_schedule%0%sa-sa_r_initial_temp=1.0607 --sa-code_definition%sa-algo_choice@0%7%sa-acceptance%3%sa-cooling_schedule%0%sa-sa_r_factor=0.6901 --sa-code_definition%sa-algo_choice@0%7%sa-acceptance%3%sa-cooling_schedule%0%sa-sa_r_max_step=562 --sa-code_definition%sa-algo_choice@0%7%sa-acceptance%3%sa-cooling_schedule%0%sa-sa_r_final_temp=825 --sa-code_definition%sa-algo_choice@0%7%sa-time_ratio=7 --sa-code_definition%s
Execution halted
Warning message:
running command 'ls *.26602+1.*.log 2>/dev/null' had status 2
which looks like the master code continued execution even after the
slave died and the error output from the master was lost. The
truncation is also a problem.
In theory, the following program should reproduce the issue, but it
doesn't:
#!/usr/bin/Rscript
# Load the R MPI package if it is not already loaded.
if (!is.loaded("mpi_initialize")) { library("Rmpi") }
# Spawn as many slaves as possible
mpi.spawn.Rslaves(nslaves=5)
# In case R exits unexpectedly, have it automatically clean up
# resources taken up by Rmpi (slaves, memory, etc...) .
Last <- function(){
if (is.loaded("mpi_initialize")){
if (mpi.comm.size(1) > 0){
print("Please use mpi.close.Rslaves() to close slaves.")
mpi.close.Rslaves()
}
print("Please use mpi.quit() to quit R")
.Call("mpi_finalize") }
}
runcommand <- function(command, args) {
cat (format(Sys.time(), usetz=TRUE), ":", command, args, "\n")
elapsed <- proc.time()["elapsed"]
err <- NULL
output <- withCallingHandlers(
tryCatch(system2(command, args, stdout = TRUE, stderr = TRUE),
error=function(e) {
err <<- paste(err, conditionMessage(e), sep ="\n")
NULL
}), warning=function(w) {
err <<- paste(err, conditionMessage(w), sep ="\n")
invokeRestart("muffleWarning")
})
# If e is a warning, the command failed.
if (!is.null(err)) {
stop (call. = FALSE,
format(Sys.time(), usetz=TRUE), ": ERROR (", paste(output, sep="\n"), "):", err,"\n")
}
cat (format(Sys.time(), usetz=TRUE), ": DONE (",
") Elapsed: ", proc.time()["elapsed"] - elapsed, "\n")
return(list(output = output, error = NULL))
}
candidates <- list("x", "--xx /home/mascia/tuning_paradiseo/experiments/PFSPWT/tuning_2/./hook-run /home/mascia/tuning_paradiseo/experiments/PFSPWT/tuning_2/./Instances//90x20_5 402 --sa-code_definition%ps-initialisation=1 --sa-code_definition%sa-algo_choice\
@0=7 --sa-code_definition%sa-algo_choice@0%7%sa-perturbation=0 --sa-code_definition%sa-algo_choice@0%7%sa-acceptance=3 --sa-code_definition%sa-algo_choice@0%7%sa-acceptance%3%sa-cooling_schedule=0 --sa-code_definition%sa-algo_choice@0%7%sa-acceptance%3%sa-cool\
ing_schedule%0%sa-sa_r_initial_temp=1.0607 --sa-code_definition%sa-algo_choice@0%7%sa-acceptance%3%sa-cooling_schedule%0%sa-sa_r_factor=0.6901 --sa-code_definition%sa-algo_choice@0%7%sa-acceptance%3%sa-cooling_schedule%0%sa-sa_r_max_step=562 --sa-code_definiti\
on%sa-algo_choice@0%7%sa-acceptance%3%sa-cooling_schedule%0%sa-sa_r_final_temp=825 --sa-code_definition%sa-algo_choice@0%7%sa-time_ratio=7 --sa-code_definition%something-else and")
# Tell all slaves to return a message identifying themselves
output <- Rmpi::mpi.applyLB(candidates, runcommand, command = "ls")
cat(paste(output, sep="\n"))
#mpi.remote.exec(stop("error", mpi.comm.rank(),"of",mpi.comm.size()))
# Tell all slaves to close down, and exit the program
mpi.close.Rslaves()
#mpi.quit()
#10 --- fixed at revision 1919 ------------------------------------
Related to #8. With --maxTime, irace assumes that target-runner will report
the time, however, this is not possible with --batchmode. If you are confident
in modifying the package sources, you need to add a check on scenario$batchmode
before checking the scenario$maxTime condition that you quote, you need to
handle the case where that function returns no time and you need to handle the
case that target-evaluator returns time and how to use that to increment the
time budget.
However, targetEvaluator is called again for elitist configurations even if no
target-runner call is made. This means that we may double count the time?
In the meantime, I would suggest that you don't use --maxTime for now.