IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11084


Ignore:
Timestamp:
Jan 12, 2007, 4:26:31 PM (19 years ago)
Author:
eugene
Message:

added module system; added panstarrs user features; panstarrs threaded

Location:
trunk/Ohana/src/opihi
Files:
11 added
33 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/Makefile.Common

    r10342 r11084  
    33# .SUFFIXES: .$(ARCH).o
    44
    5 CFLAGS  =       -I$(INC) -I$(DESTINC) $(INCDIRS) -DHELPDIR_DEFAULT=$(HELP)
     5CFLAGS  =       -I$(INC) -I$(DESTINC) $(INCDIRS) -DDATADIR_DEFAULT=$(DATA)
    66
    77$(BIN)/%.$(ARCH):
     
    3737
    3838%.help:
    39         @if [ ! -d $(HELP) ]; then mkdir -p $(HELP); fi
    40         rm -f $(HOME)/$*/help/*~
    41         rm -f $(HOME)/$*/help/#*
    42         for i in `find $(HOME)/$*/help -maxdepth 1 -type f`; do cp -f $$i $(HELP); done
     39        @echo "installing help files for $*"
     40        @if [ ! -d $(DATA)/help ]; then mkdir -p $(DATA)/help; fi
     41        @rm -f $(HOME)/$*/help/*~
     42        @rm -f $(HOME)/$*/help/#*
     43        @for i in `find $(HOME)/$*/help -maxdepth 1 -type f`; do cp -f $$i $(DATA)/help; done
     44
     45%.modules:
     46        @echo "installing modules for $*"
     47        @if [ ! -d $(DATA)/modules ]; then mkdir -p $(DATA)/modules; fi
     48        @if [ ! -d $(HOME)/modules/$* ]; then echo "no modules for $*"; fi
     49        @if [   -d $(HOME)/modules/$* ]; then rm -f $(HOME)/modules/$*/*~; fi
     50        @if [   -d $(HOME)/modules/$* ]; then rm -f $(HOME)/modules/$*/#*; fi
     51        @if [   -d $(HOME)/modules/$* ]; then for i in `find $(HOME)/modules/$* -name CVS -prune -o -type f`; do cp -f $$i $(DATA)/modules; done; fi
     52
    4353%.clean:
    4454        rm -f $(BIN)/$*.$(ARCH)
     
    6070
    6171clean-help:
    62         @if [ ! -d $(HELP) ]; then mkdir -p $(HELP); fi
    63         rm -f $(HELP)/*
     72        @if [ ! -d $(DATA)/help ]; then mkdir -p $(DATA)/help; fi
     73        rm -f $(DATA)/help/*
  • trunk/Ohana/src/opihi/cmd.astro/Makefile

    r10342 r11084  
    55LIB     =       $(HOME)/lib
    66INC     =       $(HOME)/include
    7 SDIR    =       $(HOME)/cmd.astro
     7SRC     =       $(HOME)/cmd.astro
    88
    99# astro user commands ########################
    1010
    1111srcs = \
    12 $(SDIR)/init.$(ARCH).o             \
    13 $(SDIR)/biassub.$(ARCH).o          \
    14 $(SDIR)/cgrid.$(ARCH).o            \
    15 $(SDIR)/coords.$(ARCH).o           \
    16 $(SDIR)/cplot.$(ARCH).o            \
    17 $(SDIR)/csystem.$(ARCH).o          \
    18 $(SDIR)/ctimes.$(ARCH).o           \
    19 $(SDIR)/cval.$(ARCH).o             \
    20 $(SDIR)/czplot.$(ARCH).o           \
    21 $(SDIR)/drizzle.$(ARCH).o          \
    22 $(SDIR)/flux.$(ARCH).o             \
    23 $(SDIR)/fixwrap.$(ARCH).o          \
    24 $(SDIR)/gauss.$(ARCH).o            \
    25 $(SDIR)/getvel.$(ARCH).o           \
    26 $(SDIR)/getlst.$(ARCH).o           \
    27 $(SDIR)/medianmap.$(ARCH).o        \
    28 $(SDIR)/mkgauss.$(ARCH).o          \
    29 $(SDIR)/multifit.$(ARCH).o         \
    30 $(SDIR)/objload.$(ARCH).o          \
    31 $(SDIR)/outline2.$(ARCH).o         \
    32 $(SDIR)/outline.$(ARCH).o          \
    33 $(SDIR)/polar.$(ARCH).o            \
    34 $(SDIR)/precess.$(ARCH).o          \
    35 $(SDIR)/profile.$(ARCH).o          \
    36 $(SDIR)/region.$(ARCH).o           \
    37 $(SDIR)/rotcurve.$(ARCH).o         \
    38 $(SDIR)/scale.$(ARCH).o            \
    39 $(SDIR)/sexigesimal.$(ARCH).o      \
    40 $(SDIR)/spec.$(ARCH).o             \
    41 $(SDIR)/star.$(ARCH).o             \
    42 $(SDIR)/transform.$(ARCH).o        \
    43 $(SDIR)/imsub.$(ARCH).o            \
    44 $(SDIR)/imfit.$(ARCH).o            \
    45 $(SDIR)/imfit-fgauss.$(ARCH).o     \
    46 $(SDIR)/imfit-pgauss.$(ARCH).o     \
    47 $(SDIR)/imfit-Pgauss.$(ARCH).o     \
    48 $(SDIR)/imfit-qgauss.$(ARCH).o     \
    49 $(SDIR)/imfit-Qgauss.$(ARCH).o     \
    50 $(SDIR)/imfit-sgauss.$(ARCH).o     \
    51 $(SDIR)/imfit-Sgauss.$(ARCH).o     \
    52 $(SDIR)/imfit-qfgauss.$(ARCH).o    \
    53 $(SDIR)/imfit-qrgauss.$(ARCH).o   
     12$(SRC)/init.$(ARCH).o             \
     13$(SRC)/biassub.$(ARCH).o           \
     14$(SRC)/cgrid.$(ARCH).o             \
     15$(SRC)/coords.$(ARCH).o    \
     16$(SRC)/cplot.$(ARCH).o             \
     17$(SRC)/csystem.$(ARCH).o           \
     18$(SRC)/ctimes.$(ARCH).o    \
     19$(SRC)/cval.$(ARCH).o              \
     20$(SRC)/czplot.$(ARCH).o    \
     21$(SRC)/drizzle.$(ARCH).o           \
     22$(SRC)/flux.$(ARCH).o              \
     23$(SRC)/fixwrap.$(ARCH).o           \
     24$(SRC)/gauss.$(ARCH).o             \
     25$(SRC)/getvel.$(ARCH).o    \
     26$(SRC)/getlst.$(ARCH).o    \
     27$(SRC)/medianmap.$(ARCH).o         \
     28$(SRC)/mkgauss.$(ARCH).o           \
     29$(SRC)/multifit.$(ARCH).o          \
     30$(SRC)/objload.$(ARCH).o           \
     31$(SRC)/outline2.$(ARCH).o          \
     32$(SRC)/outline.$(ARCH).o           \
     33$(SRC)/polar.$(ARCH).o             \
     34$(SRC)/precess.$(ARCH).o           \
     35$(SRC)/profile.$(ARCH).o           \
     36$(SRC)/region.$(ARCH).o    \
     37$(SRC)/rotcurve.$(ARCH).o          \
     38$(SRC)/scale.$(ARCH).o             \
     39$(SRC)/sexigesimal.$(ARCH).o       \
     40$(SRC)/spec.$(ARCH).o              \
     41$(SRC)/star.$(ARCH).o              \
     42$(SRC)/transform.$(ARCH).o        \
     43$(SRC)/imsub.$(ARCH).o             \
     44$(SRC)/imfit.$(ARCH).o             \
     45$(SRC)/imfit-fgauss.$(ARCH).o      \
     46$(SRC)/imfit-pgauss.$(ARCH).o      \
     47$(SRC)/imfit-Pgauss.$(ARCH).o      \
     48$(SRC)/imfit-qgauss.$(ARCH).o      \
     49$(SRC)/imfit-Qgauss.$(ARCH).o      \
     50$(SRC)/imfit-sgauss.$(ARCH).o      \
     51$(SRC)/imfit-Sgauss.$(ARCH).o      \
     52$(SRC)/imfit-qfgauss.$(ARCH).o     \
     53$(SRC)/imfit-qrgauss.$(ARCH).o     
    5454
    5555# dependancy rules for include files ########################
  • trunk/Ohana/src/opihi/cmd.basic/Makefile

    r10342 r11084  
    22
    33HOME    =       $(ROOT)/src/opihi
     4SRC     =       $(HOME)/cmd.basic
    45BIN     =       $(HOME)/bin
    56LIB     =       $(HOME)/lib
    67INC     =       $(HOME)/include
    7 SDIR    =       $(HOME)/cmd.basic
    88
    99# basic user commands ########################
    1010
    1111srcs = \
    12 $(SDIR)/init.$(ARCH).o       \
    13 $(SDIR)/break.$(ARCH).o      \
    14 $(SDIR)/cd.$(ARCH).o         \
    15 $(SDIR)/config.$(ARCH).o     \
    16 $(SDIR)/continue.$(ARCH).o   \
    17 $(SDIR)/date.$(ARCH).o       \
    18 $(SDIR)/echo.$(ARCH).o       \
    19 $(SDIR)/file.$(ARCH).o       \
    20 $(SDIR)/getchr.$(ARCH).o     \
    21 $(SDIR)/help.$(ARCH).o       \
    22 $(SDIR)/input.$(ARCH).o      \
    23 $(SDIR)/list.$(ARCH).o       \
    24 $(SDIR)/list_help.$(ARCH).o  \
    25 $(SDIR)/list_vars.$(ARCH).o  \
    26 $(SDIR)/local.$(ARCH).o      \
    27 $(SDIR)/macro.$(ARCH).o      \
    28 $(SDIR)/memory.$(ARCH).o     \
    29 $(SDIR)/output.$(ARCH).o     \
    30 $(SDIR)/quit.$(ARCH).o       \
    31 $(SDIR)/run_for.$(ARCH).o    \
    32 $(SDIR)/run_if.$(ARCH).o     \
    33 $(SDIR)/run_while.$(ARCH).o  \
    34 $(SDIR)/scan.$(ARCH).o       \
    35 $(SDIR)/shell.$(ARCH).o      \
    36 $(SDIR)/sprintf.$(ARCH).o    \
    37 $(SDIR)/fprintf.$(ARCH).o    \
    38 $(SDIR)/strlen.$(ARCH).o     \
    39 $(SDIR)/substr.$(ARCH).o     \
    40 $(SDIR)/strpop.$(ARCH).o     \
    41 $(SDIR)/usleep.$(ARCH).o     \
    42 $(SDIR)/sleep.$(ARCH).o      \
    43 $(SDIR)/wait.$(ARCH).o       \
    44 $(SDIR)/which.$(ARCH).o
     12$(SRC)/init.$(ARCH).o       \
     13$(SRC)/break.$(ARCH).o       \
     14$(SRC)/cd.$(ARCH).o          \
     15$(SRC)/config.$(ARCH).o     \
     16$(SRC)/continue.$(ARCH).o   \
     17$(SRC)/date.$(ARCH).o        \
     18$(SRC)/echo.$(ARCH).o        \
     19$(SRC)/file.$(ARCH).o        \
     20$(SRC)/getchr.$(ARCH).o     \
     21$(SRC)/help.$(ARCH).o        \
     22$(SRC)/input.$(ARCH).o       \
     23$(SRC)/list.$(ARCH).o        \
     24$(SRC)/list_help.$(ARCH).o  \
     25$(SRC)/list_vars.$(ARCH).o  \
     26$(SRC)/local.$(ARCH).o       \
     27$(SRC)/macro.$(ARCH).o       \
     28$(SRC)/memory.$(ARCH).o     \
     29$(SRC)/module.$(ARCH).o     \
     30$(SRC)/output.$(ARCH).o     \
     31$(SRC)/quit.$(ARCH).o        \
     32$(SRC)/run_for.$(ARCH).o    \
     33$(SRC)/run_if.$(ARCH).o     \
     34$(SRC)/run_while.$(ARCH).o  \
     35$(SRC)/scan.$(ARCH).o        \
     36$(SRC)/shell.$(ARCH).o       \
     37$(SRC)/sprintf.$(ARCH).o    \
     38$(SRC)/fprintf.$(ARCH).o    \
     39$(SRC)/strlen.$(ARCH).o     \
     40$(SRC)/substr.$(ARCH).o     \
     41$(SRC)/strpop.$(ARCH).o     \
     42$(SRC)/usleep.$(ARCH).o     \
     43$(SRC)/sleep.$(ARCH).o       \
     44$(SRC)/wait.$(ARCH).o        \
     45$(SRC)/which.$(ARCH).o
    4546
    4647# dependancy rules for include files ########################
  • trunk/Ohana/src/opihi/cmd.basic/help.c

    r7917 r11084  
    33int help (int argc, char **argv) {
    44
     5  int Nbytes;
    56  FILE *f;
    6   char *helpdir, file[1024], buff[512];
     7  char *helpdir, *file, buff[512];
    78
    89  helpdir = get_variable ("HELPDIR");
     
    1819  }
    1920
    20   sprintf (file, "%s/%s", helpdir, argv[1]);
     21  Nbytes = strlen(helpdir) + strlen(argv[1]) + 2;
     22  ALLOCATE (file, char, Nbytes);
     23  snprintf (file, Nbytes, "%s/%s", helpdir, argv[1]);
    2124
    2225  f = fopen (file, "r");
     26  free (file);
     27
    2328  if (f == NULL) {
    2429    gprint (GP_ERR, "No help for: %s\n", argv[1]);
  • trunk/Ohana/src/opihi/cmd.basic/init.c

    r10846 r11084  
    2020int macro           PROTO((int, char **));
    2121int memory          PROTO((int, char **));
     22int module          PROTO((int, char **));
    2223int output          PROTO((int, char **));
    2324int pwd             PROTO((int, char **));
     
    5960  {"macro",         macro,              "deal with the macros *"},
    6061  {"memory",        memory,             "long listing of the allocated memory"},
     62  {"module",        module,             "load script file from the modules directories"},
    6163  {"output",        output,             "redirect output to file"},
    6264  {"pwd",           pwd,                "print current working directory"},
  • trunk/Ohana/src/opihi/cmd.basic/run_for.c

    r10846 r11084  
    55int run_for (int argc, char **argv) {
    66
    7   int ThisList, depth, i, done, status, NLINES, j;
     7  int ThisList, depth, i, done, status, found, NLINES, j;
    88  double start, end, delta;
    99  char *input;
     
    8686      set_variable (argv[1], value);
    8787    status = exec_loop (&loop);
    88     value = get_double_variable (argv[1]);
     88    value = get_double_variable (argv[1], &found);
    8989    if (loop_next) continue;
    9090    if (loop_last) break;
  • trunk/Ohana/src/opihi/cmd.data/Makefile

    r10997 r11084  
    22
    33HOME    =       $(ROOT)/src/opihi
     4SRC     =       $(HOME)/cmd.data
    45BIN     =       $(HOME)/bin
    56LIB     =       $(HOME)/lib
    67INC     =       $(HOME)/include
    7 SDIR    =       $(HOME)/cmd.data
     8DATA    =       $(DESTDATA)/mana
    89
    910# data user commands ########################
    1011srcs = \
    11 $(SDIR)/init.$(ARCH).o          \
    12 $(SDIR)/accum.$(ARCH).o         \
    13 $(SDIR)/applyfit2d.$(ARCH).o    \
    14 $(SDIR)/applyfit.$(ARCH).o      \
    15 $(SDIR)/box.$(ARCH).o           \
    16 $(SDIR)/book.$(ARCH).o          \
    17 $(SDIR)/book_commands.$(ARCH).o \
    18 $(SDIR)/center.$(ARCH).o        \
    19 $(SDIR)/clear.$(ARCH).o         \
    20 $(SDIR)/clip.$(ARCH).o          \
    21 $(SDIR)/close.$(ARCH).o         \
    22 $(SDIR)/concat.$(ARCH).o        \
    23 $(SDIR)/contour.$(ARCH).o       \
    24 $(SDIR)/create.$(ARCH).o        \
    25 $(SDIR)/cumulative.$(ARCH).o    \
    26 $(SDIR)/cursor.$(ARCH).o        \
    27 $(SDIR)/cut.$(ARCH).o           \
    28 $(SDIR)/delete.$(ARCH).o        \
    29 $(SDIR)/device.$(ARCH).o        \
    30 $(SDIR)/dimendown.$(ARCH).o     \
    31 $(SDIR)/dimenup.$(ARCH).o       \
    32 $(SDIR)/erase.$(ARCH).o         \
    33 $(SDIR)/extract.$(ARCH).o       \
    34 $(SDIR)/fft1d.$(ARCH).o         \
    35 $(SDIR)/fft2d.$(ARCH).o         \
    36 $(SDIR)/fit2d.$(ARCH).o         \
    37 $(SDIR)/fit.$(ARCH).o           \
    38 $(SDIR)/gaussj.$(ARCH).o        \
    39 $(SDIR)/gaussdeviate.$(ARCH).o  \
    40 $(SDIR)/grid.$(ARCH).o          \
    41 $(SDIR)/gridify.$(ARCH).o       \
    42 $(SDIR)/ungridify.$(ARCH).o     \
    43 $(SDIR)/histogram.$(ARCH).o     \
    44 $(SDIR)/imcut.$(ARCH).o         \
    45 $(SDIR)/imhist.$(ARCH).o        \
    46 $(SDIR)/imsmooth.$(ARCH).o      \
    47 $(SDIR)/integrate.$(ARCH).o     \
    48 $(SDIR)/interpolate.$(ARCH).o   \
    49 $(SDIR)/jpeg.$(ARCH).o          \
    50 $(SDIR)/kern.$(ARCH).o          \
    51 $(SDIR)/keyword.$(ARCH).o       \
    52 $(SDIR)/labels.$(ARCH).o        \
    53 $(SDIR)/limits.$(ARCH).o        \
    54 $(SDIR)/line.$(ARCH).o          \
    55 $(SDIR)/list_buffers.$(ARCH).o  \
    56 $(SDIR)/list_header.$(ARCH).o   \
    57 $(SDIR)/list_vectors.$(ARCH).o  \
    58 $(SDIR)/load.$(ARCH).o          \
    59 $(SDIR)/lookup.$(ARCH).o        \
    60 $(SDIR)/mkrgb.$(ARCH).o \
    61 $(SDIR)/mcreate.$(ARCH).o       \
    62 $(SDIR)/medacc.$(ARCH).o        \
    63 $(SDIR)/mget.$(ARCH).o          \
    64 $(SDIR)/minterpolate.$(ARCH).o  \
    65 $(SDIR)/mset.$(ARCH).o          \
    66 $(SDIR)/peak.$(ARCH).o          \
    67 $(SDIR)/periodogram.$(ARCH).o   \
    68 $(SDIR)/plot.$(ARCH).o          \
    69 $(SDIR)/dot.$(ARCH).o           \
    70 $(SDIR)/point.$(ARCH).o         \
    71 $(SDIR)/ps.$(ARCH).o            \
    72 $(SDIR)/queuedelete.$(ARCH).o   \
    73 $(SDIR)/queuedrop.$(ARCH).o     \
    74 $(SDIR)/queuelist.$(ARCH).o     \
    75 $(SDIR)/queueload.$(ARCH).o     \
    76 $(SDIR)/queuesize.$(ARCH).o     \
    77 $(SDIR)/queuepush.$(ARCH).o     \
    78 $(SDIR)/queuepop.$(ARCH).o      \
    79 $(SDIR)/queueprint.$(ARCH).o    \
    80 $(SDIR)/queueinit.$(ARCH).o     \
    81 $(SDIR)/radial.$(ARCH).o        \
    82 $(SDIR)/rd.$(ARCH).o            \
    83 $(SDIR)/rdseg.$(ARCH).o         \
    84 $(SDIR)/read_vectors.$(ARCH).o  \
    85 $(SDIR)/rebin.$(ARCH).o         \
    86 $(SDIR)/resize.$(ARCH).o        \
    87 $(SDIR)/roll.$(ARCH).o          \
    88 $(SDIR)/rotate.$(ARCH).o        \
    89 $(SDIR)/save.$(ARCH).o          \
    90 $(SDIR)/section.$(ARCH).o       \
    91 $(SDIR)/select.$(ARCH).o        \
    92 $(SDIR)/set.$(ARCH).o           \
    93 $(SDIR)/shift.$(ARCH).o         \
    94 $(SDIR)/sort.$(ARCH).o          \
    95 $(SDIR)/spline_apply.$(ARCH).o  \
    96 $(SDIR)/spline_construct.$(ARCH).o \
    97 $(SDIR)/stats.$(ARCH).o            \
    98 $(SDIR)/style.$(ARCH).o            \
    99 $(SDIR)/subraster.$(ARCH).o        \
    100 $(SDIR)/subset.$(ARCH).o           \
    101 $(SDIR)/svd.$(ARCH).o              \
    102 $(SDIR)/swapbytes.$(ARCH).o        \
    103 $(SDIR)/textline.$(ARCH).o         \
    104 $(SDIR)/tv.$(ARCH).o               \
    105 $(SDIR)/tvcontour.$(ARCH).o        \
    106 $(SDIR)/tvgrid.$(ARCH).o           \
    107 $(SDIR)/uniq.$(ARCH).o             \
    108 $(SDIR)/unsign.$(ARCH).o           \
    109 $(SDIR)/vbin.$(ARCH).o             \
    110 $(SDIR)/vclip.$(ARCH).o            \
    111 $(SDIR)/vgauss.$(ARCH).o           \
    112 $(SDIR)/vmaxwell.$(ARCH).o           \
    113 $(SDIR)/vgrid.$(ARCH).o            \
    114 $(SDIR)/vload.$(ARCH).o            \
    115 $(SDIR)/vpop.$(ARCH).o             \
    116 $(SDIR)/vroll.$(ARCH).o            \
    117 $(SDIR)/vsmooth.$(ARCH).o       \
    118 $(SDIR)/vstat.$(ARCH).o            \
    119 $(SDIR)/wd.$(ARCH).o               \
    120 $(SDIR)/write_vectors.$(ARCH).o    \
    121 $(SDIR)/zap.$(ARCH).o              \
    122 $(SDIR)/zplot.$(ARCH).o
     12$(SRC)/init.$(ARCH).o          \
     13$(SRC)/accum.$(ARCH).o          \
     14$(SRC)/applyfit2d.$(ARCH).o     \
     15$(SRC)/applyfit.$(ARCH).o       \
     16$(SRC)/box.$(ARCH).o            \
     17$(SRC)/book.$(ARCH).o           \
     18$(SRC)/book_commands.$(ARCH).o  \
     19$(SRC)/center.$(ARCH).o \
     20$(SRC)/clear.$(ARCH).o          \
     21$(SRC)/clip.$(ARCH).o           \
     22$(SRC)/close.$(ARCH).o          \
     23$(SRC)/concat.$(ARCH).o \
     24$(SRC)/contour.$(ARCH).o        \
     25$(SRC)/create.$(ARCH).o \
     26$(SRC)/cumulative.$(ARCH).o     \
     27$(SRC)/cursor.$(ARCH).o \
     28$(SRC)/cut.$(ARCH).o            \
     29$(SRC)/delete.$(ARCH).o \
     30$(SRC)/device.$(ARCH).o \
     31$(SRC)/dimendown.$(ARCH).o      \
     32$(SRC)/dimenup.$(ARCH).o        \
     33$(SRC)/erase.$(ARCH).o          \
     34$(SRC)/extract.$(ARCH).o        \
     35$(SRC)/fft1d.$(ARCH).o          \
     36$(SRC)/fft2d.$(ARCH).o          \
     37$(SRC)/fit2d.$(ARCH).o          \
     38$(SRC)/fit.$(ARCH).o            \
     39$(SRC)/gaussj.$(ARCH).o \
     40$(SRC)/gaussdeviate.$(ARCH).o   \
     41$(SRC)/grid.$(ARCH).o           \
     42$(SRC)/gridify.$(ARCH).o       \
     43$(SRC)/ungridify.$(ARCH).o     \
     44$(SRC)/histogram.$(ARCH).o      \
     45$(SRC)/imcut.$(ARCH).o          \
     46$(SRC)/imhist.$(ARCH).o \
     47$(SRC)/imsmooth.$(ARCH).o       \
     48$(SRC)/integrate.$(ARCH).o      \
     49$(SRC)/interpolate.$(ARCH).o    \
     50$(SRC)/jpeg.$(ARCH).o           \
     51$(SRC)/kern.$(ARCH).o           \
     52$(SRC)/keyword.$(ARCH).o        \
     53$(SRC)/labels.$(ARCH).o \
     54$(SRC)/limits.$(ARCH).o \
     55$(SRC)/line.$(ARCH).o           \
     56$(SRC)/list_buffers.$(ARCH).o   \
     57$(SRC)/list_header.$(ARCH).o    \
     58$(SRC)/list_vectors.$(ARCH).o   \
     59$(SRC)/load.$(ARCH).o           \
     60$(SRC)/lookup.$(ARCH).o \
     61$(SRC)/mkrgb.$(ARCH).o  \
     62$(SRC)/mcreate.$(ARCH).o        \
     63$(SRC)/medacc.$(ARCH).o \
     64$(SRC)/mget.$(ARCH).o           \
     65$(SRC)/minterpolate.$(ARCH).o   \
     66$(SRC)/mset.$(ARCH).o           \
     67$(SRC)/peak.$(ARCH).o           \
     68$(SRC)/periodogram.$(ARCH).o    \
     69$(SRC)/plot.$(ARCH).o           \
     70$(SRC)/dot.$(ARCH).o            \
     71$(SRC)/point.$(ARCH).o          \
     72$(SRC)/ps.$(ARCH).o             \
     73$(SRC)/queuedelete.$(ARCH).o    \
     74$(SRC)/queuedrop.$(ARCH).o      \
     75$(SRC)/queuelist.$(ARCH).o      \
     76$(SRC)/queueload.$(ARCH).o      \
     77$(SRC)/queuesize.$(ARCH).o      \
     78$(SRC)/queuepush.$(ARCH).o      \
     79$(SRC)/queuepop.$(ARCH).o       \
     80$(SRC)/queueprint.$(ARCH).o     \
     81$(SRC)/queueinit.$(ARCH).o      \
     82$(SRC)/radial.$(ARCH).o \
     83$(SRC)/rd.$(ARCH).o             \
     84$(SRC)/rdseg.$(ARCH).o          \
     85$(SRC)/read_vectors.$(ARCH).o   \
     86$(SRC)/rebin.$(ARCH).o          \
     87$(SRC)/resize.$(ARCH).o \
     88$(SRC)/roll.$(ARCH).o           \
     89$(SRC)/rotate.$(ARCH).o \
     90$(SRC)/save.$(ARCH).o           \
     91$(SRC)/section.$(ARCH).o        \
     92$(SRC)/select.$(ARCH).o \
     93$(SRC)/set.$(ARCH).o            \
     94$(SRC)/shift.$(ARCH).o          \
     95$(SRC)/sort.$(ARCH).o           \
     96$(SRC)/spline_apply.$(ARCH).o   \
     97$(SRC)/spline_construct.$(ARCH).o \
     98$(SRC)/stats.$(ARCH).o             \
     99$(SRC)/style.$(ARCH).o             \
     100$(SRC)/subraster.$(ARCH).o         \
     101$(SRC)/subset.$(ARCH).o    \
     102$(SRC)/svd.$(ARCH).o               \
     103$(SRC)/swapbytes.$(ARCH).o         \
     104$(SRC)/textline.$(ARCH).o          \
     105$(SRC)/tv.$(ARCH).o                \
     106$(SRC)/tvcontour.$(ARCH).o         \
     107$(SRC)/tvgrid.$(ARCH).o    \
     108$(SRC)/uniq.$(ARCH).o              \
     109$(SRC)/unsign.$(ARCH).o    \
     110$(SRC)/vbin.$(ARCH).o              \
     111$(SRC)/vclip.$(ARCH).o             \
     112$(SRC)/vgauss.$(ARCH).o           \
     113$(SRC)/vmaxwell.$(ARCH).o           \
     114$(SRC)/vgrid.$(ARCH).o             \
     115$(SRC)/vload.$(ARCH).o             \
     116$(SRC)/vpop.$(ARCH).o              \
     117$(SRC)/vroll.$(ARCH).o             \
     118$(SRC)/vsmooth.$(ARCH).o        \
     119$(SRC)/vstat.$(ARCH).o             \
     120$(SRC)/wd.$(ARCH).o                \
     121$(SRC)/write_vectors.$(ARCH).o     \
     122$(SRC)/zap.$(ARCH).o               \
     123$(SRC)/zplot.$(ARCH).o
    123124
    124125# dependancy rules for include files ########################
  • trunk/Ohana/src/opihi/dimm/Makefile

    r11054 r11084  
    77INC     =       $(HOME)/include
    88SRC     =       $(HOME)/dimm
    9 HELP    =       $(DESTHELP)/dimm
     9DATA    =       $(DESTDATA)/dimm
    1010
    1111# link flags
     
    4242$(BIN)/dimm.$(ARCH)   : $(funcs) $(cmds)
    4343
    44 install: $(DESTBIN)/dimm help
     44install: $(DESTBIN)/dimm help modules
    4545
    4646help: cmd.basic.help cmd.data.help cmd.astro.help dimm.help
     47
     48modules: dimm.modules
    4749
    4850# SBIG install functions
  • trunk/Ohana/src/opihi/dimm/dimm.c

    r7917 r11084  
    2525  set_str_variable ("RCFILE", opihi_rcfile);
    2626
    27 # ifdef HELPDIR_DEFAULT
    28   set_str_variable ("HELPDIR", MACRO_NAME(HELPDIR_DEFAULT));
     27# ifdef DATADIR_DEFAULT
     28  {
     29    char *datadir;
     30    char *helpdir;
     31    char *modules;
     32    datadir = MACRO_NAME(DATADIR_DEFAULT);
     33    /* set_str_variable ("DATADIR", datadir); */
     34    ALLOCATE (helpdir, char, strlen(datadir) + strlen("/help") + 2);
     35    sprintf (helpdir, "%s/help", datadir);
     36    set_str_variable ("HELPDIR", helpdir);
     37    free (helpdir);
     38    ALLOCATE (modules, char, strlen(datadir) + strlen("/modules") + 2);
     39    sprintf (modules, "%s/modules", datadir);
     40    set_str_variable ("MODULES:0", modules);
     41    set_int_variable ("MODULES:n", 1);
     42    free (helpdir);
     43  }
    2944# endif
    3045
  • trunk/Ohana/src/opihi/dvo/Makefile

    r11054 r11084  
    66LIB     =       $(HOME)/lib
    77INC     =       $(HOME)/include
    8 SRC    =       $(HOME)/dvo
    9 HELP    =       $(DESTHELP)/dvo
     8SRC     =       $(HOME)/dvo
     9DATA    =       $(DESTDATA)/dvo
    1010
    1111# link flags
     
    8888$(BIN)/dvo.$(ARCH)   : $(funcs) $(cmds)
    8989
    90 install: $(DESTBIN)/dvo help
     90install: $(DESTBIN)/dvo help modules
    9191
    9292help: clean-help cmd.basic.help cmd.data.help cmd.astro.help dvo.help
    9393
    9494$(funcs) $(cmds) $(libs) : $(INC)/dvoshell.h
     95
     96modules: dvo.modules
    9597
    9698.PHONY: dvo
  • trunk/Ohana/src/opihi/dvo/dvo.c

    r9473 r11084  
    2929  set_str_variable ("RCFILE", opihi_rcfile);
    3030
    31 # ifdef HELPDIR_DEFAULT
    32   set_str_variable ("HELPDIR", MACRO_NAME(HELPDIR_DEFAULT));
     31# ifdef DATADIR_DEFAULT
     32  {
     33    char *datadir;
     34    char *helpdir;
     35    char *modules;
     36    datadir = MACRO_NAME(DATADIR_DEFAULT);
     37    /* set_str_variable ("DATADIR", datadir); */
     38    ALLOCATE (helpdir, char, strlen(datadir) + strlen("/help") + 2);
     39    sprintf (helpdir, "%s/help", datadir);
     40    set_str_variable ("HELPDIR", helpdir);
     41    free (helpdir);
     42    ALLOCATE (modules, char, strlen(datadir) + strlen("/modules") + 2);
     43    sprintf (modules, "%s/modules", datadir);
     44    set_str_variable ("MODULES:0", modules);
     45    set_int_variable ("MODULES:n", 1);
     46    free (helpdir);
     47  }
    3348# endif
    3449
  • trunk/Ohana/src/opihi/include/dvomath.h

    r9275 r11084  
    6767char         *get_variable_ptr      PROTO((char *name));
    6868char         *get_local_variable_ptr PROTO((char *name));
    69 double        get_double_variable   PROTO((char *name));
     69double        get_double_variable   PROTO((char *name, int *found));
     70int           get_int_variable      PROTO((char *name, int *found));
    7071int           DeleteNamedScalar     PROTO((char *name));
    7172int           IsScalar              PROTO((char *name));
  • trunk/Ohana/src/opihi/include/pantasks.h

    r11055 r11084  
    178178int RemoveTask (Task *task);
    179179Task *SetNewTask (Task *task);
    180 void ListTaskStats ();
     180void ListTaskStats (char *regex);
    181181void UpdateTaskTimerStats (Task *task, int mode, double dtime);
    182182
  • trunk/Ohana/src/opihi/lib.shell/variable.c

    r8134 r11084  
    244244}
    245245
    246 double get_double_variable (char *name) {
    247  
    248   int i;
    249   char *local, *MacroName;
    250 
    251   MacroName = GetMacroName ();
    252 
    253   /* look for local variable first */
    254   ALLOCATE (local, char, strlen(name) + strlen(MacroName) + 2);
    255   sprintf (local, "%s.%s", MacroName, name);
    256   for (i = 0; i < Nvariables; i++) { /* find the variable mentioned */
    257     if (!strcmp(local, variables[i].name)) {
    258       free (local);
     246double get_double_variable (char *name, int *found) {
     247 
     248  int i;
     249  char *local, *MacroName;
     250
     251  MacroName = GetMacroName ();
     252
     253  /* look for local variable first */
     254  ALLOCATE (local, char, strlen(name) + strlen(MacroName) + 2);
     255  sprintf (local, "%s.%s", MacroName, name);
     256  for (i = 0; i < Nvariables; i++) { /* find the variable mentioned */
     257    if (!strcmp(local, variables[i].name)) {
     258      free (local);
     259      *found = TRUE;
    259260      return (atof (variables[i].value));
    260261    }
     
    265266  for (i = 0; i < Nvariables; i++) { /* find the variable mentioned */
    266267    if (!strcmp(name, variables[i].name)) {
     268      *found = TRUE;
    267269      return (atof (variables[i].value));
    268270    }
    269271  }
     272  *found = FALSE;
     273  return (0.0);
     274}
     275
     276int get_int_variable (char *name, int *found) {
     277 
     278  int i;
     279  char *local, *MacroName;
     280
     281  MacroName = GetMacroName ();
     282
     283  /* look for local variable first */
     284  ALLOCATE (local, char, strlen(name) + strlen(MacroName) + 2);
     285  sprintf (local, "%s.%s", MacroName, name);
     286  for (i = 0; i < Nvariables; i++) { /* find the variable mentioned */
     287    if (!strcmp(local, variables[i].name)) {
     288      *found = TRUE;
     289      free (local);
     290      return (atof (variables[i].value));
     291    }
     292  }
     293  free (local);
     294
     295  /* look for global variable */
     296  for (i = 0; i < Nvariables; i++) { /* find the variable mentioned */
     297    if (!strcmp(name, variables[i].name)) {
     298      *found = TRUE;
     299      return (atof (variables[i].value));
     300    }
     301  }
     302  *found = FALSE;
    270303  return (0.0);
    271304}
  • trunk/Ohana/src/opihi/mana/Makefile

    r11054 r11084  
    77LIB     =       $(HOME)/lib
    88INC     =       $(HOME)/include
    9 HELP    =       $(DESTHELP)/mana
     9DATA    =       $(DESTDATA)/mana
    1010
    1111# link flags
     
    3939$(BIN)/mana.$(ARCH)   : $(cmds) $(funcs)
    4040
    41 install: $(DESTBIN)/mana help
     41install: $(DESTBIN)/mana help modules
    4242
    4343help: clean-help cmd.basic.help cmd.data.help cmd.astro.help
    44 # mana.help
     44
     45modules: mana.modules
    4546
    4647.PHONY: mana
  • trunk/Ohana/src/opihi/mana/mana.c

    r9473 r11084  
    2525  set_str_variable ("RCFILE", opihi_rcfile);
    2626
    27 # ifdef HELPDIR_DEFAULT
    28   set_str_variable ("HELPDIR", MACRO_NAME(HELPDIR_DEFAULT));
     27# ifdef DATADIR_DEFAULT
     28  {
     29    char *datadir;
     30    char *helpdir;
     31    char *modules;
     32    datadir = MACRO_NAME(DATADIR_DEFAULT);
     33    /* set_str_variable ("DATADIR", datadir); */
     34    ALLOCATE (helpdir, char, strlen(datadir) + strlen("/help") + 2);
     35    sprintf (helpdir, "%s/help", datadir);
     36    set_str_variable ("HELPDIR", helpdir);
     37    free (helpdir);
     38    ALLOCATE (modules, char, strlen(datadir) + strlen("/modules") + 2);
     39    sprintf (modules, "%s/modules", datadir);
     40    set_str_variable ("MODULES:0", modules);
     41    set_int_variable ("MODULES:n", 1);
     42    free (helpdir);
     43  }
    2944# endif
    3045
  • trunk/Ohana/src/opihi/pantasks/Makefile

    r11054 r11084  
    77LIB     =       $(HOME)/lib
    88INC     =       $(HOME)/include
    9 HELP    =       $(DESTHELP)/pantasks
     9DATA    =       $(DESTDATA)/pantasks
    1010
    1111# link flags
     
    1616# sched user commands and support functions ########################
    1717
     18client = \
     19$(SRC)/pantasks_client.$(ARCH).o \
     20$(SRC)/client_shell.$(ARCH).o \
     21$(SRC)/invalid.$(ARCH).o \
     22$(SRC)/init_client.$(ARCH).o
     23
    1824single = \
    1925$(SRC)/init.$(ARCH).o \
     
    2127$(SRC)/stop.$(ARCH).o \
    2228$(SRC)/pantasks.$(ARCH).o \
    23 $(SRC)/CheckSystem.$(ARCH).o
     29$(SRC)/thread_locks.$(ARCH).o \
     30$(SRC)/job_threads.$(ARCH).o \
     31$(SRC)/task_threads.$(ARCH).o \
     32$(SRC)/controller_threads.$(ARCH).o
     33
     34server = \
     35$(SRC)/pantasks_server.$(ARCH).o \
     36$(SRC)/server_run.$(ARCH).o \
     37$(SRC)/server_load.$(ARCH).o \
     38$(SRC)/InputQueue.$(ARCH).o \
     39$(SRC)/ListenClients.$(ARCH).o \
     40$(SRC)/server.$(ARCH).o \
     41$(SRC)/status_server.$(ARCH).o \
     42$(SRC)/init_server.$(ARCH).o \
     43$(SRC)/CheckPassword.$(ARCH).o \
     44$(SRC)/thread_locks.$(ARCH).o \
     45$(SRC)/job_threads.$(ARCH).o \
     46$(SRC)/task_threads.$(ARCH).o \
     47$(SRC)/controller_threads.$(ARCH).o \
     48$(SRC)/input_threads.$(ARCH).o
    2449
    2550funcs = \
     
    6186$(SRC)/ipptool2book.$(ARCH).o
    6287
    63 client = \
    64 $(SRC)/pantasks_client.$(ARCH).o \
    65 $(SRC)/client_shell.$(ARCH).o \
    66 $(SRC)/invalid.$(ARCH).o \
    67 $(SRC)/init_client.$(ARCH).o
    68 
    69 server = \
    70 $(SRC)/pantasks_server.$(ARCH).o \
    71 $(SRC)/server_threads.$(ARCH).o \
    72 $(SRC)/server_run.$(ARCH).o \
    73 $(SRC)/server_load.$(ARCH).o \
    74 $(SRC)/InputQueue.$(ARCH).o \
    75 $(SRC)/ListenClients.$(ARCH).o \
    76 $(SRC)/server.$(ARCH).o \
    77 $(SRC)/status_server.$(ARCH).o \
    78 $(SRC)/init_server.$(ARCH).o \
    79 $(SRC)/CheckPassword.$(ARCH).o
    80 
    8188libs = \
    8289$(DESTLIB)/libshell.a \
     
    103110$(single) $(client) $(server) $(funcs) $(cmds) : $(INC)/pantasks.h
    104111
    105 install: $(DESTBIN)/pantasks $(DESTBIN)/pantasks_client $(DESTBIN)/pantasks_server help
     112install: $(DESTBIN)/pantasks $(DESTBIN)/pantasks_client $(DESTBIN)/pantasks_server help modules
    106113
    107114help: clean-help cmd.basic.help cmd.data.help cmd.astro.help pantasks.help
     115
     116modules: pantasks.modules
    108117
    109118.PHONY: pantasks pantasks_client pantasks_server
  • trunk/Ohana/src/opihi/pantasks/TaskOps.c

    r11055 r11084  
    11# include "pantasks.h"
     2# include <regex.h>
    23
    34static Task **tasks;
     
    7576  gprint (GP_LOG, " Task Status\n");
    7677
    77   snprintf (format, 128, "  AV %%-%ds %5s %%-%ds\n", nameLength, "Njobs", cmdLength);
     78  snprintf (format, 128, "  AV %%-%ds %5s  %5s %5s %5s %%-%ds\n", nameLength, "Njobs", "Ngood", "Nfail", "Ntime", cmdLength);
    7879  gprint (GP_LOG, format, "Name", "Command");
    7980
    80   snprintf (format, 128, "%%-%ds %%5d %%-%ds\n", nameLength, cmdLength);
     81  snprintf (format, 128, "%%-%ds %%5d  %%5d %%5d %%5d %%-%ds\n", nameLength, cmdLength);
    8182  for (i = 0; i < Ntasks; i++) {
    8283    valid = CheckTimeRanges (tasks[i][0].ranges, tasks[i][0].Nranges);
     
    9394    }
    9495    if (tasks[i][0].argv == NULL) {
    95       gprint (GP_LOG, format, tasks[i][0].name, tasks[i][0].Njobs, "(dynamic)");
    96     } else {
    97       gprint (GP_LOG, format, tasks[i][0].name, tasks[i][0].Njobs, tasks[i][0].argv[0]);
     96      gprint (GP_LOG, format, tasks[i][0].name, tasks[i][0].Njobs, tasks[i][0].Nsuccess, tasks[i][0].Nfailure, tasks[i][0].Ntimeout, "(dynamic)");
     97    } else {
     98      gprint (GP_LOG, format, tasks[i][0].name, tasks[i][0].Njobs, tasks[i][0].Nsuccess, tasks[i][0].Nfailure, tasks[i][0].Ntimeout, tasks[i][0].argv[0]);
    9899    }
    99100    if (verbose) {
     
    146147
    147148/* list known tasks */
    148 void ListTaskStats () {
     149void ListTaskStats (char *regex) {
    149150
    150151  int i, j, valid, nameLength;
    151152  char *start, *stop;
    152153  char format[128];
     154  regex_t preg;
    153155
    154156  gprint (GP_LOG, "\n");
     
    158160  }
    159161
     162  if (regex != NULL) {
     163    regcomp (&preg, regex, REG_EXTENDED);
     164  }
     165
    160166  /* find string lengths */
    161167  nameLength = 0;
     
    173179  snprintf (format, 128, "%%-%ds", nameLength);
    174180  for (i = 0; i < Ntasks; i++) {
     181     
     182    if ((regex != NULL) && regexec (&preg, tasks[i][0].name, 0, NULL, 0)) continue;
     183
    175184    valid = CheckTimeRanges (tasks[i][0].ranges, tasks[i][0].Nranges);
    176185    if (tasks[i][0].active) {
  • trunk/Ohana/src/opihi/pantasks/init.c

    r10997 r11084  
    1515int run             PROTO((int, char **));
    1616int stop            PROTO((int, char **));
     17int halt            PROTO((int, char **));
    1718int pulse           PROTO((int, char **));
    1819int status_sys      PROTO((int, char **));
     
    3839  {"stderr",     task_stderr,  "define a file for the job stderr dump"},
    3940  {"run",        run,          "run the scheduler"},
    40   {"stop",       stop,         "stop the scheduler"},
     41  {"stop",       stop,         "stop the scheduler (continue job harvesting)"},
     42  {"halt",       halt,         "halt the scheduler (no job harvesting)"},
    4143  {"pulse",      pulse,        "set the scheduler update period"},
    4244  {"status",     status_sys,   "get system status"},
  • trunk/Ohana/src/opihi/pantasks/ipptool2book.c

    r11055 r11084  
    8080  }
    8181  if (strcmp(bookName, argv[2])) {
    82     gprint (GP_ERR, "WARNING: metadata output name does not match expected bookname\n");
     82    gprint (GP_ERR, "WARNING: metadata output name %s does not match expected bookname %s\n", bookName, argv[2]);
    8383  }
    8484  free (line);
  • trunk/Ohana/src/opihi/pantasks/pantasks.c

    r9473 r11084  
    1010void program_init (int *argc, char **argv) {
    1111 
     12  pthread_t jobsThread;
     13  pthread_t tasksThread;
     14  pthread_t controllerThread;
     15
    1216  auto_break = TRUE;
    1317
     
    2630  set_str_variable ("RCFILE", opihi_rcfile);
    2731
    28 # ifdef HELPDIR_DEFAULT
    29   set_str_variable ("HELPDIR", MACRO_NAME(HELPDIR_DEFAULT));
     32# ifdef DATADIR_DEFAULT
     33  {
     34    char *datadir;
     35    char *helpdir;
     36    char *modules;
     37    datadir = MACRO_NAME(DATADIR_DEFAULT);
     38    /* set_str_variable ("DATADIR", datadir); */
     39    ALLOCATE (helpdir, char, strlen(datadir) + strlen("/help") + 2);
     40    sprintf (helpdir, "%s/help", datadir);
     41    set_str_variable ("HELPDIR", helpdir);
     42    free (helpdir);
     43    ALLOCATE (modules, char, strlen(datadir) + strlen("/modules") + 2);
     44    sprintf (modules, "%s/modules", datadir);
     45    set_str_variable ("MODULES:0", modules);
     46    set_int_variable ("MODULES:n", 1);
     47    free (helpdir);
     48  }
    3049# endif
    3150
     
    3352  signal (SIGTSTP, gotsignal);
    3453  signal (SIGTTIN, gotsignal);
     54
     55  /* start up the background threads here */
     56  pthread_create (&tasksThread,      NULL, &CheckTasksThread,      NULL);
     57  pthread_create (&jobsThread,       NULL, &CheckJobsThread,       NULL);
     58  pthread_create (&controllerThread, NULL, &CheckControllerThread, NULL);
    3559  return;
    3660}
     
    6185  exit (status);
    6286}
     87
     88/* pantasks runs three (or four) threads:
     89   - one thread parses commands from the connected clients
     90   - one thread runs the scheduler loop
     91   - one thread may run the controller loop independently
     92   - the main thread runs readline and accepts user input
     93*/
  • trunk/Ohana/src/opihi/pantasks/pantasks_client.c

    r9473 r11084  
    2525  set_str_variable ("RCFILE", opihi_rcfile);
    2626
    27 # ifdef HELPDIR_DEFAULT
    28   set_str_variable ("HELPDIR", MACRO_NAME(HELPDIR_DEFAULT));
     27# ifdef DATADIR_DEFAULT
     28  {
     29      char *datadir;
     30      char *helpdir;
     31      char *modules;
     32      datadir = MACRO_NAME(DATADIR_DEFAULT);
     33      /* set_str_variable ("DATADIR", datadir); */
     34      ALLOCATE (helpdir, char, strlen(datadir) + strlen("/help") + 2);
     35      sprintf (helpdir, "%s/help", datadir);
     36      set_str_variable ("HELPDIR", helpdir);
     37      free (helpdir);
     38      ALLOCATE (modules, char, strlen(datadir) + strlen("/modules") + 2);
     39      sprintf (modules, "%s/modules", datadir);
     40      set_str_variable ("MODULES:0", modules);
     41      set_int_variable ("MODULES:n", 1);
     42      free (helpdir);
     43  }
    2944# endif
    3045
  • trunk/Ohana/src/opihi/pantasks/pantasks_server.c

    r9473 r11084  
    1616int main (int argc, char **argv) {
    1717 
     18  pthread_t jobsThread;
     19  pthread_t tasksThread;
     20  pthread_t inputsThread;
    1821  pthread_t clientsThread;
    19   pthread_t tasksThread;
    20   // pthread_t jobsThread;
    21   pthread_t inputsThread;
    2222  pthread_t controllerThread;
    2323  int InitSocket, BindSocket;
     
    4747  pthread_create (&clientsThread,    NULL, &ListenClients,         NULL);
    4848  pthread_create (&tasksThread,      NULL, &CheckTasksThread,      NULL);
    49   // pthread_create (&jobsThread,       NULL, &CheckJobsThread,            NULL);
     49  pthread_create (&jobsThread,       NULL, &CheckJobsThread,       NULL);
    5050  pthread_create (&controllerThread, NULL, &CheckControllerThread, NULL);
    5151  pthread_create (&inputsThread,     NULL, &CheckInputsThread,     NULL);
  • trunk/Ohana/src/opihi/pantasks/run.c

    r7929 r11084  
    1515  }
    1616
    17   InitTaskTimers ();
    18   rl_event_hook = CheckSystem;
     17  CheckTasksSetState (TRUE);
     18  CheckControllerSetState (TRUE);
     19  CheckJobsSetState (TRUE);
     20
     21  // InitTaskTimers ();
     22  // rl_event_hook = CheckSystem;
    1923
    2024  return (TRUE);
  • trunk/Ohana/src/opihi/pantasks/server.c

    r8548 r11084  
    77int server_run      PROTO((int, char **));
    88int server_stop     PROTO((int, char **));
     9int server_halt     PROTO((int, char **));
    910int cd              PROTO((int, char **));
    1011int pwd             PROTO((int, char **));
     
    2021  {"run",    server_run,  "run scheduler"},
    2122  {"stop",   server_stop, "stop scheduler"},
     23  {"halt",   server_halt, "halt scheduler"},
    2224  {"cd",     cd,     "set local directory"},
    2325  {"pwd",    pwd,    "check local directory"},
  • trunk/Ohana/src/opihi/pantasks/server_run.c

    r8548 r11084  
    99
    1010  CheckTasksSetState (TRUE);
    11   // CheckJobsSetState (TRUE);
     11  CheckJobsSetState (TRUE);
    1212  CheckControllerSetState (TRUE);
    1313  CheckInputsSetState (TRUE);
     
    2424  CheckTasksSetState (FALSE);
    2525  // CheckJobsSetState (FALSE);
     26  // CheckControllerSetState (FALSE);
     27  CheckInputsSetState (FALSE);
     28  return (TRUE);
     29}
     30
     31int server_halt (int argc, char **argv) {
     32
     33  if (argc != 1) {
     34    gprint (GP_ERR, "USAGE: server halt\n");
     35    return (FALSE);
     36  }
     37
     38  CheckTasksSetState (FALSE);
     39  CheckJobsSetState (FALSE);
    2640  CheckControllerSetState (FALSE);
    2741  CheckInputsSetState (FALSE);
  • trunk/Ohana/src/opihi/pantasks/status.c

    r7960 r11084  
    44
    55  gprint (GP_LOG, "\n");
    6   if (rl_event_hook == NULL) {
    7     gprint (GP_LOG, " Scheduler is stopped\n");
     6
     7  // if (rl_event_hook == NULL) {
     8
     9  if (CheckTasksGetState()) {
     10    gprint (GP_LOG, " Scheduler is running\n");
    811  } else {
    9     gprint (GP_LOG, " Scheduler is running\n");
     12    if (CheckJobsGetState()) {
     13      gprint (GP_LOG, " Scheduler is stopped, harvesting jobs\n");
     14    } else {
     15      gprint (GP_LOG, " Scheduler is running\n");
     16    }
    1017  }
    1118  if (CheckControllerStatus()) {
  • trunk/Ohana/src/opihi/pantasks/stop.c

    r7917 r11084  
    88  }
    99
    10   rl_event_hook = NULL;
     10  CheckTasksSetState (FALSE);
     11  // CheckControllerSetState (FALSE);
     12  // CheckJobsSetState (FALSE);
    1113
    1214  return (TRUE);
    1315}
     16
     17int halt (int argc, char **argv) {
     18
     19  if (argc != 1) {
     20    gprint (GP_ERR, "USAGE: halt\n");
     21    return (FALSE);
     22  }
     23
     24  CheckTasksSetState (FALSE);
     25  CheckControllerSetState (FALSE);
     26  CheckJobsSetState (FALSE);
     27
     28  return (TRUE);
     29}
  • trunk/Ohana/src/opihi/pantasks/task.c

    r11055 r11084  
    2323  if ((N = get_argument (argc, argv, "-stats"))) {
    2424    remove_argument (N, &argc, argv);
    25     ListTaskStats ();
     25    if (argc == 2) {
     26      ListTaskStats (argv[N]);
     27    } else {
     28      ListTaskStats (NULL);
     29    }     
    2630    return (TRUE);
    2731  }
  • trunk/Ohana/src/opihi/pclient/Makefile

    r11054 r11084  
    77INC     =       $(HOME)/include
    88SDIR    =       $(HOME)/pclient
    9 HELP    =       $(DESTHELP)/pclient
     9DATA    =       $(DESTDATA)/pclient
    1010
    1111# link flags
  • trunk/Ohana/src/opihi/pclient/pclient.c

    r10667 r11084  
    3030  set_str_variable ("PROMPT", opihi_prompt);
    3131  set_str_variable ("RCFILE", opihi_rcfile);
    32 # ifdef HELPDIR_DEFAULT
    33   set_str_variable ("HELPDIR", MACRO_NAME(HELPDIR_DEFAULT));
     32
     33# ifdef DATADIR_DEFAULT
     34  {
     35    char *datadir;
     36    char *helpdir;
     37    char *modules;
     38    datadir = MACRO_NAME(DATADIR_DEFAULT);
     39    /* set_str_variable ("DATADIR", datadir); */
     40    ALLOCATE (helpdir, char, strlen(datadir) + strlen("/help") + 2);
     41    sprintf (helpdir, "%s/help", datadir);
     42    set_str_variable ("HELPDIR", helpdir);
     43    free (helpdir);
     44    ALLOCATE (modules, char, strlen(datadir) + strlen("/modules") + 2);
     45    sprintf (modules, "%s/modules", datadir);
     46    set_str_variable ("MODULES:0", modules);
     47    set_int_variable ("MODULES:n", 1);
     48    free (helpdir);
     49  }
    3450# endif
    3551
  • trunk/Ohana/src/opihi/pcontrol/Makefile

    r11052 r11084  
    66LIB     =       $(HOME)/lib
    77INC     =       $(HOME)/include
    8 SRC    =       $(HOME)/pcontrol
    9 HELP    =       $(DESTHELP)/pcontrol
     8SRC     =       $(HOME)/pcontrol
     9DATA    =       $(DESTDATA)/pcontrol
    1010
    1111# link flags
  • trunk/Ohana/src/opihi/pcontrol/pcontrol.c

    r10693 r11084  
    4444  set_str_variable ("RCFILE", opihi_rcfile);
    4545
    46 # ifdef HELPDIR_DEFAULT
    47   set_str_variable ("HELPDIR", MACRO_NAME(HELPDIR_DEFAULT));
     46# ifdef DATADIR_DEFAULT
     47  {
     48    char *datadir;
     49    char *helpdir;
     50    char *modules;
     51    datadir = MACRO_NAME(DATADIR_DEFAULT);
     52    /* set_str_variable ("DATADIR", datadir); */
     53    ALLOCATE (helpdir, char, strlen(datadir) + strlen("/help") + 2);
     54    sprintf (helpdir, "%s/help", datadir);
     55    set_str_variable ("HELPDIR", helpdir);
     56    free (helpdir);
     57    ALLOCATE (modules, char, strlen(datadir) + strlen("/modules") + 2);
     58    sprintf (modules, "%s/modules", datadir);
     59    set_str_variable ("MODULES:0", modules);
     60    set_int_variable ("MODULES:n", 1);
     61    free (helpdir);
     62  }
    4863# endif
    4964
Note: See TracChangeset for help on using the changeset viewer.