limit to number of commands in one session?

19 views
Skip to first unread message

at

unread,
Dec 21, 2009, 9:32:57 AM12/21/09
to AMPL Modeling Language
Here's an strange problem. I have an AMPL script that runs a Monte
Carlo routine. Each replication has at least 5000 solve commands with
the number of solves past 5000 being non-deterministic. All in all,
this adds up to a lot of commands being issued.

Now the error is that after exactly 248 replications of the Monte
Carlo (so at least 248*5000 solve commands), AMPL will quit with

"Error at _cmdno [number] executing "solve" command [shows the file/
line number where the solve command was]

can't open ./[some filename].nl"

My first thought was to change the /tmp/ directory so I did that to a
partition with a lot of space. But I still get the same error. And its
always after 248 replications and always at the same point in the
code.

Any immediate thoughts to what could be wrong? Otherwise I can try
running the same thing on a different machine...

Thanks
-Alex

Ali Baharev

unread,
Dec 21, 2009, 3:21:21 PM12/21/09
to am...@googlegroups.com
Hi,

Can you dump the AMPL model and data values that corresponds to the
248th iteration?

Then you could try to invoke AMPL with just that particular model data
values and see what is going on. Maybe the generation of the .nl file
from the model fails due to an unfortunate model parameter value.

Good luck anyhow,

Ali

at

unread,
Dec 22, 2009, 6:28:57 AM12/22/09
to AMPL Modeling Language

Hi Ali,

I'll try that, but I don't think thats the problem because I forgot to
mention something important. The data is being randomly generated
(using AMPL's built-ins) and randseed is set to 0 so the seed is
coming from the system time. So the model data at the 248th iteration
should be different each time...and yet the crash occurs at the same
point.

Robert Fourer

unread,
Dec 22, 2009, 9:39:23 PM12/22/09
to am...@googlegroups.com, at

That does seem mysterious ... though no doubt there is a good explanation to
be found. I would first want to check that there is nothing obvious, by
setting "options show_stats 2, times 1, gentimes 1" and looking at all of
the output that AMPL produces around the solve where the error occurs.

There is no intended limit to the number of commands in one session, but
it's possible that some strange behavior is being triggered by a very large
number of commands being executed.

Bob Fourer
4...@ampl.com

> --
>
> You received this message because you are subscribed to the Google Groups
> "AMPL Modeling Language" group.
> To post to this group, send email to am...@googlegroups.com.
> To unsubscribe from this group, send email to
> ampl+uns...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/ampl?hl=en.
>


at

unread,
Dec 24, 2009, 6:21:11 PM12/24/09
to AMPL Modeling Language
I was running it with "options show_stats 1, times 1, gentimes 1" and
couldn't discern anything different from the failed solve command. The
output from those options for the previous solve command looked the
same.

But you said show_stats 2? Does that add something important over
show_stats 1?

Reply all
Reply to author
Forward
0 new messages