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

Issue with decode the mode first #239

Closed
senna1128 opened this issue Oct 29, 2020 · 8 comments
Closed

Issue with decode the mode first #239

senna1128 opened this issue Oct 29, 2020 · 8 comments

Comments

@senna1128
Copy link

Hi,

I'm using Julia 1.5.2. I try to run multiple models in parallel using your julia code provided here https://github.com/JuliaSmoothOptimizers/CUTEst.jl. I also pass decode=false.

But I got an error like

ERROR: On worker 7:
CUTEst: lib not found; decode problem first

This seems CUTEstModel must decode problem first. If I use standard for loop without running in parallel, it works well. So my cutest package should be fine.

Is there any way to fix it? Also I cannot run

fetch_sif_problems()

The error is

ERROR: UndefVarError: fetch_sif_problems not defined

Are they related? Not using fetch_sif_problems does not affect my usage of cutest at the moment, but I'm not sure if it matters in the future.

Best,
Sen

@abelsiqueira
Copy link
Member

Hi @senna1128, thanks for the report.

You indeed need to decode the problem first using sifdecoder. You could decode it at a different time and then call CUTEstModel, but at some point the sifdecoder has to be called. This is related: #145 (comment)

fetch_sif_problems was removed, it's not needed anymore, but we forgot to update the README.

@abelsiqueira
Copy link
Member

By the way, I forgot we had this information on the README: https://github.com/JuliaSmoothOptimizers/CUTEst.jl#run-multiple-models-in-parallel

@dpo
Copy link
Member

dpo commented Oct 29, 2020

That's very clever. I also forgot that we could do that!

@senna1128
Copy link
Author

Hi @abelsiqueira,

Thank you very much for the quick reply. I tried to run the code

addprocs(2)
@everywhere using CUTEst
@everywhere function opt(name, decode)
    nlp = CUTEstModel(name;decode=decode)
    retval = obj(nlp,nlp.meta.x0)
    #retval = nlp.meta.nvar
    finalize(nlp)
    retval
end

probs = sort(CUTEst.select(contype="unc",max_var=5))
map(x->opt(x,true), probs) # Ensure all the problems have been decoded
pmap(x->opt(x,false), probs)

provided in #145 comment. I could get the result for the commandmap(x->opt(x,true), probs) # Ensure all the problems have been decoded . It returned 95 objective values. While it still reported the same error in pmap(x->opt(x,false), probs). Do you think that is my installation issue? I'm using Julia 1.5.2 via JuliaPro.

@abelsiqueira
Copy link
Member

I've had the same error. I will investigate this today.

@abelsiqueira
Copy link
Member

Took me a while to get to it, sorry about that. I think the issue is fixed by #242.

@dpo
Copy link
Member

dpo commented May 31, 2021

@senna1128 could you confirm if your isse has been fixed?

@dpo dpo closed this as completed Jun 1, 2021
@dpo
Copy link
Member

dpo commented Jun 1, 2021

Please feel free to open a new issue if problems persist.

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