From 0833afd8e46075973bacc3e55b3b3f4a92be39b4 Mon Sep 17 00:00:00 2001 From: tradke Date: Thu, 12 Jul 2001 12:23:54 +0000 Subject: Give a level-1 warning if parameter recovery from given recovery_dir failed for some reason. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOUtil/trunk@127 b32723a9-ab3a-4a60-88e2-2e5d99d7c17a --- src/CheckpointRecovery.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/CheckpointRecovery.c b/src/CheckpointRecovery.c index c86022c..87087e8 100644 --- a/src/CheckpointRecovery.c +++ b/src/CheckpointRecovery.c @@ -515,6 +515,13 @@ int IOUtil_RecoverParameters (int (*recoverFn) (cGH *GH, struct dirent **recoverFileList = NULL; + if (verbose) + { + CCTK_VInfo (CCTK_THORNSTRING, "Searching for %s checkpoint files " + "with basename '%s' in directory '%s'", + recover_file, recovery_dir); + } + /* set the file prefix and extension for selecting valid recovery files */ /* we have to pass it via global variables to the select() routine because it doesn't receive user-supplied arguments */ @@ -529,7 +536,7 @@ int IOUtil_RecoverParameters (int (*recoverFn) (cGH *GH, if (nRecoverFiles <= 0) { - CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING, + CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, "No %s checkpoint files with basename '%s' found in " "recovery directory '%s'", fileType, recover_file, recovery_dir); @@ -568,6 +575,13 @@ int IOUtil_RecoverParameters (int (*recoverFn) (cGH *GH, retval = (*recoverFn) (dummyGH, recover_file, CP_RECOVER_PARAMETERS); } + if (retval < 0) + { + CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, + "Could not recover parameters from %s checkpoint file(s) " + "with basename '%s' in recovery directory '%s'", + fileType, recover_file, recovery_dir); + } return (retval); } -- cgit v1.2.3