﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
352	stderr output?	Dave Offiler	Dave Offiler	"Helpdesk enquiry ID=177 (from Axel) raised the issue of extraneous output to stderr (this specific issue is fixed for v7.1). However, this raises a policy issue of whether ROPP (F90 code) should write to stderr at all.

A quick Google and Wikipedia shows that it is common for compilers
to map unit number 0 to stderr. But unlike unit 5 (stdin) and 6 (stdout) which are reserved, this 0=stderr is not ISO-standard, merely convention, and therefore not guaranteed to work universally. Wikipedia (http://en.wikipedia.org/wiki/Standard_streams#1950s:_Fortran) flags this practice as 'dubious'. The ISO-standard allows any non-negative number (but usually the range is 1-99), but does not assign any specific meaning to 0 (only 5 and 6).

The early ROPP releases used Christian's message library which called a C-routine to do the output (including stderr, which _is_ a standard stream in C), but we took the decision long ago to remove all C code, and output all messages to stdout. At some point later (Huw?), it seems message.f90 writes to stderr via unit 0 for certain message types (e.g. FATAL_ERROR). Was this by user request?

This pros and cons of using this non-standard (but common) unit number ought to be reviewed and a recorded decision made whether to accept the principle and practice of using Fortran unit 0 for stderr messages, or whether to direct all messages to stdout only.

Apart from the specific Helpdesk problem, the current practice has not knowingly caused any problems - though testing of conditions which would result in a run-time output to stderr is hardly thorough. A small test program should first be setup and run with at least all the compilers available to us (MetO) on Linux, AIX and Cygwin and others if possible to see if any do not map unit 0 to stderr (where such a concept exists)."	task	closed	minor	Whenever	ROPP (all)	7.0	wontfix	stderr, error messages	
