diff options
author | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-06-12 21:57:18 +0000 |
---|---|---|
committer | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-06-12 21:57:18 +0000 |
commit | a8e641780c5fe7b93b9520e9d79deb916365699b (patch) | |
tree | 4684aed51e47068fc7be5a4430f388ce65601e93 /src/main/WarnLevel.c | |
parent | 62ac5e79d8940125b85b129163fd406a2cbb2b73 (diff) |
Duplicate warning messages from other processors than 0 to stdout.
Fixes PR Cactus-709.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2226 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/main/WarnLevel.c')
-rw-r--r-- | src/main/WarnLevel.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/main/WarnLevel.c b/src/main/WarnLevel.c index 4f73e3e7..5e36b787 100644 --- a/src/main/WarnLevel.c +++ b/src/main/WarnLevel.c @@ -238,6 +238,10 @@ void CCTK_FCALL CCTK_FNAME (CCTK_Warn) @author Tom Goodale @desc Warning routine with variable argument list + + If the given warning level is less or equal to the current one, + it will print the given warning message to stderr. + On processors other than 0 it will also print it to stdout. @enddesc @calls CCTK_ParameterGet @@ -302,16 +306,33 @@ int CCTK_VWarn (int level, " (line %d of %s): \n" " -> ", level, thorn, myproc, line, file); + if (myproc) + { + fprintf (stdout, "WARNING level %d in thorn %s processor %d\n" + " (line %d of %s): \n" + " -> ", + level, thorn, myproc, line, file); + } } else { fprintf (stderr, "WARNING[L%d,P%d] (%s): ", level, myproc, thorn); + if (myproc) + { + fprintf (stdout, "WARNING[L%d,P%d] (%s): ", level, myproc, thorn); + } } va_start (ap, format); vfprintf (stderr, format, ap); fprintf (stderr, "\n"); fflush (stderr); + if (myproc) + { + vfprintf (stdout, format, ap); + fprintf (stdout, "\n"); + fflush (stdout); + } va_end (ap); } |