Sumit,
You see the errors in the Log stream when compiling from within the GAMS IDE since the IDE adds a couple of flags to the GAMS execution. You can do the same:
gams mymodel er=99 lo=3
triggers log line with the errors:
— Starting compilation
— trnsport.gms(25) 3 Mb 1 Error
*** Error 140 in C:\tmp\trnsport.gms
Unknown symbol
If you add another parameter (ide=1) you iwll get hooks into the source and LST file as part of the log stream:
gams mymodel er=99 ide=1 lo=3
produces
— Starting compilation
— trnsport.gms(25) 3 Mb 1 Error
*** Error 140 in C:\tmp\trnsport.gms[ERR:“C:\tmp\trnsport.gms”,25,11][LST:27]
Unknown symbol
Hope this helps,
Michael Bussieck - GAMSWorld Coordinator
On Tuesday, April 30, 2013 3:57:40 AM UTC-4, Sumit Sharma wrote:
Hi Michael,
I want to catch the syntax errors in the gams file (e.g. transport.gms) . with the option “lo=3” the stdout leaves out the error part. I mean it just shows that there are some errors in the file, but never cite them.
However when I am executing the same file in the actual GAMS configurator it displays all the errors and also give me a way to click on them to move to the lines in the file containing the error, to correct them.
How can I catch those errors.
Regards
Sumit
On Wednesday, 24 April 2013 04:11:21 UTC+2, Michael Bussieck wrote:
Sumit,
With the option “lo=3” GAMS and all subprocessed send their output to stdout (for a $call or execute it depends what this process does). We usually do not send anything to stderr. What error do you get that is not captured by stdout?
Michael Bussieck - GAMSWorld Coordinator
On Tuesday, April 23, 2013 10:20:53 AM UTC-4, Sumit Sharma wrote:
I have a problem while working with GAMS. I am trying to start GAMS as a child process using Qt. Hence I wanted to forward the standard output(stdout) as well as the standard error (stderr) of GAMS to the stdout and stderr respectively of its parent process . I can successfully access the stdout data, but when there is a GAMS error the stderr data is still null, i.e. it displays nothing. Do you think the problem is with the GAMS? I checked everything but still helpless.
Kindly help me out
Regards
Sumit
–
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
\