* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
+#include "gmxpre.h"
+
+#include "gromacs/legacyheaders/main.h"
+
#include "config.h"
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <limits.h>
#include <time.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef GMX_NATIVE_WINDOWS
-#include <process.h>
-#endif
-
-#include "gromacs/legacyheaders/types/commrec.h"
-#include "gromacs/legacyheaders/network.h"
-#include "gromacs/legacyheaders/main.h"
-#include "gromacs/legacyheaders/macros.h"
-#include "gromacs/utility/futil.h"
#include "gromacs/fileio/filenm.h"
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/legacyheaders/copyrite.h"
-
+#include "gromacs/legacyheaders/macros.h"
+#include "gromacs/legacyheaders/network.h"
+#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/utility/basenetwork.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/futil.h"
#include "gromacs/utility/gmxmpi.h"
#include "gromacs/utility/programcontext.h"
#include "gromacs/utility/smalloc.h"
+#include "gromacs/utility/sysinfo.h"
/* The source code in this file should be thread-safe.
Please keep it that way. */
strcat(buf, ".");
/* Add extension again */
- strcat(buf, (ftp == efTPX) ? "tpr" : (ftp == efEDR) ? "edr" : ftp2ext(ftp));
+ strcat(buf, (ftp == efTPR) ? "tpr" : (ftp == efEDR) ? "edr" : ftp2ext(ftp));
if (debug)
{
fprintf(debug, "rank %d par_fn '%s'\n", cr->nodeid, buf);
time(&t);
-#ifndef NO_GETPID
-# ifdef GMX_NATIVE_WINDOWS
- pid = _getpid();
-# else
- pid = getpid();
-# endif
-#else
- pid = 0;
-#endif
+ pid = gmx_getpid();
if (bAppendFiles)
{
* at the actual file name
*/
if (is_output(&fnm[i]) ||
- fnm[i].ftp == efTPX || fnm[i].ftp == efCPT ||
+ fnm[i].ftp == efTPR || fnm[i].ftp == efCPT ||
strcmp(fnm[i].opt, "-rerun") == 0)
{
ftp = fn2ftp(fnm[i].fns[0]);