Index: trunk/psLib/src/sys/psError.c
===================================================================
--- trunk/psLib/src/sys/psError.c	(revision 7251)
+++ trunk/psLib/src/sys/psError.c	(revision 7300)
@@ -10,6 +10,6 @@
  *  @author Eric Van Alst, MHPCC
  *
- *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-05-31 19:53:36 $
+ *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-06-02 21:33:34 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -167,4 +167,13 @@
 {
     return psErrorGet(0);
+}
+
+psErrorCode psErrorCodeLast(void)
+{
+    const psErr *err = psErrorGet(0);
+    psErrorCode code = err->code;
+    psFree(err);
+
+    return code;
 }
 
Index: trunk/psLib/src/sys/psError.h
===================================================================
--- trunk/psLib/src/sys/psError.h	(revision 7251)
+++ trunk/psLib/src/sys/psError.h	(revision 7300)
@@ -12,6 +12,6 @@
  *  @author Eric Van Alst, MHPCC
  *
- *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-15 02:33:54 $
+ *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-06-02 21:33:34 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -63,4 +63,10 @@
 psErr* psErrorLast(void);
 
+/** Get errorCode of last error put on the error stack
+ *
+ *  @return psErrorCode     last error code, or PS_ERR_NONE
+ */
+psErrorCode psErrorCodeLast(void);
+
 /** Clears the error stack.
  *
Index: trunk/psLib/src/sys/psLogMsg.c
===================================================================
--- trunk/psLib/src/sys/psLogMsg.c	(revision 7251)
+++ trunk/psLib/src/sys/psLogMsg.c	(revision 7300)
@@ -12,6 +12,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.52 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-09-20 02:43:53 $
+ *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-06-02 21:33:34 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -310,4 +310,8 @@
         logDest = stderr;
     }
+    // If it's an abort, we always want to see the message
+    if (logDest == NULL && level == PS_LOG_ABORT) {
+        logDest = stderr;
+    }
     // If logging is off, or if the level is too high, return immediately.
     if ((level > globalLogLevel) || (logDest == NULL)) {
@@ -405,4 +409,8 @@
     } else {
         fputc('\n', logDest);
+    }
+
+    if (level == PS_LOG_ABORT) {
+        fflush(logDest);
     }
 }
Index: trunk/psLib/src/sys/psString.h
===================================================================
--- trunk/psLib/src/sys/psString.h	(revision 7251)
+++ trunk/psLib/src/sys/psString.h	(revision 7300)
@@ -14,6 +14,6 @@
  *  @author David Robbins, MHPCC
  *
- *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-05-01 00:57:07 $
+ *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-06-02 21:33:34 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -29,4 +29,7 @@
 /** This macro will convert the argument to a quoted string */
 #define PS_STRING(S)  #S
+
+/** This macro expands to "file:line" */
+#define PS_FILE_LINE __FILE__ ":" PS_STRING(__LINE__)
 
 // Doxygen group tags
Index: trunk/psLib/src/sys/psTrace.c
===================================================================
--- trunk/psLib/src/sys/psTrace.c	(revision 7251)
+++ trunk/psLib/src/sys/psTrace.c	(revision 7300)
@@ -9,6 +9,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.61 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-09-24 01:33:12 $
+ *  @version $Revision: 1.62 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-06-02 21:33:34 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -598,4 +598,8 @@
             vsprintf(line, format, ap);
             write (traceFD, line, strlen(line));
+            if (line[strlen(line) - 1] != '\n') {
+                write(traceFD, "\n", 1);
+            }
+
 
             //        vfprintf(traceFP, format, ap);
