Remove ancient SGI-specific code
authorTeemu Murtola <teemu.murtola@gmail.com>
Fri, 4 Apr 2014 17:29:19 +0000 (20:29 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Fri, 4 Apr 2014 17:29:53 +0000 (20:29 +0300)
Change-Id: I32aa353faf8848690e1ae931e958d04aff10c121

manual/install.tex
src/gromacs/commandline/pargs.cpp
src/gromacs/gmxana/gmx_options.c
src/gromacs/gmxlib/gmx_fatal.c
src/gromacs/legacyheaders/gmx_fatal.h

index 08ad18e0692332728e76d73c8eeff2218011385e..b1b53202f82d2b2d90596106070f91e07e27fef6 100644 (file)
@@ -361,10 +361,6 @@ you should consult your local documentation for details.
 \item   {\tt GMX_VERLET_SCHEME}: convert from group-based to Verlet cutoff scheme, even if the {\tt cutoff_scheme} is
         not set to use Verlet in the {\tt .mdp} file. It is unnecessary since the {\tt -testverlet} option of
         {\tt \normindex{mdrun}} has the same functionality, but it is maintained for backwards compatibility.
-\item   {\tt GMXNPRI}: for SGI systems only. When set, gives the default non-degrading priority (npri) 
-        for {\tt \normindex{mdrun}}, {\tt \normindex{g_covar}} and {\tt \normindex{g_nmeig}},
-        {\eg} setting {\tt setenv GMXNPRI 250} causes all runs to be performed at near-lowest priority by default.
-\item   {\tt GMXNPRIALL}: same as {\tt GMXNPRI}, but for all processes.
 \item   {\tt MPIRUN}: the {\tt mpirun} command used by {\tt \normindex{g_tune_pme}}.
 \item   {\tt MDRUN}: the {\tt \normindex{mdrun}} command used by {\tt \normindex{g_tune_pme}}.
 \item   {\tt GMX_NSTLIST}: sets the default value for {\tt nstlist}, preventing it from being tuned during
index 1c2347e55299f0684efe04a0ab2b3436f0e9c648..e7236740c4f1d7666f01d81bf4e1719e75d461b9 100644 (file)
 #include <unistd.h>
 #endif
 
-/* used for npri */
-#ifdef __sgi
-#include <sys/schedctl.h>
-#include <sys/sysmp.h>
-#endif
-
 #include "thread_mpi/threads.h"
 
 #include "gromacs/legacyheaders/gmx_fatal.h"
@@ -619,42 +613,35 @@ gmx_bool parse_common_args(int *argc, char *argv[], unsigned long Flags,
 
     t_pargs    *all_pa = NULL;
 
-#ifdef __sgi
-    int     npri      = 0;
-    t_pargs npri_pa   = {
-        "-npri", FALSE, etINT,   {&npri},
-        "HIDDEN Set non blocking priority (try 128)"
-    };
-#endif
-    t_pargs nice_pa   = {
+    t_pargs     nice_pa   = {
         "-nice", FALSE, etINT,   {&nicelevel},
         "Set the nicelevel"
     };
-    t_pargs deffnm_pa = {
+    t_pargs     deffnm_pa = {
         "-deffnm", FALSE, etSTR, {&deffnm},
         "Set the default filename for all file options"
     };
-    t_pargs begin_pa  = {
+    t_pargs     begin_pa  = {
         "-b",    FALSE, etTIME,  {&tbegin},
         "First frame (%t) to read from trajectory"
     };
-    t_pargs end_pa    = {
+    t_pargs     end_pa    = {
         "-e",    FALSE, etTIME,  {&tend},
         "Last frame (%t) to read from trajectory"
     };
-    t_pargs dt_pa     = {
+    t_pargs     dt_pa     = {
         "-dt",   FALSE, etTIME,  {&tdelta},
         "Only use frame when t MOD dt = first time (%t)"
     };
-    t_pargs view_pa   = {
+    t_pargs     view_pa   = {
         "-w",    FALSE, etBOOL,  {&bView},
         "View output [TT].xvg[tt], [TT].xpm[tt], [TT].eps[tt] and [TT].pdb[tt] files"
     };
-    t_pargs xvg_pa    = {
+    t_pargs     xvg_pa    = {
         "-xvg",  FALSE, etENUM,  {xvg_format},
         "xvg plot formatting"
     };
-    t_pargs time_pa   = {
+    t_pargs     time_pa   = {
         "-tu",   FALSE, etENUM,  {time_units},
         "Time unit"
     };
@@ -708,23 +695,6 @@ gmx_bool parse_common_args(int *argc, char *argv[], unsigned long Flags,
         npall = add_parg(npall, all_pa, &(pca_pa[i]));
     }
 
-#ifdef __sgi
-    const char *envstr = getenv("GMXNPRIALL");
-    if (envstr)
-    {
-        npri = strtol(envstr, NULL, 10);
-    }
-    if (FF(PCA_BE_NICE))
-    {
-        envstr = getenv("GMXNPRI");
-        if (envstr)
-        {
-            npri = strtol(envstr, NULL, 10);
-        }
-    }
-    npall = add_parg(npall, all_pa, &npri_pa);
-#endif
-
     if (FF(PCA_BE_NICE))
     {
         nicelevel = 19;
@@ -819,10 +789,6 @@ gmx_bool parse_common_args(int *argc, char *argv[], unsigned long Flags,
         memcpy(&(pa[i]), &(all_pa[k]), (size_t)sizeof(pa[i]));
     }
 
-#if (defined __sgi && USE_SGI_FPE)
-    doexceptions();
-#endif
-
     bool bExit = false;
     try
     {
@@ -851,13 +817,6 @@ gmx_bool parse_common_args(int *argc, char *argv[], unsigned long Flags,
     GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
 
     /* Set the nice level */
-#ifdef __sgi
-    if (npri != 0 && !bExit)
-    {
-        schedctl(MPTS_RTPRI, 0, npri);
-    }
-#endif
-
 #ifdef HAVE_UNISTD_H
 #ifndef GMX_NO_NICE
     /* The some system, e.g. the catamount kernel on cray xt3 do not have nice(2). */
index 10112a203b62e50064d416ece0d5572ebc712507..0ed3e7045d1288eb10427fa36299290315e4d307 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2006, The GROMACS development team.
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -63,10 +63,6 @@ gmx_options(int argc, char *argv[])
         "you can use the graphical interface (if not, you will get an error):[BR]"
         "[TT]-X[tt] gmx_bool [TT]no[tt] Use dialog box GUI to edit command line options",
 
-        "When compiled on an SGI-IRIX system, all GROMACS programs have an "
-        "additional option:[BR]"
-        "[TT]-npri[tt] int [TT]0[tt] Set non blocking priority (try 128)",
-
         "Optional files are not used unless the option is set, in contrast to "
         "non-optional files, where the default file name is used when the "
         "option is not set.",
index 8cbc4511304c0098a456b58d3eb067083ccb96e5..837abe06d7197d179cf1b782408e4ba9f800b9ec 100644 (file)
@@ -347,51 +347,6 @@ void init_debug(const int dbglevel, const char *dbgfile)
     tMPI_Thread_mutex_unlock(&debug_mutex);
 }
 
-#if (defined __sgi && defined USE_SGI_FPE)
-static void user_routine(unsigned us[5], int ii[2])
-{
-    fprintf(stderr, "User routine us=(%u,%u,%u,%u,%u) ii=(%d,%d)\n",
-            us[0], us[1], us[2], us[3], us[4], ii[0], ii[1]);
-    fprintf(stderr, "Exception encountered! Dumping core\n");
-    abort();
-}
-
-static void abort_routine(unsigned int **ii)
-{
-    fprintf(stderr, "Abort routine\n");
-    abort();
-}
-
-static void handle_signals(int n)
-{
-    fprintf(stderr, "Handle signals: n = %d\n", n);
-    fprintf(stderr, "Dumping core\n");
-    abort();
-}
-
-void doexceptions(void)
-{
-#include <sigfpe.h>
-#include <signal.h>
-    int hs[] = { SIGILL, SIGFPE, SIGTRAP, SIGEMT, SIGSYS };
-
-    int onoff, en_mask, abort_action, i;
-
-    tMPI_Thread_mutex_lock(&debug_mutex);
-    onoff   = _DEBUG;
-    en_mask = _EN_UNDERFL | _EN_OVERFL | _EN_DIVZERO |
-        _EN_INVALID | _EN_INT_OVERFL;
-    abort_action = _ABORT_ON_ERROR;
-    handle_sigfpes(onoff, en_mask, user_routine, abort_action, abort_routine);
-
-    for (i = 0; (i < asize(hs)); i++)
-    {
-        signal(hs[i], handle_signals);
-    }
-    tMPI_Thread_mutex_unlock(&debug_mutex);
-}
-#endif /* __sgi and FPE */
-
 static const char *gmxuser = "Please report this to the mailing list (gmx-users@gromacs.org)";
 
 static void        (*gmx_error_handler)(const char *msg) = quit_gmx;
index 432f10ddf32be90bd42bc7b5c7ce90023cea1694..8bf145b35e8f997bbbf0e83dbcc9639ce92891d9 100644 (file)
@@ -131,11 +131,6 @@ void init_debug(const int dbglevel, const char *dbgfile);
 /** Returns TRUE when the program was started in debug mode */
 gmx_bool bDebugMode(void);
 
-#if (defined __sgi && defined USE_SGI_FPE)
-/** Sets exception handlers for debugging */
-void doexceptions(void);
-#endif
-
 /*! \brief
  * Implementation for range_check() and range_check_mesg().
  *