Question about Unknown option outopt ptest

56 views
Skip to first unread message

Clara Novoa

unread,
Apr 28, 2021, 6:22:20 PM4/28/21
to AMPL Modeling Language
Dear AMPL team,

I am working in a Linux cluster trying to solve a large linear problem a student is researching on. I got the error :

Bad line 436884319 of /tmp/at162348.nl 

I proceeded to read in your group and found the idea of writing the binary file. Then I did it but I got another error located at the very bottom of the of this message. 

1. What does it mean?
2. Also, I am suspecting that what you say in Using AMPL under Unix "ampl-unix.pdf " document  maybe happening . A solution suggested there is  "The option TMPDIR specifies a directory to which temporary files will be written. When it is left at its default setting, the temporary files are written to /tmp. If there were also a filesystem /moretmp having more free space, for example, you could send the temporary files there by typ- ingampl: option TMPDIR "/moretmp"; You could also send the files to one of your own directories, say mytemp, by setting TMPDIR to mytemp". How can I know the size of the file .nl ?

.ampl: model Y1.mod;

ampl: data Y1_1.txt;

ampl: data Y1_2.txt;

ampl: data Y1_3.txt;

ampl: write ptest;

Unknown option outopt ptest (-optest).


AMPL Google Group

unread,
Apr 29, 2021, 10:54:36 AM4/29/21
to AMPL Modeling Language
To write an "nl" file having a specified name, put a "b" before the filename for a binary file, or a "g" before the filename for a text file. For example, either

write bptest;

or

write gptest;

writes the file ptest.nl, the only difference being that in the first case the file is in binary format, and in the second case it is in text format. (The two formats are equivalent, in the sense that they cause exactly the same problem to be sent to the solver.) Once you have written the nl file in this way, it remains until you delete it, and so you can check its size.

A message like "Bad line 436884319 of /tmp/at162348.nl" indicates that the nl file is corrupted. That might happen if there is not enough space on the filesystem where the nl file is being written. However if your tests show that there is enough space, then we should investigate further. So that we can try to reproduce the problem, send us the output of the AMPL command "option version;" and also the name of the solver that is specified in "option solver . . .", and attach the model file and the 3 data files.


--
Robert Fourer
am...@googlegroups.com
{#HS:1498150022-103925#}
On Wed, Apr 28, 2021 at 10:22 PM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
Dear AMPL team,

I am working in a Linux cluster trying to solve a large linear problem a student is researching on. I got the error :

Bad line 436884319 of /tmp/at162348.nl

I proceeded to read in your group and found the idea of writing the binary file. Then I did it but I got another error located at the very bottom of the of this message.

1. What does it mean?
2. Also, I am suspecting that what you say in Using AMPL under Unix "ampl-unix.pdf " document maybe happening . A solution suggested there is "The option TMPDIR specifies a directory to which temporary files will be written. When it is left at its default setting, the temporary files are written to /tmp. If there were also a filesystem /moretmp having more free space, for example, you could send the temporary files there by typ- ingampl: option TMPDIR "/moretmp"; You could also send the files to one of your own directories, say mytemp, by setting TMPDIR to mytemp". How can I know the size of the file .nl ?

Clara Novoa

unread,
Apr 29, 2021, 12:51:19 PM4/29/21
to AMPL Modeling Language
Dear Robert,

Thanks for your answer. I knew the write instruction should start with a "b" for binary but now I see that I actually wrote a "p" not a "b".  I see that it was a typo!
Later in last afternoon I tried inserting before the write instruction the instruction option  nl_comments 0; and AMPL was working on producing the nl file but taking lots of time so I suspended it to do another run for a smaller instance we needed to get results too. I will try to repeat the writing command with the large instance and I let you know if it writes and if I need more help or have more questions.

Thank you very much!

Regards,
Clara

Reply all
Reply to author
Forward
0 new messages