diff options
author | tradke <tradke@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a> | 2000-09-21 22:25:28 +0000 |
---|---|---|
committer | tradke <tradke@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a> | 2000-09-21 22:25:28 +0000 |
commit | 0f05bf19efabedc316828f95a0995003fb048aaa (patch) | |
tree | 74ba40f6a07f81cb78e290151017f34af30636a0 | |
parent | 69c0d20f6c58a74a9b999ce3acbfe9c39dfb9a7b (diff) |
Unconditionally create the checkpoint dir.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOUtil/trunk@101 b32723a9-ab3a-4a60-88e2-2e5d99d7c17a
-rw-r--r-- | src/GHExtension.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/GHExtension.c b/src/GHExtension.c index c32bd58..d0d180d 100644 --- a/src/GHExtension.c +++ b/src/GHExtension.c @@ -112,17 +112,20 @@ int IOUtil_InitGH (cGH *GH) myGH = (ioGH *) GH->extensions [CCTK_GHExtensionHandle ("IO")]; - /* Create the checkpoint directory if it is different to outdir */ - if (checkpoint_every > 0 && ! CCTK_Equals (checkpoint_dir, outdir)) + /* Create the checkpoint directory */ + if (CCTK_MyProc (GH) == 0) { - if (CCTK_MyProc (GH) == 0) + i = CCTK_CreateDirectory (0755, checkpoint_dir); + if (i < 0) { - if (CCTK_CreateDirectory (0755, checkpoint_dir) < 0) - { - CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, - "Problem creating checkpoint directory '%s'", - checkpoint_dir); - } + CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, + "Problem creating checkpoint directory '%s'", + checkpoint_dir); + } + else if (i > 0) + { + CCTK_VWarn (5, __LINE__, __FILE__, CCTK_THORNSTRING, + "Checkpoint directory '%s' already exists", checkpoint_dir); } } |