View previous topic :: View next topic |
Author |
Message |
DietmarSiepmann
Joined: 03 Jun 2013 Posts: 279
|
Posted: Fri May 09, 2014 11:10 am Post subject: ftn95 Option /undef and batch mode |
|
|
Hello,
I would like to make use of ftn95's option /undef to check if an executable has undefined variables or to check for array bounds etc.
To this end I compile and link the application (using option /undef) and then start it. If e.g. there are problems with the bounds of an array, an exception window pops up showing that a run time error has occurred and displaying something like "Array index out of bounds". I would normally save the error message to a file and then close the application using the buttons of the exception window.
Now I would like to do the same in batch mode. Is it possible to make the application save the error message of the exception window to a file and then close automatically (i.e. without user input)?
Thanks in advance,
Dietmar |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8255 Location: Salford, UK
|
Posted: Fri May 09, 2014 12:22 pm Post subject: |
|
|
Try setting the environment variable SALFENVAR to kill_dialogbox.
This should suppress the popup window and direct the output to the standard output.
Then you will need to redirect the standard output to a file in the batch file.
Try something like...
program.exe >program.out
There may be a way to append the output to one file for multiple programs but, off hand, I don't know how to do this. |
|
Back to top |
|
 |
DietmarSiepmann
Joined: 03 Jun 2013 Posts: 279
|
Posted: Fri May 09, 2014 4:06 pm Post subject: ftn95 Option /undef and batch mode |
|
|
Paul,
thank-you very much, this helped a lot.
I used it for checking an executable with winio output and used ftn95 options
/-windows /undef
in addition to the normal options in use.
Regards,
Dietmar |
|
Back to top |
|
 |
davidb
Joined: 17 Jul 2009 Posts: 560 Location: UK
|
Posted: Fri May 09, 2014 6:26 pm Post subject: Re: |
|
|
PaulLaidler wrote: |
There may be a way to append the output to one file for multiple programs but, off hand, I don't know how to do this. |
For output from more than one run or more than one program you can use
program.exe >>program.out _________________ Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl |
|
Back to top |
|
 |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2621 Location: Sydney
|
Posted: Mon May 12, 2014 2:35 am Post subject: |
|
|
Redirecting the error output might also help, such as:
set options=%1.f95 /check /lgo
ftn95 %options% >> %1.log 2>&1 |
|
Back to top |
|
 |
|