Receiving the message: Error Error code = 2; no such file or directory

Archive of Gamsworld Google Group
Post Reply
Archiver
User
User
Posts: 7876
Joined: 7 years ago

Receiving the message: Error Error code = 2; no such file or directory

Post by Archiver »


Hi,

I'm using the MERGE model on GAMS and when I run the model from the
command prompt I get the message "***Error Cannot open parameter file
"C:\Users\Peter\Documents\gamsdir\projdir\MERGE6_1\conopt.opt ***Error
Error code = 2; no such file or directory. I've googled this error
message and there is some advice on the web to delete the command
OPTION NLP = CONOPT3; because the model already uses conopt (and
minos). But I did this and I'm still receiving this message and
identical results, so my change was inconsequential. Any thoughts on
how I can fix this error?

Thanks!

Peter


Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: Receiving the message: Error Error code = 2; no such file or directory

Post by Archiver »


I am stuck with this error as wel.. did you solved this problem?

Best,
Rui

On 1 aug, 17:14, Peter Rasmussen wrote:
> > Hi,
> >
> > I'm using the MERGE model on GAMS and when I run the model from the
> > command prompt I get the message "***Error Cannot open parameter file
> > "C:\Users\Peter\Documents\gamsdir\projdir\MERGE6_1\conopt.opt ***Error
> > Error code = 2; no such file or directory. I've googled this error
> > message and there is some advice on the web to delete the command
> > OPTION NLP = CONOPT3; because the model already uses conopt (and
> > minos). But I did this and I'm still receiving this message and
> > identical results, so my change was inconsequential. Any thoughts on
> > how I can fix this error?
> >
> > Thanks!
> >
> > Peter


Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: Receiving the message: Error Error code = 2; no such file or directory

Post by Archiver »

Reply-to: gamsworld@googlegroups.com

Hi

I am stuck with this error! I don't know what to do!
did you solved it?
best
Torkfar

--
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
berry12150
User
User
Posts: 4
Joined: 6 years ago

Re: Receiving the message: Error Error code = 2; no such file or directory

Post by berry12150 »

I met the same issue:

*** Error Cannot open parameter file "E:\...\path.opt"
*** Error Error code = 2; No such file or directory

Does anyone know how to solve this problem?
abhosekar
Moderator
Moderator
Posts: 295
Joined: 3 years ago

Re: Receiving the message: Error Error code = 2; no such file or directory

Post by abhosekar »

The error is what it says. GAMS cannot find the file "E:\...\path.opt"

I assume you don't provide full path that the error message shows. Is there a file at E:\..\path.opt? Are you creating this file?

- Atharv
berry12150
User
User
Posts: 4
Joined: 6 years ago

Re: Receiving the message: Error Error code = 2; no such file or directory

Post by berry12150 »

abhosekar wrote: 2 years ago The error is what it says. GAMS cannot find the file "E:\...\path.opt"

I assume you don't provide full path that the error message shows. Is there a file at E:\..\path.opt? Are you creating this file?

- Atharv

Hi Atharv,

Thanks for your reply. There is no path.opt file in the directory unless I create an empty file using

Code: Select all

$onecho > path.opt
$offecho
After I create this empty path.opt file, the error turns into a warning:

Code: Select all

Reading parameter(s) from "E:\Documents\gams_model\path.opt"
*** Warning Read from empty file or string
All my data are saved in .gms files, not sure why the error message mentioned this path.opt file. For some data, my model finds solutions without the path.opt file. But for other sets of data, the model give out the error message in the .log file:

Code: Select all

*** Error Cannot open parameter file "E:\Documents\gams_model\path.opt"
*** Error Error code = 2; No such file or directory
I am using the path solver to solve the mcp problem. Do you think it has something to do with the path solver?

Code: Select all

option mcp = path;
Thanks,
Berry
abhosekar
Moderator
Moderator
Posts: 295
Joined: 3 years ago

Re: Receiving the message: Error Error code = 2; no such file or directory

Post by abhosekar »

Makes sense. Looks like you don't want to use any options but your code is asking GAMS to look for options file.

Search for a line that says modelname.optfile = 1; (modelname is your model name)
If you comment this line, GAMS will not look for options file and you won't get any error.

- Atharv
Post Reply