Changeset 11084
- Timestamp:
- Jan 12, 2007, 4:26:31 PM (19 years ago)
- Location:
- trunk/Ohana/src/opihi
- Files:
-
- 11 added
- 33 edited
-
Makefile.Common (modified) (3 diffs)
-
cmd.astro/Makefile (modified) (1 diff)
-
cmd.basic/Makefile (modified) (1 diff)
-
cmd.basic/help.c (modified) (2 diffs)
-
cmd.basic/init.c (modified) (2 diffs)
-
cmd.basic/module.c (added)
-
cmd.basic/run_for.c (modified) (2 diffs)
-
cmd.data/Makefile (modified) (1 diff)
-
dimm/Makefile (modified) (2 diffs)
-
dimm/dimm.c (modified) (1 diff)
-
dvo/Makefile (modified) (2 diffs)
-
dvo/dvo.c (modified) (1 diff)
-
include/dvomath.h (modified) (1 diff)
-
include/pantasks.h (modified) (1 diff)
-
lib.shell/variable.c (modified) (2 diffs)
-
mana/Makefile (modified) (2 diffs)
-
mana/mana.c (modified) (1 diff)
-
modules (added)
-
modules/dvo (added)
-
modules/dvo/navigate (added)
-
modules/mana (added)
-
modules/mana/plots (added)
-
pantasks/Makefile (modified) (5 diffs)
-
pantasks/TaskOps.c (modified) (6 diffs)
-
pantasks/controller_threads.c (added)
-
pantasks/init.c (modified) (2 diffs)
-
pantasks/input_threads.c (added)
-
pantasks/ipptool2book.c (modified) (1 diff)
-
pantasks/job_threads.c (added)
-
pantasks/pantasks.c (modified) (4 diffs)
-
pantasks/pantasks_client.c (modified) (1 diff)
-
pantasks/pantasks_server.c (modified) (2 diffs)
-
pantasks/run.c (modified) (1 diff)
-
pantasks/server.c (modified) (2 diffs)
-
pantasks/server_run.c (modified) (2 diffs)
-
pantasks/status.c (modified) (1 diff)
-
pantasks/stop.c (modified) (1 diff)
-
pantasks/task.c (modified) (1 diff)
-
pantasks/task_threads.c (added)
-
pantasks/thread_locks.c (added)
-
pclient/Makefile (modified) (1 diff)
-
pclient/pclient.c (modified) (1 diff)
-
pcontrol/Makefile (modified) (1 diff)
-
pcontrol/pcontrol.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/Makefile.Common
r10342 r11084 3 3 # .SUFFIXES: .$(ARCH).o 4 4 5 CFLAGS = -I$(INC) -I$(DESTINC) $(INCDIRS) -D HELPDIR_DEFAULT=$(HELP)5 CFLAGS = -I$(INC) -I$(DESTINC) $(INCDIRS) -DDATADIR_DEFAULT=$(DATA) 6 6 7 7 $(BIN)/%.$(ARCH): … … 37 37 38 38 %.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 43 53 %.clean: 44 54 rm -f $(BIN)/$*.$(ARCH) … … 60 70 61 71 clean-help: 62 @if [ ! -d $( HELP) ]; then mkdir -p $(HELP); fi63 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 5 5 LIB = $(HOME)/lib 6 6 INC = $(HOME)/include 7 S DIR= $(HOME)/cmd.astro7 SRC = $(HOME)/cmd.astro 8 8 9 9 # astro user commands ######################## 10 10 11 11 srcs = \ 12 $(S DIR)/init.$(ARCH).o \13 $(S DIR)/biassub.$(ARCH).o \14 $(S DIR)/cgrid.$(ARCH).o \15 $(S DIR)/coords.$(ARCH).o \16 $(S DIR)/cplot.$(ARCH).o \17 $(S DIR)/csystem.$(ARCH).o \18 $(S DIR)/ctimes.$(ARCH).o \19 $(S DIR)/cval.$(ARCH).o \20 $(S DIR)/czplot.$(ARCH).o \21 $(S DIR)/drizzle.$(ARCH).o \22 $(S DIR)/flux.$(ARCH).o \23 $(S DIR)/fixwrap.$(ARCH).o \24 $(S DIR)/gauss.$(ARCH).o \25 $(S DIR)/getvel.$(ARCH).o \26 $(S DIR)/getlst.$(ARCH).o \27 $(S DIR)/medianmap.$(ARCH).o \28 $(S DIR)/mkgauss.$(ARCH).o \29 $(S DIR)/multifit.$(ARCH).o \30 $(S DIR)/objload.$(ARCH).o \31 $(S DIR)/outline2.$(ARCH).o \32 $(S DIR)/outline.$(ARCH).o \33 $(S DIR)/polar.$(ARCH).o \34 $(S DIR)/precess.$(ARCH).o \35 $(S DIR)/profile.$(ARCH).o \36 $(S DIR)/region.$(ARCH).o \37 $(S DIR)/rotcurve.$(ARCH).o \38 $(S DIR)/scale.$(ARCH).o \39 $(S DIR)/sexigesimal.$(ARCH).o \40 $(S DIR)/spec.$(ARCH).o \41 $(S DIR)/star.$(ARCH).o \42 $(S DIR)/transform.$(ARCH).o \43 $(S DIR)/imsub.$(ARCH).o \44 $(S DIR)/imfit.$(ARCH).o \45 $(S DIR)/imfit-fgauss.$(ARCH).o \46 $(S DIR)/imfit-pgauss.$(ARCH).o \47 $(S DIR)/imfit-Pgauss.$(ARCH).o \48 $(S DIR)/imfit-qgauss.$(ARCH).o \49 $(S DIR)/imfit-Qgauss.$(ARCH).o \50 $(S DIR)/imfit-sgauss.$(ARCH).o \51 $(S DIR)/imfit-Sgauss.$(ARCH).o \52 $(S DIR)/imfit-qfgauss.$(ARCH).o \53 $(S DIR)/imfit-qrgauss.$(ARCH).o12 $(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 54 54 55 55 # dependancy rules for include files ######################## -
trunk/Ohana/src/opihi/cmd.basic/Makefile
r10342 r11084 2 2 3 3 HOME = $(ROOT)/src/opihi 4 SRC = $(HOME)/cmd.basic 4 5 BIN = $(HOME)/bin 5 6 LIB = $(HOME)/lib 6 7 INC = $(HOME)/include 7 SDIR = $(HOME)/cmd.basic8 8 9 9 # basic user commands ######################## 10 10 11 11 srcs = \ 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 45 46 46 47 # dependancy rules for include files ######################## -
trunk/Ohana/src/opihi/cmd.basic/help.c
r7917 r11084 3 3 int help (int argc, char **argv) { 4 4 5 int Nbytes; 5 6 FILE *f; 6 char *helpdir, file[1024], buff[512];7 char *helpdir, *file, buff[512]; 7 8 8 9 helpdir = get_variable ("HELPDIR"); … … 18 19 } 19 20 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]); 21 24 22 25 f = fopen (file, "r"); 26 free (file); 27 23 28 if (f == NULL) { 24 29 gprint (GP_ERR, "No help for: %s\n", argv[1]); -
trunk/Ohana/src/opihi/cmd.basic/init.c
r10846 r11084 20 20 int macro PROTO((int, char **)); 21 21 int memory PROTO((int, char **)); 22 int module PROTO((int, char **)); 22 23 int output PROTO((int, char **)); 23 24 int pwd PROTO((int, char **)); … … 59 60 {"macro", macro, "deal with the macros *"}, 60 61 {"memory", memory, "long listing of the allocated memory"}, 62 {"module", module, "load script file from the modules directories"}, 61 63 {"output", output, "redirect output to file"}, 62 64 {"pwd", pwd, "print current working directory"}, -
trunk/Ohana/src/opihi/cmd.basic/run_for.c
r10846 r11084 5 5 int run_for (int argc, char **argv) { 6 6 7 int ThisList, depth, i, done, status, NLINES, j;7 int ThisList, depth, i, done, status, found, NLINES, j; 8 8 double start, end, delta; 9 9 char *input; … … 86 86 set_variable (argv[1], value); 87 87 status = exec_loop (&loop); 88 value = get_double_variable (argv[1] );88 value = get_double_variable (argv[1], &found); 89 89 if (loop_next) continue; 90 90 if (loop_last) break; -
trunk/Ohana/src/opihi/cmd.data/Makefile
r10997 r11084 2 2 3 3 HOME = $(ROOT)/src/opihi 4 SRC = $(HOME)/cmd.data 4 5 BIN = $(HOME)/bin 5 6 LIB = $(HOME)/lib 6 7 INC = $(HOME)/include 7 SDIR = $(HOME)/cmd.data8 DATA = $(DESTDATA)/mana 8 9 9 10 # data user commands ######################## 10 11 srcs = \ 11 $(S DIR)/init.$(ARCH).o \12 $(S DIR)/accum.$(ARCH).o \13 $(S DIR)/applyfit2d.$(ARCH).o \14 $(S DIR)/applyfit.$(ARCH).o \15 $(S DIR)/box.$(ARCH).o \16 $(S DIR)/book.$(ARCH).o \17 $(S DIR)/book_commands.$(ARCH).o \18 $(S DIR)/center.$(ARCH).o \19 $(S DIR)/clear.$(ARCH).o \20 $(S DIR)/clip.$(ARCH).o \21 $(S DIR)/close.$(ARCH).o \22 $(S DIR)/concat.$(ARCH).o \23 $(S DIR)/contour.$(ARCH).o \24 $(S DIR)/create.$(ARCH).o \25 $(S DIR)/cumulative.$(ARCH).o \26 $(S DIR)/cursor.$(ARCH).o \27 $(S DIR)/cut.$(ARCH).o \28 $(S DIR)/delete.$(ARCH).o \29 $(S DIR)/device.$(ARCH).o \30 $(S DIR)/dimendown.$(ARCH).o \31 $(S DIR)/dimenup.$(ARCH).o \32 $(S DIR)/erase.$(ARCH).o \33 $(S DIR)/extract.$(ARCH).o \34 $(S DIR)/fft1d.$(ARCH).o \35 $(S DIR)/fft2d.$(ARCH).o \36 $(S DIR)/fit2d.$(ARCH).o \37 $(S DIR)/fit.$(ARCH).o \38 $(S DIR)/gaussj.$(ARCH).o \39 $(S DIR)/gaussdeviate.$(ARCH).o \40 $(S DIR)/grid.$(ARCH).o \41 $(S DIR)/gridify.$(ARCH).o \42 $(S DIR)/ungridify.$(ARCH).o \43 $(S DIR)/histogram.$(ARCH).o \44 $(S DIR)/imcut.$(ARCH).o \45 $(S DIR)/imhist.$(ARCH).o \46 $(S DIR)/imsmooth.$(ARCH).o \47 $(S DIR)/integrate.$(ARCH).o \48 $(S DIR)/interpolate.$(ARCH).o \49 $(S DIR)/jpeg.$(ARCH).o \50 $(S DIR)/kern.$(ARCH).o \51 $(S DIR)/keyword.$(ARCH).o \52 $(S DIR)/labels.$(ARCH).o \53 $(S DIR)/limits.$(ARCH).o \54 $(S DIR)/line.$(ARCH).o \55 $(S DIR)/list_buffers.$(ARCH).o \56 $(S DIR)/list_header.$(ARCH).o \57 $(S DIR)/list_vectors.$(ARCH).o \58 $(S DIR)/load.$(ARCH).o \59 $(S DIR)/lookup.$(ARCH).o \60 $(S DIR)/mkrgb.$(ARCH).o \61 $(S DIR)/mcreate.$(ARCH).o \62 $(S DIR)/medacc.$(ARCH).o \63 $(S DIR)/mget.$(ARCH).o \64 $(S DIR)/minterpolate.$(ARCH).o \65 $(S DIR)/mset.$(ARCH).o \66 $(S DIR)/peak.$(ARCH).o \67 $(S DIR)/periodogram.$(ARCH).o \68 $(S DIR)/plot.$(ARCH).o \69 $(S DIR)/dot.$(ARCH).o \70 $(S DIR)/point.$(ARCH).o \71 $(S DIR)/ps.$(ARCH).o \72 $(S DIR)/queuedelete.$(ARCH).o \73 $(S DIR)/queuedrop.$(ARCH).o \74 $(S DIR)/queuelist.$(ARCH).o \75 $(S DIR)/queueload.$(ARCH).o \76 $(S DIR)/queuesize.$(ARCH).o \77 $(S DIR)/queuepush.$(ARCH).o \78 $(S DIR)/queuepop.$(ARCH).o \79 $(S DIR)/queueprint.$(ARCH).o \80 $(S DIR)/queueinit.$(ARCH).o \81 $(S DIR)/radial.$(ARCH).o \82 $(S DIR)/rd.$(ARCH).o \83 $(S DIR)/rdseg.$(ARCH).o \84 $(S DIR)/read_vectors.$(ARCH).o \85 $(S DIR)/rebin.$(ARCH).o \86 $(S DIR)/resize.$(ARCH).o \87 $(S DIR)/roll.$(ARCH).o \88 $(S DIR)/rotate.$(ARCH).o \89 $(S DIR)/save.$(ARCH).o \90 $(S DIR)/section.$(ARCH).o \91 $(S DIR)/select.$(ARCH).o \92 $(S DIR)/set.$(ARCH).o \93 $(S DIR)/shift.$(ARCH).o \94 $(S DIR)/sort.$(ARCH).o \95 $(S DIR)/spline_apply.$(ARCH).o \96 $(S DIR)/spline_construct.$(ARCH).o \97 $(S DIR)/stats.$(ARCH).o \98 $(S DIR)/style.$(ARCH).o \99 $(S DIR)/subraster.$(ARCH).o \100 $(S DIR)/subset.$(ARCH).o \101 $(S DIR)/svd.$(ARCH).o \102 $(S DIR)/swapbytes.$(ARCH).o \103 $(S DIR)/textline.$(ARCH).o \104 $(S DIR)/tv.$(ARCH).o \105 $(S DIR)/tvcontour.$(ARCH).o \106 $(S DIR)/tvgrid.$(ARCH).o \107 $(S DIR)/uniq.$(ARCH).o \108 $(S DIR)/unsign.$(ARCH).o \109 $(S DIR)/vbin.$(ARCH).o \110 $(S DIR)/vclip.$(ARCH).o \111 $(S DIR)/vgauss.$(ARCH).o \112 $(S DIR)/vmaxwell.$(ARCH).o \113 $(S DIR)/vgrid.$(ARCH).o \114 $(S DIR)/vload.$(ARCH).o \115 $(S DIR)/vpop.$(ARCH).o \116 $(S DIR)/vroll.$(ARCH).o \117 $(S DIR)/vsmooth.$(ARCH).o \118 $(S DIR)/vstat.$(ARCH).o \119 $(S DIR)/wd.$(ARCH).o \120 $(S DIR)/write_vectors.$(ARCH).o \121 $(S DIR)/zap.$(ARCH).o \122 $(S DIR)/zplot.$(ARCH).o12 $(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 123 124 124 125 # dependancy rules for include files ######################## -
trunk/Ohana/src/opihi/dimm/Makefile
r11054 r11084 7 7 INC = $(HOME)/include 8 8 SRC = $(HOME)/dimm 9 HELP = $(DESTHELP)/dimm9 DATA = $(DESTDATA)/dimm 10 10 11 11 # link flags … … 42 42 $(BIN)/dimm.$(ARCH) : $(funcs) $(cmds) 43 43 44 install: $(DESTBIN)/dimm help 44 install: $(DESTBIN)/dimm help modules 45 45 46 46 help: cmd.basic.help cmd.data.help cmd.astro.help dimm.help 47 48 modules: dimm.modules 47 49 48 50 # SBIG install functions -
trunk/Ohana/src/opihi/dimm/dimm.c
r7917 r11084 25 25 set_str_variable ("RCFILE", opihi_rcfile); 26 26 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 } 29 44 # endif 30 45 -
trunk/Ohana/src/opihi/dvo/Makefile
r11054 r11084 6 6 LIB = $(HOME)/lib 7 7 INC = $(HOME)/include 8 SRC = $(HOME)/dvo9 HELP = $(DESTHELP)/dvo8 SRC = $(HOME)/dvo 9 DATA = $(DESTDATA)/dvo 10 10 11 11 # link flags … … 88 88 $(BIN)/dvo.$(ARCH) : $(funcs) $(cmds) 89 89 90 install: $(DESTBIN)/dvo help 90 install: $(DESTBIN)/dvo help modules 91 91 92 92 help: clean-help cmd.basic.help cmd.data.help cmd.astro.help dvo.help 93 93 94 94 $(funcs) $(cmds) $(libs) : $(INC)/dvoshell.h 95 96 modules: dvo.modules 95 97 96 98 .PHONY: dvo -
trunk/Ohana/src/opihi/dvo/dvo.c
r9473 r11084 29 29 set_str_variable ("RCFILE", opihi_rcfile); 30 30 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 } 33 48 # endif 34 49 -
trunk/Ohana/src/opihi/include/dvomath.h
r9275 r11084 67 67 char *get_variable_ptr PROTO((char *name)); 68 68 char *get_local_variable_ptr PROTO((char *name)); 69 double get_double_variable PROTO((char *name)); 69 double get_double_variable PROTO((char *name, int *found)); 70 int get_int_variable PROTO((char *name, int *found)); 70 71 int DeleteNamedScalar PROTO((char *name)); 71 72 int IsScalar PROTO((char *name)); -
trunk/Ohana/src/opihi/include/pantasks.h
r11055 r11084 178 178 int RemoveTask (Task *task); 179 179 Task *SetNewTask (Task *task); 180 void ListTaskStats ( );180 void ListTaskStats (char *regex); 181 181 void UpdateTaskTimerStats (Task *task, int mode, double dtime); 182 182 -
trunk/Ohana/src/opihi/lib.shell/variable.c
r8134 r11084 244 244 } 245 245 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); 246 double 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; 259 260 return (atof (variables[i].value)); 260 261 } … … 265 266 for (i = 0; i < Nvariables; i++) { /* find the variable mentioned */ 266 267 if (!strcmp(name, variables[i].name)) { 268 *found = TRUE; 267 269 return (atof (variables[i].value)); 268 270 } 269 271 } 272 *found = FALSE; 273 return (0.0); 274 } 275 276 int 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; 270 303 return (0.0); 271 304 } -
trunk/Ohana/src/opihi/mana/Makefile
r11054 r11084 7 7 LIB = $(HOME)/lib 8 8 INC = $(HOME)/include 9 HELP = $(DESTHELP)/mana9 DATA = $(DESTDATA)/mana 10 10 11 11 # link flags … … 39 39 $(BIN)/mana.$(ARCH) : $(cmds) $(funcs) 40 40 41 install: $(DESTBIN)/mana help 41 install: $(DESTBIN)/mana help modules 42 42 43 43 help: clean-help cmd.basic.help cmd.data.help cmd.astro.help 44 # mana.help 44 45 modules: mana.modules 45 46 46 47 .PHONY: mana -
trunk/Ohana/src/opihi/mana/mana.c
r9473 r11084 25 25 set_str_variable ("RCFILE", opihi_rcfile); 26 26 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 } 29 44 # endif 30 45 -
trunk/Ohana/src/opihi/pantasks/Makefile
r11054 r11084 7 7 LIB = $(HOME)/lib 8 8 INC = $(HOME)/include 9 HELP = $(DESTHELP)/pantasks9 DATA = $(DESTDATA)/pantasks 10 10 11 11 # link flags … … 16 16 # sched user commands and support functions ######################## 17 17 18 client = \ 19 $(SRC)/pantasks_client.$(ARCH).o \ 20 $(SRC)/client_shell.$(ARCH).o \ 21 $(SRC)/invalid.$(ARCH).o \ 22 $(SRC)/init_client.$(ARCH).o 23 18 24 single = \ 19 25 $(SRC)/init.$(ARCH).o \ … … 21 27 $(SRC)/stop.$(ARCH).o \ 22 28 $(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 34 server = \ 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 24 49 25 50 funcs = \ … … 61 86 $(SRC)/ipptool2book.$(ARCH).o 62 87 63 client = \64 $(SRC)/pantasks_client.$(ARCH).o \65 $(SRC)/client_shell.$(ARCH).o \66 $(SRC)/invalid.$(ARCH).o \67 $(SRC)/init_client.$(ARCH).o68 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).o80 81 88 libs = \ 82 89 $(DESTLIB)/libshell.a \ … … 103 110 $(single) $(client) $(server) $(funcs) $(cmds) : $(INC)/pantasks.h 104 111 105 install: $(DESTBIN)/pantasks $(DESTBIN)/pantasks_client $(DESTBIN)/pantasks_server help 112 install: $(DESTBIN)/pantasks $(DESTBIN)/pantasks_client $(DESTBIN)/pantasks_server help modules 106 113 107 114 help: clean-help cmd.basic.help cmd.data.help cmd.astro.help pantasks.help 115 116 modules: pantasks.modules 108 117 109 118 .PHONY: pantasks pantasks_client pantasks_server -
trunk/Ohana/src/opihi/pantasks/TaskOps.c
r11055 r11084 1 1 # include "pantasks.h" 2 # include <regex.h> 2 3 3 4 static Task **tasks; … … 75 76 gprint (GP_LOG, " Task Status\n"); 76 77 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); 78 79 gprint (GP_LOG, format, "Name", "Command"); 79 80 80 snprintf (format, 128, "%%-%ds %%5d %%-%ds\n", nameLength, cmdLength);81 snprintf (format, 128, "%%-%ds %%5d %%5d %%5d %%5d %%-%ds\n", nameLength, cmdLength); 81 82 for (i = 0; i < Ntasks; i++) { 82 83 valid = CheckTimeRanges (tasks[i][0].ranges, tasks[i][0].Nranges); … … 93 94 } 94 95 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]); 98 99 } 99 100 if (verbose) { … … 146 147 147 148 /* list known tasks */ 148 void ListTaskStats ( ) {149 void ListTaskStats (char *regex) { 149 150 150 151 int i, j, valid, nameLength; 151 152 char *start, *stop; 152 153 char format[128]; 154 regex_t preg; 153 155 154 156 gprint (GP_LOG, "\n"); … … 158 160 } 159 161 162 if (regex != NULL) { 163 regcomp (&preg, regex, REG_EXTENDED); 164 } 165 160 166 /* find string lengths */ 161 167 nameLength = 0; … … 173 179 snprintf (format, 128, "%%-%ds", nameLength); 174 180 for (i = 0; i < Ntasks; i++) { 181 182 if ((regex != NULL) && regexec (&preg, tasks[i][0].name, 0, NULL, 0)) continue; 183 175 184 valid = CheckTimeRanges (tasks[i][0].ranges, tasks[i][0].Nranges); 176 185 if (tasks[i][0].active) { -
trunk/Ohana/src/opihi/pantasks/init.c
r10997 r11084 15 15 int run PROTO((int, char **)); 16 16 int stop PROTO((int, char **)); 17 int halt PROTO((int, char **)); 17 18 int pulse PROTO((int, char **)); 18 19 int status_sys PROTO((int, char **)); … … 38 39 {"stderr", task_stderr, "define a file for the job stderr dump"}, 39 40 {"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)"}, 41 43 {"pulse", pulse, "set the scheduler update period"}, 42 44 {"status", status_sys, "get system status"}, -
trunk/Ohana/src/opihi/pantasks/ipptool2book.c
r11055 r11084 80 80 } 81 81 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]); 83 83 } 84 84 free (line); -
trunk/Ohana/src/opihi/pantasks/pantasks.c
r9473 r11084 10 10 void program_init (int *argc, char **argv) { 11 11 12 pthread_t jobsThread; 13 pthread_t tasksThread; 14 pthread_t controllerThread; 15 12 16 auto_break = TRUE; 13 17 … … 26 30 set_str_variable ("RCFILE", opihi_rcfile); 27 31 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 } 30 49 # endif 31 50 … … 33 52 signal (SIGTSTP, gotsignal); 34 53 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); 35 59 return; 36 60 } … … 61 85 exit (status); 62 86 } 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 25 25 set_str_variable ("RCFILE", opihi_rcfile); 26 26 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 } 29 44 # endif 30 45 -
trunk/Ohana/src/opihi/pantasks/pantasks_server.c
r9473 r11084 16 16 int main (int argc, char **argv) { 17 17 18 pthread_t jobsThread; 19 pthread_t tasksThread; 20 pthread_t inputsThread; 18 21 pthread_t clientsThread; 19 pthread_t tasksThread;20 // pthread_t jobsThread;21 pthread_t inputsThread;22 22 pthread_t controllerThread; 23 23 int InitSocket, BindSocket; … … 47 47 pthread_create (&clientsThread, NULL, &ListenClients, NULL); 48 48 pthread_create (&tasksThread, NULL, &CheckTasksThread, NULL); 49 //pthread_create (&jobsThread, NULL, &CheckJobsThread, NULL);49 pthread_create (&jobsThread, NULL, &CheckJobsThread, NULL); 50 50 pthread_create (&controllerThread, NULL, &CheckControllerThread, NULL); 51 51 pthread_create (&inputsThread, NULL, &CheckInputsThread, NULL); -
trunk/Ohana/src/opihi/pantasks/run.c
r7929 r11084 15 15 } 16 16 17 InitTaskTimers (); 18 rl_event_hook = CheckSystem; 17 CheckTasksSetState (TRUE); 18 CheckControllerSetState (TRUE); 19 CheckJobsSetState (TRUE); 20 21 // InitTaskTimers (); 22 // rl_event_hook = CheckSystem; 19 23 20 24 return (TRUE); -
trunk/Ohana/src/opihi/pantasks/server.c
r8548 r11084 7 7 int server_run PROTO((int, char **)); 8 8 int server_stop PROTO((int, char **)); 9 int server_halt PROTO((int, char **)); 9 10 int cd PROTO((int, char **)); 10 11 int pwd PROTO((int, char **)); … … 20 21 {"run", server_run, "run scheduler"}, 21 22 {"stop", server_stop, "stop scheduler"}, 23 {"halt", server_halt, "halt scheduler"}, 22 24 {"cd", cd, "set local directory"}, 23 25 {"pwd", pwd, "check local directory"}, -
trunk/Ohana/src/opihi/pantasks/server_run.c
r8548 r11084 9 9 10 10 CheckTasksSetState (TRUE); 11 //CheckJobsSetState (TRUE);11 CheckJobsSetState (TRUE); 12 12 CheckControllerSetState (TRUE); 13 13 CheckInputsSetState (TRUE); … … 24 24 CheckTasksSetState (FALSE); 25 25 // CheckJobsSetState (FALSE); 26 // CheckControllerSetState (FALSE); 27 CheckInputsSetState (FALSE); 28 return (TRUE); 29 } 30 31 int 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); 26 40 CheckControllerSetState (FALSE); 27 41 CheckInputsSetState (FALSE); -
trunk/Ohana/src/opihi/pantasks/status.c
r7960 r11084 4 4 5 5 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"); 8 11 } 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 } 10 17 } 11 18 if (CheckControllerStatus()) { -
trunk/Ohana/src/opihi/pantasks/stop.c
r7917 r11084 8 8 } 9 9 10 rl_event_hook = NULL; 10 CheckTasksSetState (FALSE); 11 // CheckControllerSetState (FALSE); 12 // CheckJobsSetState (FALSE); 11 13 12 14 return (TRUE); 13 15 } 16 17 int 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 23 23 if ((N = get_argument (argc, argv, "-stats"))) { 24 24 remove_argument (N, &argc, argv); 25 ListTaskStats (); 25 if (argc == 2) { 26 ListTaskStats (argv[N]); 27 } else { 28 ListTaskStats (NULL); 29 } 26 30 return (TRUE); 27 31 } -
trunk/Ohana/src/opihi/pclient/Makefile
r11054 r11084 7 7 INC = $(HOME)/include 8 8 SDIR = $(HOME)/pclient 9 HELP = $(DESTHELP)/pclient9 DATA = $(DESTDATA)/pclient 10 10 11 11 # link flags -
trunk/Ohana/src/opihi/pclient/pclient.c
r10667 r11084 30 30 set_str_variable ("PROMPT", opihi_prompt); 31 31 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 } 34 50 # endif 35 51 -
trunk/Ohana/src/opihi/pcontrol/Makefile
r11052 r11084 6 6 LIB = $(HOME)/lib 7 7 INC = $(HOME)/include 8 SRC = $(HOME)/pcontrol9 HELP = $(DESTHELP)/pcontrol8 SRC = $(HOME)/pcontrol 9 DATA = $(DESTDATA)/pcontrol 10 10 11 11 # link flags -
trunk/Ohana/src/opihi/pcontrol/pcontrol.c
r10693 r11084 44 44 set_str_variable ("RCFILE", opihi_rcfile); 45 45 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 } 48 63 # endif 49 64
Note:
See TracChangeset
for help on using the changeset viewer.
