[ET Trac] [Einstein Toolkit] #1378: provide equivalent of fprintf(stderr, "%s\n", msg) in Fortran

Einstein Toolkit trac-noreply at einsteintoolkit.org
Fri Jun 7 07:17:11 CDT 2013


#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")

-- 
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1378#comment:6>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit


More information about the Trac mailing list