Can't find model file when running on NEOS

365 views
Skip to first unread message

infons

unread,
Nov 30, 2009, 5:20:04 PM11/30/09
to AMPL Modeling Language
Hi,

We are trying to submit the data, model and run scripts to NEOS via
Web for remote execution and getting the "can't find model..." error
right away. We understand that this is because the run-file loads the
model and data by name, and NEOS renames them automatically during
load, however if these references are removed, we cannot use any model
variables in the output of the run-file.

What should we specify in our run-file to be able to load it into NEOS
and still use all the definitions and results calculated in the model
script?

Thanks in advance for your help.

Ashutosh Mahajan

unread,
Dec 1, 2009, 10:49:44 AM12/1/09
to infons, Jason Sarich, AMPL Modeling Language
hi,
can you email a description of this problem, along with more details (which
solver and with job number if possible) to neos-c...@lists.mcs.anl.gov?

--
regards
Ashutosh Mahajan
http://coral.ie.lehigh.edu/~asm4

Jason Sarich

unread,
Dec 1, 2009, 11:39:50 AM12/1/09
to in...@novospark.com, Ashutosh Mahajan, AMPL Modeling Language
infons,

If your variable x is defined in the model file you submit, then putting 'display x;' in the run-file should work.  If this is not working for you, then please let us know the job number and we'll try to track down the problem.

Jason Sarich
Argonne National Laboratory


On Tue, Dec 1, 2009 at 10:23 AM, <in...@novospark.com> wrote:
Hi Ashutosh,
 
I can provide you with the job number for our runs, but this is more of a theoretical question, since even in the NEOS FAQ list there is a notion about loading models by name (Do not try to include your model or data files by name in the AMPL commands. The files are given new names under NEOS and will be loaded automatically), but there is no recommendation as to what one should do instead if the control file needs to refer to a variable that is defined in the model file.
 
For instance, if our run-file script looks like this:
 
model mymodel.mod;
data mydata.dat;
 
solve;
 
display x;
 
...and x is a parameter defined within mymodel.mod, then if we load the three files into NEOS, it will complain that mymodel.mod is not found. If we remove the first two lines to let NEOS load the model and data file automatically, then it will complain that variable x is not defined. So the question is, how can we make the run-file refer to a variable if it is defined in the model file that cannot be loaded by name when the job is submitted to NEOS?
 
Regards,
infons

in...@novospark.com

unread,
Dec 1, 2009, 12:28:36 PM12/1/09
to Jason Sarich, Ashutosh Mahajan, AMPL Modeling Language
Hi Jason,
 
I experimented a little bit with our files again, and it turns out that the variable references are working only after I remove the reset command at the top of the file. Apparently, NEOS loads data and model before the first command in the run-file (which is reasonable), and the "unknown variable" errors were a result of doing a reset after that.
 
Thanks for your help,

in...@novospark.com

unread,
Dec 1, 2009, 11:23:11 AM12/1/09
to Ashutosh Mahajan, AMPL Modeling Language, Jason Sarich
Reply all
Reply to author
Forward
0 new messages