From 1133006b919f9a9943663d7c83c3744adbd23c0a Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Sun, 30 Apr 2006 22:05:53 +0000 Subject: [PATCH] More sleep commands needed for system calls for solaris --- Cantera/src/ct2ctml.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Cantera/src/ct2ctml.cpp b/Cantera/src/ct2ctml.cpp index e5f791d6c..c183d8ae5 100644 --- a/Cantera/src/ct2ctml.cpp +++ b/Cantera/src/ct2ctml.cpp @@ -44,6 +44,16 @@ namespace ctml { void ct2ctml(const char* file) { +#ifdef HAS_NO_PYTHON + /* + * Section to bomb out if python is not + * present in the computation environment. + */ + string ppath = file; + throw CanteraError("ct2ctml", + "python cti to ctml conversion requested for file, " + ppath + + ", but not available in this computational environment"); +#endif time_t aclock; time( &aclock ); int ia = static_cast(aclock); @@ -91,19 +101,21 @@ namespace ctml { * this problem. Also, having the xml file pre-existing fixes * the problem as well. There may be more direct ways to fix * this bug; however, I am not aware of them. + * HKM -> During the solaris port, I found the same thing. + * It probably has to do with NFS syncing problems. + * 3/3/06 */ -#ifdef CYGWIN + string sss = sleep(); #ifdef DEBUG_PATHS - writelog("sleeping for 3 secs+\n"); + writelog("sleeping for " + sss + " secs+\n"); #endif - cmd = "sleep 3"; + cmd = "sleep " + sss; try { ierr = system(cmd.c_str()); } catch (...) { ierr = -10; } -#endif // show the contents of the log file on the screen try {