#1378: provide equivalent of fprintf(stderr, "%s\n", msg) in Fortran --------------------------+------------------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: new Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: --------------------------+-------------------------------------------------
Comment (by eschnett):
I usually use write to produce several lines of output, often using do loops etc. to produce the output. A single call to an error message routine would not work. I then conclude by a call to CCTK_ERROR.
It is customary to use unit 6 for stdout (equivalent to using *) and unit 0 for stderr. Thus:
write(0,*) "Something went wrong!" write(0,*) "These are my variables:",a,b,c write(0,*) "begin gxx" write(0,*) "... and here is a whole grid function just for kicks":, gxx write(0,*) "end gxx" call CCTK_ERROR("aborting")