FreeBSD port of SGE (Compute farm system)

Ron Chen ron_chen_123 at yahoo.com
Mon Apr 8 08:01:27 PDT 2002


Patch and output attached.

Also, I already found 1 problem -- somewhere in execd.
It affects the process' priority in SGEEE mode.

However, I've not fixed it yet, I just want to release
the current patch ASAP to let people try it out.


 -Ron


--- Ron Chen <ron_chen_123 at yahoo.com> wrote:
> Hi,
> 
> I compiled the source, changed a few parameters, and
> SGE finally runs on FreeBSD. It is running in
> single-
> user mode, with only 1 host. I am doing a little
> clean
> up, and then I will need to make sure my changes do
> not affect others (by "#ifdef BSD").
> 
> It still does not get the correct system information
> yet, but some of the job accounting info is there
> (at
> least run time is correct  8-) ).
> 
> It is now running for several hours, it looks
> stable. It ran several tens of jobs. "qstat", 
> "qhost", "qacct", "qconf", "qdel" look fine, output 
> makes sense (but need to implement the resource info

> collecting routines).
> 
> I will post the patches tomorrow, together with some
> output of the commands. (I will be busy today)
> 
> Also, I will move the discussion from the hackers
> list
> to the cluster at freebsd list.



__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
-------------- next part --------------
Index: aimk
===================================================================
RCS file: /usr/local/tigris/data/helm/cvs/repository/gridengine/source/aimk,v
retrieving revision 1.38
diff -u -6 -r1.38 aimk
--- aimk	2002/02/22 13:23:59	1.38
+++ aimk	2002/04/05 17:54:10
@@ -1,7 +1,7 @@
-#!/bin/csh -fb
+#!/bin/csh 
 #
 #  aimk
 #
 #___INFO__MARK_BEGIN__
 ##########################################################################
 #
@@ -78,12 +78,18 @@
 case "crayts":
    set BUILDARCH = UNICOS_TS
    breaksw
 case "craytsieee":
    set BUILDARCH = UNICOS_TS_IEEE
    breaksw
+case "darwin":
+   set BUILDARCH = DARWIN
+   breaksw
+case "freebsd"
+   set BUILDARCH = FREEBSD
+   breaksw
 case "glinux":
    set BUILDARCH = LINUX6
    breaksw
 case "hp10":
    set BUILDARCH = HP10
    breaksw
@@ -872,12 +878,97 @@
       set GCC_NOERR_CXXFLAGS = "$CXXFLAGS"
    endif
 
    set SGE_NPROCS_CFLAGS = "$CFLAGS"
 
    breaksw
+
+case DARWIN:
+   set COMPILE_DC = 1
+   if ( $USE_QMAKE == 0 ) then
+      set MAKE = make
+   endif
+   set OFLAG = "-O"
+   if ( "$CC" != insure ) then
+      set CC       = cc
+      set CXX      = c++
+   else
+      set CFLAGS = "-Wno-error $CFLAGS"
+      set CXXFLAGS = "-Wno-error $CXXFLAGS"
+      set LIBS = "$LIBS"
+   endif
+   set DEPEND_FLAGS = "$CFLAGS $XMTINCD"
+
+   set LD_LIBRARY_PATH = "/usr/lib"
+
+  if ( $SHAREDLIBS == 1 ) then
+      set LIBEXT = ".dylib"
+   else
+      set LIBEXT = ".a"
+   endif
+
+   set PTHRDSFLAGS = "-D_REENTRANT -D__USE_REENTRANT"
+
+   if ( $DEBUGGED == 1) then
+      set DEBUG_FLAG = "-ggdb $INSURE_FLAG"
+   endif
+   if ( $GPROFFED == 1) then
+      set DEBUG_FLAG = "$DEBUG_FLAG -pg"
+   endif
+
+   set ARFLAGS     = rcv
+   set CFLAGS   = "$OFLAG -Wall -Werror -D$BUILDARCH $DEBUG_FLAG $CFLAGS"
+   set CXXFLAGS   = "$OFLAG -Werror -Wstrict-prototypes -D$BUILDARCH $DEBUG_FLAG $CXXFLAGS"
+   set NOERR_CFLAG = "-Wno-error"
+   set GCC_NOERR_CFLAGS = "$CFLAGS -Wno-error"
+   set GCC_NOERR_CXXFLAGS = "$CXXFLAGS -Wno-error"
+   set LFLAGS   = "$DEBUG_FLAG $LFLAGS"
+   set LIBS     = "$LIBS"
+   set RANLIB   = "ranlib"
+   set XMTDEF   = ""
+   set XINCD    = "$XMTINCD $XINCD -I/usr/X11R6/include"
+   set XCFLAGS  = "-Wno-strict-prototypes -Wno-error $XMTDEF $XINCD"
+   set XLIBD    = "-L/usr/X11R6/lib"
+   set XLFLAGS  = "$XLIBD"
+   set XLIBS    = "-lXm -lXpm -lXt -lXext -lX11 -lSM -lICE -lXp"
+
+   set SGE_NPROCS_CFLAGS = "$CFLAGS"
+
+   breaksw
+
+case FREEBSD:
+   set COMPILE_DC = 1
+   set MAKE = make
+   set OFLAG = "-O"
+   set ARFLAGS     = rcv
+   if ( "$CC" != insure ) then
+      set CC       = gcc
+      set CXX      = g++
+   else
+      set CFLAGS = "-Wno-error $CFLAGS"
+      set CXXFLAGS = "-Wno-error $CXXFLAGS"
+      set LIBS = "$LIBS"
+   endif
+   set DEPEND_FLAGS = "$CFLAGS $XMTINCD"
+   set PTHRDSFLAGS = "-D_REENTRANT -D__USE_REENTRANT"
+   set CFLAGS   = "$OFLAG -Wall -D$BUILDARCH $DEBUG_FLAG $CFLAGS -I/usr/X11R6/include"
+   set CXXFLAGS   = "$OFLAG -Wstrict-prototypes -D$BUILDARCH $DEBUG_FLAG $CXXFLAGS"
+   set NOERR_CFLAG = "-Wno-error"
+   set GCC_NOERR_CFLAGS = "$CFLAGS -Wno-error"
+   set GCC_NOERR_CXXFLAGS = "$CXXFLAGS -Wno-error"
+   set LFLAGS   = "$DEBUG_FLAG $LFLAGS"
+   set LIBS     = "$LIBS"
+   set XMTDEF   = ""
+   set XINCD    = "$XMTINCD $XINCD -I/usr/X11/include"
+   set XCFLAGS  = "-Wno-strict-prototypes -Wno-error $XMTDEF $XINCD"
+   set XLIBD    = "-L/usr/X11R6/lib"
+   set XLFLAGS  = "$XLIBD"
+   set XLIBS    = "-Xlinker -Bstatic -lXm -Xlinker -Bdynamic -lXpm -lXt -lXext -lX11 -lSM -lICE -lXp"
+
+   set SGE_NPROCS_CFLAGS = "$CFLAGS"
+   breaksw 
 
 case IRIX6*:
    set COMPILE_DC = 1
    set ARCH = $IRIX_ARCHDEF
    #if (`hostname` != DWAIN) then
    #   set MAKE     = make




Index: 3rdparty/sge_depend/Makefile
===================================================================
RCS file: /usr/local/tigris/data/helm/cvs/repository/gridengine/source/3rdparty/sge_depend/Makefile,v
retrieving revision 1.1.1.1
diff -u -6 -r1.1.1.1 Makefile
--- 3rdparty/sge_depend/Makefile	2001/07/18 11:06:07	1.1.1.1
+++ 3rdparty/sge_depend/Makefile	2002/04/05 17:54:11
@@ -53,11 +53,14 @@
 ifparser.o:	$(DEP_DIR)/ifparser.c
 		$(CC) -c $(CFLAGS) $(MAIN_DEFINES) $(DEP_DIR)/ifparser.c
 
 cppsetup.o:	$(DEP_DIR)/cppsetup.c
 		$(CC) -c $(CFLAGS) $(MAIN_DEFINES) $(DEP_DIR)/cppsetup.c
 
-include.o:	$(DEP_DIR)/include.c
+include.o:	 $(DEP_DIR)/include.c
+		@echo "CFLAGS" : $(CFLAGS)
+		@echo "MAIN_DEFINES" : $(MAIN_DEFINES)
+		@echo "DEP_DIR" : $(DEP_DIR)
 		$(CC) -c $(CFLAGS) $(MAIN_DEFINES) $(DEP_DIR)/include.c
 
 pr.o:	$(DEP_DIR)/pr.c
 		$(CC) -c $(CFLAGS) $(MAIN_DEFINES) $(DEP_DIR)/pr.c





Index: daemons/common/pdc.c
===================================================================
RCS file: /usr/local/tigris/data/helm/cvs/repository/gridengine/source/daemons/common/pdc.c,v
retrieving revision 1.4
diff -u -6 -r1.4 pdc.c
--- daemons/common/pdc.c	2002/02/24 13:41:30	1.4
+++ daemons/common/pdc.c	2002/04/05 17:54:11
@@ -114,13 +114,13 @@
 #include <sys/acct.h>
 #include <sys/stat.h>
 #include <sys/machcons.h>
 #include "sge_stat.h"
 #endif
 
-#if defined(LINUX) || defined(ALPHA) || defined(IRIX6) || defined(SOLARIS)
+#if defined(LINUX) || defined(ALPHA) || defined(IRIX6) || defined(SOLARIS) || defined(FREEBSD)
 #include "sge_os.h"
 #endif
 
 #if defined(IRIX6)
 #  define F64 "%lld"
 #  define S64 "%lli"
@@ -2041,13 +2041,13 @@
 
 static time_t start_time;
 
 int psStartCollector(void)
 {
    static int initialized = 0;
-   int ncpus;
+   int ncpus = 0;
 
 #if defined(ALPHA)
    int start=0;
 #endif
 
    if (initialized)
@@ -2069,13 +2069,13 @@
    sysdata.sys_length = sizeof(sysdata);
 
    /* page size */
    pagesize = getpagesize();
 
    /* retrieve static parameters */
-#if defined(LINUX) || defined(ALINUX) || defined(IRIX6) || defined(SOLARIS)
+#if defined(LINUX) || defined(ALINUX) || defined(IRIX6) || defined(SOLARIS) || defined(FREEBSD)
    ncpus = sge_nprocs();
 #elif defined(ALPHA)
    {
       /* Number of CPUs */
       ncpus = sge_nprocs();
 #ifdef PDC_STANDALONE   






Index: daemons/common/procfs.c
===================================================================
RCS file: /usr/local/tigris/data/helm/cvs/repository/gridengine/source/daemons/common/procfs.c,v
retrieving revision 1.3
diff -u -6 -r1.3 procfs.c
--- daemons/common/procfs.c	2002/02/24 13:41:30	1.3
+++ daemons/common/procfs.c	2002/04/05 17:54:11
@@ -47,13 +47,15 @@
 #include <sys/syscall.h>
 #endif
 
 #include <unistd.h>
 #include <sys/times.h>
 #include <sys/wait.h>
-#include <sys/resource.h>
+#if 0
+ #include <sys/resource.h>
+#endif
 #include <dirent.h>
 #include <stdlib.h>
 #include <string.h>
 #include <signal.h>
 
 #if defined(ALPHA) 






Index: daemons/execd/exec_job.c
===================================================================
RCS file: /usr/local/tigris/data/helm/cvs/repository/gridengine/source/daemons/execd/exec_job.c,v
retrieving revision 1.20
diff -u -6 -r1.20 exec_job.c
--- daemons/execd/exec_job.c	2002/02/24 13:41:34	1.20
+++ daemons/execd/exec_job.c	2002/04/05 17:54:12
@@ -408,13 +408,13 @@
 static const char *get_sharedlib_path_name(void) 
 {
 #if defined(AIX4)
    return "LIBPATH";
 #elif defined(HP10) || defined(HP11)
    return "SHLIB_PATH";
-#elif defined(ALPHA) || defined(IRIX6) || defined(IRIX65) || defined(LINUX) || defined(SOLARIS)
+#elif defined(ALPHA) || defined(IRIX6) || defined(IRIX65) || defined(LINUX) || defined(SOLARIS) ||defined(FREEBSD)
    return "LD_LIBRARY_PATH";
 #else
 #error "don't know how to set shared lib path on this architecture"
    return NULL; /* never reached */
 #endif
 }





Index: daemons/execd/ptf.c
===================================================================
RCS file: /usr/local/tigris/data/helm/cvs/repository/gridengine/source/daemons/execd/ptf.c,v
retrieving revision 1.15
diff -u -6 -r1.15 ptf.c
--- daemons/execd/ptf.c	2002/02/24 13:41:35	1.15
+++ daemons/execd/ptf.c	2002/04/05 17:54:12
@@ -272,13 +272,13 @@
 *     static osjobid_t - os job id (job id / ash / supplementary gid)
 ******************************************************************************/
 static osjobid_t ptf_get_osjobid(lListElem *osjob)
 {
    osjobid_t osjobid;
 
-#if !defined(LINUX) && !defined(SOLARIS) && !defined(ALPHA5) && !defined(NECSX4) && !defined(NECSX5)
+#if !defined(LINUX) && !defined(SOLARIS) && !defined(ALPHA5) && !defined(NECSX4) && !defined(NECSX5) && !defined(FREEBSD)
 
    osjobid = lGetUlong(osjob, JO_OS_job_ID2);
    osjobid = (osjobid << 32) + lGetUlong(osjob, JO_OS_job_ID);
 
 #else
 
@@ -302,13 +302,13 @@
 *  INPUTS
 *     lListElem *osjob  - element of type JO_Type 
 *     osjobid_t osjobid - os job id (job id / ash / supplementary gid) 
 ******************************************************************************/
 static void ptf_set_osjobid(lListElem *osjob, osjobid_t osjobid)
 {
-#if !defined(LINUX) && !defined(SOLARIS) && !defined(ALPHA5) && !defined(NECSX4) && !defined(NECSX5)
+#if !defined(LINUX) && !defined(SOLARIS) && !defined(ALPHA5) && !defined(NECSX4) && !defined(NECSX5) && !defined(FREEBSD)
 
    lSetUlong(osjob, JO_OS_job_ID2, ((u_osjobid_t) osjobid) >> 32);
    lSetUlong(osjob, JO_OS_job_ID, osjobid & 0xffffffff);
 
 #else
 
@@ -907,13 +907,13 @@
 {
    lListElem *job, *osjob = NULL;
    lCondition *where;
 
    DENTER(TOP_LAYER, "ptf_get_job_os");
 
-#if defined(LINUX) || defined(SOLARIS) || defined(ALPHA5) || defined(NECSX4) || defined(NECSX5)
+#if defined(LINUX) || defined(SOLARIS) || defined(ALPHA5) || defined(NECSX4) || defined(NECSX5) || defined(FREEBSD)
    where = lWhere("%T(%I == %u)", JO_Type, JO_OS_job_ID, (u_long32) os_job_id);
 #else
    where = lWhere("%T(%I == %u && %I == %u)", JO_Type,
                   JO_OS_job_ID, (u_long) (os_job_id & 0xffffffff),
                   JO_OS_job_ID2, (u_long) (((u_osjobid_t) os_job_id) >> 32));
 #endif








Index: daemons/shepherd/setrlimits.c
===================================================================
RCS file: /usr/local/tigris/data/helm/cvs/repository/gridengine/source/daemons/shepherd/setrlimits.c,v
retrieving revision 1.5
diff -u -6 -r1.5 setrlimits.c
--- daemons/shepherd/setrlimits.c	2002/02/24 13:41:43	1.5
+++ daemons/shepherd/setrlimits.c	2002/04/05 17:54:12
@@ -45,14 +45,19 @@
 #endif
 
 #if defined(HP10_01) || defined(HPCONVEX)
 #   define _KERNEL
 #endif
 
-#include <sys/resource.h>
+#if defined(FREEBSD)
+#include <sys/types.h>
+#endif
 
+#if 0
+#include <sys/resource.h>
+#endif
 #if defined(HP10_01) || defined(HPCONVEX)
 #   undef _KERNEL
 #endif
 
 #if defined(IRIX6)
 #   define RLIMIT_STRUCT_TAG rlimit64
@@ -403,13 +408,13 @@
       /* hard limit must be greater or equal to soft limit */
       if (rlp->rlim_max < rlp->rlim_cur)
          rlp->rlim_cur = rlp->rlim_max;
 
 #if defined(LINUX) || ( defined(SOLARIS) && !defined(SOLARIS64) ) || defined(NECSX4) || defined(NECSX5)
 #  define limit_fmt "%ld"
-#elif defined(IRIX6) || defined(HP11) || defined(HP10)
+#elif defined(IRIX6) || defined(HP11) || defined(HP10) || defined(FREEBSD)
 #  define limit_fmt "%lld"
 #elif defined(ALPHA) || defined(SOLARIS64)
 #  define limit_fmt "%lu"
 #else
 #  define limit_fmt "%d"
 #endif






Index: dist/util/arch
===================================================================
RCS file: /usr/local/tigris/data/helm/cvs/repository/gridengine/source/dist/util/arch,v
retrieving revision 1.7
diff -u -6 -r1.7 arch
--- dist/util/arch	2002/01/29 14:58:56	1.7
+++ dist/util/arch	2002/04/05 17:54:12
@@ -44,12 +44,32 @@
 #
 
 PATH=/bin:/usr/bin:/usr/sbin
 
 ARCH=UNKNOWN
 
+if [ -x /usr/bin/uname ]; then
+   os="`/usr/bin/uname -s`"
+   ht="`/usr/bin/uname -m`"
+   osht="$os,$ht"
+   case $osht in
+   Darwin,*)
+      ARCH=darwin
+      ;;
+   FreeBSD,*)
+      ARCH=freebsd 
+      ;;
+   OpenBSD,*)
+      ARCH=freebsd
+      ;;
+   NetBSD,*)
+      ARCH=freebsd
+      ;;
+   esac
+fi
+
 if [ -x /bin/uname ]; then
    os="`/bin/uname -s`"
    ht="`/bin/uname -m`"
    osht="$os,$ht"
    case $osht in
    SUPER-UX,SX-4*)






Index: libs/comm/commlib.c
===================================================================
RCS file: /usr/local/tigris/data/helm/cvs/repository/gridengine/source/libs/comm/commlib.c,v
retrieving revision 1.7
diff -u -6 -r1.7 commlib.c
--- libs/comm/commlib.c	2002/02/27 08:14:45	1.7
+++ libs/comm/commlib.c	2002/04/05 17:54:13
@@ -2063,12 +2063,14 @@
    sigdelset(&mask, SIGILL);
    sigdelset(&mask, SIGQUIT);
    sigdelset(&mask, SIGURG);
    sigdelset(&mask, SIGIO);
    sigdelset(&mask, SIGSEGV);
    sigdelset(&mask, SIGFPE);
+
+#define SIGCLD  SIGCHLD /* Same as SIGCHLD (System V).  */
    sigaddset(&mask, SIGCLD);
 
    sigprocmask(SIG_SETMASK, &mask, NULL);
    return omask;
 }
 #endif






Index: libs/rmon/rmon_semaph.c
===================================================================
RCS file: /usr/local/tigris/data/helm/cvs/repository/gridengine/source/libs/rmon/rmon_semaph.c,v
retrieving revision 1.2
diff -u -6 -r1.2 rmon_semaph.c
--- libs/rmon/rmon_semaph.c	2001/07/20 08:21:38	1.2
+++ libs/rmon/rmon_semaph.c	2002/04/05 17:54:13
@@ -53,13 +53,13 @@
 #include "msg_rmon.h"
 #define BIGCOUNT        10000   /* initial value of process counter */
 
 /*
  * Define the semaphore operation arrays for the semop() calls.
  */
-#if defined(bsd4_2) || defined(MACH) || defined(__hpux) || defined(_AIX) || defined(SOLARIS) || defined(SINIX) || (defined(LINUX) && defined(_SEM_SEMUN_UNDEFINED))
+#if defined(bsd4_2) || defined(MACH) || defined(__hpux) || defined(_AIX) || defined(SOLARIS) || defined(SINIX) || (defined(LINUX) && defined(_SEM_SEMUN_UNDEFINED)) 
 union semun {
    int val;                     /* value for SETVAL */
    struct semid_ds *buf;        /* buffer for IPC_STAT & IPC_SET */
    ushort *array;               /* array for GETALL & SETALL */
 };








 
Index: libs/sched/sort_hosts.c
===================================================================
RCS file: /usr/local/tigris/data/helm/cvs/repository/gridengine/source/libs/sched/sort_hosts.c,v
retrieving revision 1.6
diff -u -6 -r1.6 sort_hosts.c
--- libs/sched/sort_hosts.c	2001/12/17 15:09:38	1.6
+++ libs/sched/sort_hosts.c	2002/04/05 17:54:13
@@ -31,16 +31,12 @@
 /*___INFO__MARK_END__*/
 #include <sys/types.h>
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 
-#ifndef WIN32
-#   include <malloc.h>
-#endif
-
 #include "sgermon.h"
 #include "sge.h"
 #include "sge_gdi_intern.h"
 #include "cull.h"
 #include "sge_all_listsL.h"
 #include "sge_parse_num_par.h"







Index: libs/uti/sge_arch.c
===================================================================
RCS file: /usr/local/tigris/data/helm/cvs/repository/gridengine/source/libs/uti/sge_arch.c,v
retrieving revision 1.10
diff -u -6 -r1.10 sge_arch.c
--- libs/uti/sge_arch.c	2002/02/24 13:41:51	1.10
+++ libs/uti/sge_arch.c	2002/04/05 17:54:13
@@ -85,20 +85,22 @@
 #elif defined(ALINUX)
 #   define ARCHBIN "alinux"
 #elif defined(LINUX5)
 #   define ARCHBIN "linux"
 #elif defined(LINUX6)
 #   define ARCHBIN "glinux"
+#elif defined(FREEBSD)
+#   define ARCHBIN "freebsd"
 #elif defined(SLINUX)
 #   define ARCHBIN "slinux"
 #elif defined(CRAY)
 # if defined(CRAYTSIEEE)
 #   define ARCHBIN "craytsieee"
-# elif defined(CRAYTS)
+#elif defined(CRAYTS)
 #   define ARCHBIN "crayts"
-# else
+#else
 #   define ARCHBIN "cray"
 # endif
 #elif defined(NECSX4)
 #   define ARCHBIN "necsx4"
 #elif defined(NECSX5)
 #   define ARCHBIN "necsx5"   








Index: libs/uti/sge_getloadavg.c
===================================================================
RCS file: /usr/local/tigris/data/helm/cvs/repository/gridengine/source/libs/uti/sge_getloadavg.c,v
retrieving revision 1.6
diff -u -6 -r1.6 sge_getloadavg.c
--- libs/uti/sge_getloadavg.c	2002/02/24 13:41:54	1.6
+++ libs/uti/sge_getloadavg.c	2002/04/05 17:54:13
@@ -600,12 +600,56 @@
    }
 #endif
 
    DEXIT;
    return cpu_load;
 }
+
+#elif defined(FREEBSD)
+
+double get_cpu_load()
+{
+   return 0.0;
+}
+
 #elif defined(LINUX)
 
 static char* skip_token(
 char *p 
 ) {
    while (isspace(*p)) {
@@ -833,12 +877,38 @@
       loadavg[2] /= cpus;
       return 3;
    } else {
       return -1;
    }
 }
+#elif defined(FREEBSD)
+
+static int get_load_avg(
+double loadavg[],
+int nelem
+) {
+
+   return 0;
+ 
+}
 
 #elif defined(LINUX)
 
 static int get_load_avg(
 double loadv[],
 int nelem 
@@ -1075,13 +1145,13 @@
 int nelem 
 ) {
    int elem = 0;   
 
 #if defined(SOLARIS64)
    elem = getloadavg(loadavg, nelem); /* <== library function */
-#elif (defined(SOLARIS) && !defined(SOLARIS64)) || defined(ALPHA4) || defined(ALPHA5) || defined(IRIX6) || defined(HP10) || defined(HP11) || defined(CRAY) || defined(NECSX4) || defined(NECSX5) || defined(LINUX)
+#elif (defined(SOLARIS) && !defined(SOLARIS64)) || defined(ALPHA4) || defined(ALPHA5) || defined(IRIX6) || defined(HP10) || defined(HP11) || defined(CRAY) || defined(NECSX4) || defined(NECSX5) || defined(LINUX) ||defined(FREEBSD)
    elem = get_load_avg(loadavg, nelem); 
 #else
    elem = -1;    
 #endif
    if (elem != -1) {
       elem = nelem;  





Index: libs/uti/sge_getloadavg.h
===================================================================
RCS file: /usr/local/tigris/data/helm/cvs/repository/gridengine/source/libs/uti/sge_getloadavg.h,v
retrieving revision 1.3
diff -u -6 -r1.3 sge_getloadavg.h
--- libs/uti/sge_getloadavg.h	2001/10/20 14:47:28	1.3
+++ libs/uti/sge_getloadavg.h	2002/04/05 17:54:13
@@ -29,17 +29,17 @@
  * 
  *   All Rights Reserved.
  * 
  ************************************************************************/
 /*___INFO__MARK_END__*/
 
-#if defined(LINUX) || defined(SOLARIS) || defined(SOLARIS64) || defined(CRAY) || defined(NEXSX4) || defined(NECSX5) || defined(ALPHA4) || defined(ALPHA5) || defined(IRIX6)
-#  define SGE_LOADAVG
+#if defined(LINUX) || defined(SOLARIS) || defined(SOLARIS64) || defined(CRAY) || defined(NEXSX4) || defined(NECSX5) || defined(ALPHA4) || defined(ALPHA5) || defined(IRIX6) || defined(FREEBSD)
+#define SGE_LOADAVG 
 #endif
 
-#if defined(LINUX) || defined(SOLARIS) || defined(SOLARIS64) || defined(ALPHA4) || defined(ALPHA5) || defined(IRIX6) || defined(HP10) || defined(HP11)
+#if defined(LINUX) || defined(SOLARIS) || defined(SOLARIS64) || defined(ALPHA4) || defined(ALPHA5) || defined(IRIX6) || defined(HP10) || defined(HP11) || defined(FREEBSD)
 #  define SGE_LOADCPU
 #endif
 
 #ifdef SGE_LOADAVG
 
 int sge_getloadavg(double loadavg[], int nelem);





Index: scripts/distinst
===================================================================
RCS file: /usr/local/tigris/data/helm/cvs/repository/gridengine/source/scripts/distinst,v
retrieving revision 1.21
diff -u -6 -r1.21 distinst
--- scripts/distinst	2002/01/28 08:57:01	1.21
+++ scripts/distinst	2002/04/05 17:54:13
@@ -52,23 +52,23 @@
 
 HASDIR="ckpt doc examples/jobs locale mpi pvm qmon/PIXMAPS/big qmon/locale"
 HASARCHDIR="bin lib examples/jobsbin utilbin"
 
 DEFAULTPROG="sge_qmaster sge_execd sge_shadowd sge_commd sge_schedd \
              sge_shepherd sge_coshepherd qstat qsub qalter qconf qdel \
-             qacct qmod qsh commdcntl utilbin jobs qmon qhold qrls qhost \
-             qmake qtcsh"
+             qacct qmod qsh commdcntl utilbin jobs qhold qrls qhost \
+             "
 
 UTILITYBINARIES="uidgid gethostname gethostbyname gethostbyaddr \
                  getservbyname filestat checkprog loadcheck now checkuser \
                  adminrun qrsh_starter testsuidroot openssl"
 
 REMOTEBINARIES="rsh rshd rlogin"
 
 SUPPORTEDARCHS="aix42 aix43 alinux cray crayts craytsieee glinux hp10 \
-hp11 irix6 necsx4 necsx5 slinux solaris solaris64 solaris86 osf4 tru64"
+hp11 irix6 necsx4 necsx5 slinux solaris solaris64 solaris86 osf4 tru64 freebsd"
 
 #SGEEE_UTILITYBINARIES="sge_share_mon sge_host_mon"
 SGEEE_UTILITYBINARIES="sge_share_mon"
 
 JOBBINARIES="work"
 
@@ -161,12 +161,14 @@
    elif [ $i = hp11 ]; then
       ARCHBIN=HP11 
    elif [ $i = irix6 ]; then
       ARCHBIN=IRIX6
    elif  [ $i = glinux ]; then
       ARCHBIN=LINUX6
+   elif  [ $i = freebsd ]; then
+      ARCHBIN=FREEBSD
    elif  [ $i = alinux ]; then
       ARCHBIN=ALINUX
    elif  [ $i = slinux ]; then
       ARCHBIN=SLINUX
    elif [ $i = osf4 ]; then
       ARCHBIN=ALPHA4
@@ -655,143 +657,13 @@
    if [ $instexamples = true ]; then
       echo Installing \"examples/jobs\"
       Execute rm -f $DEST_SGE_ROOT/examples/jobs/*
       Execute cp dist/examples/jobs/*.sh $DEST_SGE_ROOT/examples/jobs
    fi
 
-   if [ $instqmon = true ]; then
-      echo Copying Pixmaps and Qmon resource file
-
-      Execute rm -f $DEST_SGE_ROOT/qmon/PIXMAPS/*.xpm
-      Execute rm -f $DEST_SGE_ROOT/qmon/PIXMAPS/big/*.xpm
-      Execute cp dist/qmon/PIXMAPS/small/*.xpm $DEST_SGE_ROOT/qmon/PIXMAPS
-      Execute cp dist/qmon/PIXMAPS/big/toolbar*.xpm $DEST_SGE_ROOT/qmon/PIXMAPS/big
-
-      Execute chmod 644 $DEST_SGE_ROOT/qmon/PIXMAPS/*.xpm
-      Execute chmod 644 $DEST_SGE_ROOT/qmon/PIXMAPS/big/*.xpm
-
-      Execute cp dist/qmon/Qmon $DEST_SGE_ROOT/qmon/Qmon
-      Execute chmod 644 $DEST_SGE_ROOT/qmon/Qmon
-   
-      Execute cp dist/qmon/qmon_help.ad $DEST_SGE_ROOT/qmon
-      Execute chmod 644 $DEST_SGE_ROOT/qmon/qmon_help.ad
-
-      ( echo changing to $DEST_SGE_ROOT/qmon/PIXMAPS ; \
-        cd $DEST_SGE_ROOT/qmon/PIXMAPS; \
-        echo ln -s intro-sge.xpm intro.xpm; \
-        ln -s intro-sge.xpm intro.xpm; \
-        echo ln -s logo-sge.xpm logo.xpm; \
-        ln -s logo-sge.xpm logo.xpm \
-      )
-   fi 
-
-   if [ $instpvm = true ]; then
-      echo Installing \"pvm\"
-      Execute rm -rf $DEST_SGE_ROOT/pvm/*
-      Execute mkdir $DEST_SGE_ROOT/pvm/src
-           
-      for f in $PVMSCRIPTS; do
-         Execute cp dist/pvm/$f $DEST_SGE_ROOT/pvm
-      done
-      chmod 755 $DEST_SGE_ROOT/pvm/*.sh
-
-      for f in $PVMSOURCES; do
-         Execute cp dist/pvm/src/$f $DEST_SGE_ROOT/pvm/src
-      done
-
-      for f in $PVMSRCSCRIPTS; do
-         Execute cp dist/pvm/src/$f $DEST_SGE_ROOT/pvm/src
-         chmod 755 $DEST_SGE_ROOT/pvm/src/$f
-      done
-   fi
-
-   if [ $instmpi = true ]; then
-      echo Installing \"mpi/\"
-      rm -rf $DEST_SGE_ROOT/mpi/*
-      for f in $MPIFILES; do
-         Execute cp dist/mpi/$f $DEST_SGE_ROOT/mpi
-      done
-      chmod 755 $DEST_SGE_ROOT/mpi/*.sh $DEST_SGE_ROOT/mpi/hostname $DEST_SGE_ROOT/mpi/rsh
-
-      HPCBASE=mpi/sunhpc/loose-integration
-      Execute mkdir -p $DEST_SGE_ROOT/$HPCBASE/accounting
-      
-      for f in $SUNHPC_FILES; do
-         Execute cp dist/$HPCBASE/$f $DEST_SGE_ROOT/$HPCBASE
-         Execute chmod 644 $DEST_SGE_ROOT/$HPCBASE/$f
-      done
-   
-      for f in $SUNHPC_SCRIPTS; do
-         Execute cp dist/$HPCBASE/$f $DEST_SGE_ROOT/$HPCBASE
-         Execute chmod 755 $DEST_SGE_ROOT/$HPCBASE/$f
-      done
-
-      for f in $SUNHPCACCT_FILES; do
-         Execute cp dist/$HPCBASE/accounting/$f $DEST_SGE_ROOT/$HPCBASE/accounting
-         Execute chmod 644 $DEST_SGE_ROOT/$HPCBASE/accounting/$f
-      done
-   
-      for f in $SUNHPCACCT_SCRIPTS; do
-         Execute cp dist/$HPCBASE/accounting/$f $DEST_SGE_ROOT/$HPCBASE/accounting
-          Execute chmod 755 $DEST_SGE_ROOT/$HPCBASE/accounting/$f
-      done
-   fi
-
-   if [ $instman = true ]; then
-      echo Installing \"man/\" and \"catman/\"
-      Execute rm -rf $DEST_SGE_ROOT/man $DEST_SGE_ROOT/catman
-      Execute cp -r MANSBUILD_$SGE_PRODUCT_MODE/SEDMAN/man $DEST_SGE_ROOT
-      Execute cp -r MANSBUILD_$SGE_PRODUCT_MODE/ASCMAN/catman $DEST_SGE_ROOT
-   fi
-
-   if [ $instdoc = true ]; then
-      echo Installing \"doc/\"
-      echo "   --> PS and PDF files"
-      Execute rm -rf $DEST_SGE_ROOT/doc
-      Execute mkdir $DEST_SGE_ROOT/doc
-      Execute cp $MANUALPDF $DEST_SGE_ROOT/doc/SGE53beta2_doc.pdf
-   fi
-
    # this rule must come *after* the "instdoc" rule
-   #
-   if [ $insttxtdoc = true ]; then
-      echo "Installing README, INSTALL ... files"
-      Execute cp ../doc/*.asc   $DEST_SGE_ROOT/doc
-      Execute cp ../doc/INSTALL $DEST_SGE_ROOT/doc
-      Execute cp ../doc/UPGRADE-2-53 $DEST_SGE_ROOT/doc/UPGRADE
-      Execute chmod 644 $DEST_SGE_ROOT/doc/*
-   fi
-
-   if [ $instckpt = true ]; then
-      echo Installing \"ckpt/\"
-      Execute rm -rf $DEST_SGE_ROOT/ckpt/*
-      cp dist/ckpt/* $DEST_SGE_ROOT/ckpt
-      chmod 755 $DEST_SGE_ROOT/ckpt/*_command
-   fi
-
-   if [ $instlocale = true ]; then
-      echo "Installing \"locale/\" and \"qmon/locale/\""
-      Execute cp -r locale/* $DEST_SGE_ROOT/locale
-      Execute rm -rf $DEST_SGE_ROOT/qmon/locale/*
-      Execute cp -r dist/qmon/locale/* $DEST_SGE_ROOT/qmon/locale
-   fi
-
-   if [ $instsec = true ]; then
-      echo Installing \"security\" modules
-      Execute mkdir -p $DEST_SGE_ROOT/security
-      for f in $SECFILES; do
-         Execute cp $f $DEST_SGE_ROOT/security
-         fb=`basename $f`
-         if [ -x $DEST_SGE_ROOT/security/$fb ]; then
-            chmod 755 $DEST_SGE_ROOT/security/$fb
-         else
-            chmod 644 $DEST_SGE_ROOT/security/$fb
-         fi
-      done
-      Execute ln -s gss_customer.html $DEST_SGE_ROOT/security/README.html
-   fi      
 
    # Set file and directory permissions to 755/644 and owner to 0.0
    if [ $setfileperm = true ]; then
       echo Setting file permissions
       SetFilePerm $DEST_SGE_ROOT
    fi
@@ -820,13 +692,13 @@
    echo "Installing binaries for $i from `pwd` -->"
    echo "                          --> $DEST_SGE_ROOT/bin/$i"
    echo ------------------------------------------------------------------------
 
    for prog in $PROG; do
       case $prog in
-         jobs|ckpt|locale|doc|inst_sge|utiltree|examples|man|mpi|pvm|qmontree|common|distcommon|utilbin)
+         jobs|ckpt|locale|doc|inst_sge|utiltree|examples|man|mpi|pvm|common|distcommon|utilbin)
             : 
             ;;
          qmake)
              echo Installing qmake
              Install 0.0 755 ../3rdparty/qmake/$ARCHBIN/make $DEST_SGE_ROOT/${UTILPREFIX}/$DSTARCH/qmake
             ;;
-------------- next part --------------
> qstat

> qhost
HOSTNAME             ARCH       NPROC LOAD  MEMTOT   MEMUSE   SWAPTO   SWAPUS
--------------------------------------------------------------------------------
global               -          -     -     -        -        -        -
host1                freebsd    1     0.00  -        -        -        -

> cat s
#!/bin/sh
sleep 10
echo "Hello"
exit 2

> qsub s
your job 11 ("s") has been submitted

> qstat
job-ID  prior name       user         state submit/start at     queue      master  ja-task-ID
---------------------------------------------------------------------------------------------
     11     0 s          ron          qw    04/05/2002 12:04:07


> cat s.o11
Hello

> qacct -j 11
==============================================================
qname        host1.q
hostname     host1
group        UNKNOWN
owner        ron
jobname      s
jobnumber    11
taskid       undefined
account      sge
priority     0
qsub_time    Fri Apr  5 12:04:07 2002
start_time   Fri Apr  5 12:04:10 2002
end_time     Fri Apr  5 12:04:20 2002
granted_pe   none
slots        1
failed       0
exit_status  2
ru_wallclock 10
ru_utime     0
ru_stime     0
ru_maxrss    916
ru_ixrss     808
ru_ismrss    0
ru_idrss     488
ru_isrss     256
ru_minflt    361
ru_majflt    0
ru_nswap     0
ru_inblock   0
ru_oublock   1
ru_msgsnd    17
ru_msgrcv    17
ru_nsignals  5
ru_nvcsw     29
ru_nivcsw    5
cpu          0
mem          0.000
io           0.000
iow          0.000
maxvmem      0.000000



More information about the Beowulf mailing list