Giter Club home page Giter Club logo

Comments (23)

ivanovaos avatar ivanovaos commented on August 17, 2024 2

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

from carnival.

ivanovaos avatar ivanovaos commented on August 17, 2024 2

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!

from carnival.

ulrmu avatar ulrmu commented on August 17, 2024 1

@CosimoCristella Good point, thanks!

from carnival.

CosimoCristella avatar CosimoCristella commented on August 17, 2024 1

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

from carnival.

laylagerami avatar laylagerami commented on August 17, 2024

I am having the same problem. Works fine when using cbc solver, issue is only with cplex!

from carnival.

ivanovaos avatar ivanovaos commented on August 17, 2024

Hey @ulrmu
Can you share your platform and R version? Also, can you run it with toy example?

Thanks

from carnival.

laylagerami avatar laylagerami commented on August 17, 2024

Screenshot 2021-06-07 at 14 22 05

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?

from carnival.

ulrmu avatar ulrmu commented on August 17, 2024

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

from carnival.

ulrmu avatar ulrmu commented on August 17, 2024

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.

from carnival.

ivanovaos avatar ivanovaos commented on August 17, 2024

@ulrmu which solver do you use and what path did you provide for it? can you please post a code snippet?

from carnival.

CosimoCristella avatar CosimoCristella commented on August 17, 2024

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

from carnival.

ulrmu avatar ulrmu commented on August 17, 2024

@ivanovaos
I use the cplex solver with this command:
carnival_result = runCARNIVAL( #inputObj= iniciators,
measObj = tfList$t,
netObj = sif,
#weightObj = progenylist$score,
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?

from carnival.

CosimoCristella avatar CosimoCristella commented on August 17, 2024

@ulrmu
Sorry, I forgot to mention that the options were passed to runInverseCarnival:
runInverseCarnival(measurements = meas,
priorKnowledgeNetwork = sif,
weights = weights,
carnivalOptions = cplexOpt
)

Cheers!

from carnival.

ulrmu avatar ulrmu commented on August 17, 2024

@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?

from carnival.

CosimoCristella avatar CosimoCristella commented on August 17, 2024

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.

from carnival.

ulrmu avatar ulrmu commented on August 17, 2024

@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,
#weights = weights,
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?

from carnival.

CosimoCristella avatar CosimoCristella commented on August 17, 2024

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.

from carnival.

ulrmu avatar ulrmu commented on August 17, 2024

@CosimoCristella Thank you, I fixed that and could run runInverseCarnival() \o/

However, using the newest CARNIVAL version, the problems with runCARNIVAL remain.

from carnival.

CosimoCristella avatar CosimoCristella commented on August 17, 2024

@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()?

from carnival.

laylagerami avatar laylagerami commented on August 17, 2024

HI @CosimoCristella, did you manage to solve the issue in #65?

from carnival.

kelsi-kw avatar kelsi-kw commented on August 17, 2024

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).

from carnival.

ulrmu avatar ulrmu commented on August 17, 2024

Thank you, @ivanovaos, for fixing the bug! It now works in my setup!

from carnival.

ErickMUO avatar ErickMUO commented on August 17, 2024

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

from carnival.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.