Closed ulrmu closed 3 years ago
I am having the same problem. Works fine when using cbc solver, issue is only with cplex!
Hey @ulrmu Can you share your platform and R version? Also, can you run it with toy example?
Thanks
Potentially the issue is that the file is being written to the root directory (where the user may not have write permissions) rather than the current working directory. See how the .lp and .Rdata file names are appended with the cwd, but the .txt file name is not?
Thanks for reporting, I will try to fix it ASAP. In the meantime, I suggest you to use the previous release. https://github.com/saezlab/CARNIVAL/releases/tag/v1.3
Hi @ivanovaos , Thanks for looking into this.
I can run the toy example without any problem.
In case it's still relevant, this is my R version and platform: R version 4.1.0 (2021-05-18) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.2 LTS
I tried v.1.3.0 but get the following error: Solving LP problem... sh: 1: /path/to/solver/: Permission denied
I also tried the latest update, but the same error as reported before is thrown.
@ulrmu which solver do you use and what path did you provide for it? can you please post a code snippet?
Hi, I was experiencing the same issue in v.2.2.0 ( v.1.3.0 works fine) and manged to solve by specifying the full path for cplex solver and working/out directories, eg.: cplexOpt = defaultCplexCarnivalOptions() cplexOpt$solverPath = "/opt/ibm/ILOG/CPLEX_Studio1210/cplex/bin/x86-64_linux/cplex" cplexOpt$outputFolder = '/path/to/outDir/' cplexOpt$dirName = '/path/to/outDir/' cplexOpt$workdir = '/path/to/workDir/' However, I'm still having the issue described in #65
Hope it helps.
sessionInfo() R version 4.1.0 (2021-05-18) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.2 LTS
@ivanovaos I use the cplex solver with this command: carnival_result = runCARNIVAL( #inputObj= iniciators, measObj = tfList$t, netObj = sif,
solverPath = "/path/to/solver/",
solver = "cplex",
timelimit=7200,
mipGAP=0,
poolrelGAP=0,
)
Please let me know if this is canonical or not.
@CosimoCristella Thank you for your suggestion! Maybe it's obvious, but how should the cplex options be passed?
@ulrmu Sorry, I forgot to mention that the options were passed to runInverseCarnival: runInverseCarnival(measurements = meas, priorKnowledgeNetwork = sif, weights = weights, carnivalOptions = cplexOpt )
Cheers!
@CosimoCristella Thank you! I get a weird error from the measurements input which I need to investigate further. Did you manage to use the runCARNIVAL function?
I think you get the input error when you try to pass a data.frame (as it was in v.1.3.0) rather than a named vector for arguments 'measurements' and 'weights'. I don't think this workaround will work for runCARNIVAL as there's no argument in the function to specify the working directory.
@CosimoCristella , that explains it, thank you!! I could finally run runInverseCarnival, running into the following error:
cplexOpt = defaultCplexCarnivalOptions() cplexOpt$solverPath = "/path/to/solver/" cplexOpt$outputFolder = '/path/to/dir/' cplexOpt$dirName = '/path/to/dir/' cplexOpt$workdir = '/path/to/dir/'
runInverseCarnival(measurements = meas_vec, priorKnowledgeNetwork = sif,
carnivalOptions = cplexOpt
)
sh: 1: /path/to/solver/: Permission denied Saving results... Error in file(file, "rt") : cannot open the connection
You said you managed to get the above function to work using CARNIVAL_2.2.0, right? Did you encounter this problem as well?
Hi Ulrmu,
I just re-tested runInverseCarnival() with the workaround I suggested above and can confirm it works for CARNIVAL v2.2.0 on my machine. Are providing the full/correct path for the solver? Just follow the example I suggested above since the cplex solver should be located in your opt folder. Be sure to include the solver name 'cplex' and remove the '/' at the end of the path.
@CosimoCristella Thank you, I fixed that and could run runInverseCarnival() \o/
However, using the newest CARNIVAL version, the problems with runCARNIVAL remain.
@ulrmu Glad it helped! I think this new version still requires few adjustments and we should give devs some time to implement them. In the meantime, if you have targets/inputs, why not going for runVanillaCarnival()?
@CosimoCristella Good point, thanks!
HI @CosimoCristella, did you manage to solve the issue in #65?
Hi @laylagerami, unfortunately not. Honestly, I haven't looked into details at it. I'm waiting for devs to react and in the meantime using v1.3, as they suggested
Also having the same issue. Error in file(file, ifelse(append, "a", "w")) : cannot open the connection. In file(file, ifelse(append, "a", "w")) : cannot open file '/cplexCommand_t18_00_47d12_07_2021n26.txt': Read-only file system. Tried changing the permissions on the files and directories and still come up with the same error. I tried using CBC solver, but get no results from Carnival when using the transcript tutorial data (All the same code, just tried to use CBC).
Thanks all for commenting and reporting. The bug was fixed. If it is still persistent in your setup, please, share the code snippet with tiny data sample to reproduce. Thanks!
Thank you, @ivanovaos, for fixing the bug! It now works in my setup!
Hi everyone, I got the same error in the 2.4.0 version.
R version 4.1.1 (2021-08-10) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Catalina 10.15.7
Oh hai! When running runCARNIVAL, the following error message is thrown:
Writing cplex command file Error in file(file, ifelse(append, "a", "w")) : cannot open the connection
And the warning:
2: In file(file, ifelse(append, "a", "w")) : cannot open file '/cplexCommand_t18_19_31d04_06_2021n19.txt': Permission denied
(In the working directory, both the .lp and .RData files are successfully created.)
Can anyone help to solve this issue? Cheers!