./pvm3/0000755007401100740110000000000011141631057010553 5ustar kohlkohl./pvm3/maclOs2.cmd0000644007401100740110000000046506401301612012537 0ustar kohlkohlcd src\os2 make clean cd ..\..\console\os2 make clean cd ..\..\pvmgs\os2 make clean cd ..\..\examples\os2 make clean cd ..\..\gexamples\os2 make clean cd ..\..\hoster\os2 make clean cd ..\..\libfpvm\os2 make clean cd ..\..\rm\os2 make clean cd ..\..\tracer\os2 make clean cd ..\..\xep\os2 make clean cd ..\.. ./pvm3/makeOs2.cmd0000644007401100740110000000047106401305505012542 0ustar kohlkohlcd src\os2 make install cd ..\..\tracer\os2 make install cd ..\..\console\os2 make install cd ..\..\pvmgs\os2 make install cd ..\..\hoster\os2 make all cd ..\..\examples\os2 make all cd ..\..\gexamples\os2 make all cd ..\..\libfpvm\os2 make install cd ..\..\rm\os2 make install cd ..\..\xep\os2 make all cd ..\.. ./pvm3/Readme.Os20000644007401100740110000000320507331310241012330 0ustar kohlkohl================================================================== PVM 3.4.0 for OS2, Bohumir Horeni, horeni@login.cz, Sat Aug 9 1997 ================================================================== Port of Paralel Virtual Machine (PVM) v.3.4.beta3 (Netlib 22 July 1997) to OS2 platform. Mimimal cahanges in "unix" code, no extensive rewriting. tested: ======= PVM Test Engine version 2.0 (patched for gcc/i386) OS2<--->LINUX<--->HPPA used: ===== OS/2 version 4.0 ( v.3 Connect fixpack level 17 ) emx 0.9c (GNU C compiler 2.7.2.1) ftp://hobbes.nmsu.edu RPC for emx http://set.gmd.de/~veit/os2 (9) XF86 Support device driver http://set.gmd.de/~veit/os2 or XFree86 v.3.3 for OS/2 GNU Make (v.3.75) ftp://hobbes.nmsu.edu (*) Korn shell (OS/2 port of pdksh version 5) ftp://hobbes.nmsu.edu GNU file utilities (cp/mv/etc.) ftp://hobbes.nmsu.edu (f) GNU Fortran 0.5.20 for the OS/2 with emx ftp://hobbes.nmsu.edu (f) GNU m4 macro processor (1.4) ftp://hobbes.nmsu.edu (x) XFree86 v.3.3 ftp://hobbes.nmsu.edu (9) kill -9 feature for OS/2 (*) some other shells (bash) failed for -D\"IMA_OS2\" (f) libfpvm, *.f examples (x) xep config.sys (example) ========== ... DEVICE=C:\XFree86\lib\xf86sup.sys ... SET HOME=c:/home SET TMP=c:/tmp ... SET PVM_ROOT=c:/home/work/tools/pvm3 SET PVM_ARCH=OS2 ... # environment for emx, XFree86, ... ... build ===== makeOs2.cmd rebuild ======= maclOs2.cmd makeOs2.cmd PVM === http://www.csm.ornl.gov/pvm/pvm_home.html ./pvm3/xep/0000755007401100740110000000000011141631057011347 5ustar kohlkohl./pvm3/xep/color.xbm0000644007401100740110000000101706221611557013202 0ustar kohlkohl#define color_width 24 #define color_height 24 static char color_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x41, 0x00, 0x80, 0x80, 0x00, 0x40, 0x00, 0x01, 0x40, 0x00, 0x01, 0x40, 0x00, 0x01, 0x40, 0x00, 0x01, 0x40, 0x00, 0x01, 0x80, 0x80, 0x00, 0xf0, 0xc1, 0x07, 0xf8, 0xbf, 0x0c, 0xfc, 0x57, 0x12, 0xfe, 0x2f, 0x29, 0xfe, 0x9f, 0x24, 0xfe, 0x4f, 0x32, 0xfe, 0x2f, 0x29, 0xfe, 0x9f, 0x24, 0xfc, 0x57, 0x12, 0xf8, 0x23, 0x09, 0xf0, 0xc1, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; ./pvm3/xep/TrueColorFix0000644007401100740110000002457706221612357013703 0ustar kohlkohlReceived: from msr.epm.ornl.gov by CS.UTK.EDU with SMTP (cf v2.9s-UTK) id EAA23496; Mon, 11 Jul 1994 04:48:33 -0400 Received: from appana.ap.titech.ac.jp by msr.epm.ornl.gov (4.1/1.34) id AA28611; Mon, 11 Jul 94 04:46:41 EDT Received: by appana.ap.titech.ac.jp (5.65+1.6W/tit-mx1.1); Mon, 11 Jul 94 17:45:55 +0900 Received: by wisdom.ap.titech.ac.jp (NX5.67c/NX3.0S) id AA12748; Mon, 11 Jul 94 17:46:04 +0900 Date: Mon, 11 Jul 94 17:46:04 +0900 From: Satoshi Adachi Message-Id: <9407110846.AA12748@wisdom.ap.titech.ac.jp> To: pvm@msr.epm.ornl.gov Subject: Modifications of xep necessary for NeXTstation Color. Cc: adachi@wisdom.ap.titech.ac.jp Dear Scientists and Engineers who have been developing PVM: (1) Recently, I was informed by my friend that there is a very nice software system, called PVM, that enable us to look a cluster of many workstations as a single virtual machine and to write parallel programs for the virtual machine. So, I installed PVM3.2.4 for our workstation cluster of NeXTstation's and IBM RS6000's. Now, PVM works very well on our workstation cluster. I have just begun writing several programs for physics by using PVM. Thank you very much for developing such a nice software system and for making it a free software. In the installation of PVM3.2.4, the body part of PVM did not need any change of source code and the installcation was completely automatic. However, the installtion of the demo program "xep" for NeXTstation color needed some change of source code. In this email, I will explain the modification of the source code of "xep" which is necessary to run "xep" on NeXTstation Color and NeXTstation Color Turbo. I hope that the modification or its equivalent will be incorpolated in the future releases of "xep". (2) Our NeXTstaion Color's and NeXTstation Color Turbo's are running under NeXTSTEP 3.0J and the commercial X Window software "Co-Xist" is installed on these machines. For NeXTstaion Color and NeXTstation Color Turbo, the true color model is used rather than the pseudo color model. On the screen, each pixel directly corresponds to a binary number of 12 bit length. Namely, Red, Green and Blue intensities are expressed by 4 bit integers. In C programs, a pixel is prepresented by a short integer with 16 bit which consists of 12 bit RGB fields and 4 bit pad. The source code of "xep" supports the not only the pseudo colode model but also the true color model. However, when the true color model is used, it is assumed that each pixel is expressed by the RGB value of 24 bit length (8 bit each) and is represented by 32 bit integer in C programs (including 8 bit pad). This assumption supposed by "xep" does not hold for NeXTstation Color and NeXTstation Color Turbo. Consequently, "xep" abends on these machines with Co-Xist. In order to support the true color model with RGB value represented by not only 3*8 bit but also 3*4 bit, I changed the source code of "xep" in the file "xep/xep.c" in the following way: ------------------------------------------------------------------------------- *** xep.c Mon Jul 11 17:19:01 1994 --- xep.c.org Sat Jul 9 20:16:37 1994 *************** *** 70,78 **** typedef unsigned int IBIT32; - /* ***** Added by S.Adachi (94/07/09) ***** */ - typedef unsigned short int IBIT16; - /* describes an image canvas (currently only one) */ struct canvas { --- 70,75 ---- *************** *** 410,437 **** } xBpp = pfv[i].bits_per_pixel; xBypp = xBpp / 8; - /* ***** Modified by S.Adachi (94/07/10) ***** */ - #if 0 redMask = defVis->red_mask; redShift = ffs(redMask & ~(redMask >> 1)) - 8; greenMask = defVis->green_mask; greenShift = ffs(greenMask & ~(greenMask >> 1)) - 8; blueMask = defVis->blue_mask; blueShift = ffs(blueMask & ~(blueMask >> 1)) - 8; - #else - if ((xBypp != 2) && (xBypp != 4)) { - fprintf(stderr, "unsupported bytes per pixel: %d\n", - xBypp); - exit(1); - } - redMask = defVis->red_mask; - redShift = ffs(redMask) - 1; - greenMask = defVis->green_mask; - greenShift = ffs(greenMask) - 1; - blueMask = defVis->blue_mask; - blueShift = ffs(blueMask) - 1; - #endif /* Modification by S.Adachi (94/07/10) */ mkrbow(fclutr, fclutg, fclutb, 256); } else { isCmap = 1; xCmap = DefaultColormap(xDisp, xScrn); --- 407,420 ---- } xBpp = pfv[i].bits_per_pixel; xBypp = xBpp / 8; redMask = defVis->red_mask; redShift = ffs(redMask & ~(redMask >> 1)) - 8; greenMask = defVis->green_mask; greenShift = ffs(greenMask & ~(greenMask >> 1)) - 8; blueMask = defVis->blue_mask; blueShift = ffs(blueMask & ~(blueMask >> 1)) - 8; mkrbow(fclutr, fclutg, fclutb, 256); + } else { isCmap = 1; xCmap = DefaultColormap(xDisp, xScrn); *************** *** 1044,1068 **** return x; } - /* ***** Added by S.Adachi (94/07/09) ***** */ - /* sw2() - * - * Byteswap a 16-bit integer. - */ - - IBIT16 - sw2(x) - IBIT16 x; - { - u_char *cp = (u_char*)&x; - u_char c; - - c = cp[0]; - cp[0] = cp[1]; - cp[1] = c; - return x; - } - /* repaint_region() * --- 1027,1032 ---- *************** *** 1133,1212 **** dy = (y1 - cnp->cn_oy) * cnp->cn_zoom; ya = 0; while (sy < y2 && dy < cnp->cn_ht) { ! sx = x1; ! dx = (x1 - cnp->cn_ox) * cnp->cn_zoom; ! xa = 0; ! sa = ribuf + sy * cnp->cn_wd + sx; ! /* ***** Modified by S.Adachi (94/07/09) ***** */ ! #if 0 ! da = (ximbuf + dy * cnp->cn_xim->bytes_per_line ! + dx * sizeof(IBIT32)); ! while (sx < x2 && dx < cnp->cn_wd) { ! pixv = lbm & *sa; ! pixr = fclutr[pixv]; ! pixg = fclutg[pixv]; ! pixb = fclutb[pixv]; ! pixv = (redMask & (pixr << redShift)) ! | (greenMask & (pixg << greenShift)) ! | (blueMask & (pixb << blueShift)); ! if (revByte) ! *((IBIT32*)da) = sw4(pixv); ! else ! *((IBIT32*)da) = pixv; ! da += sizeof(IBIT32); ! dx++; ! if (++xa >= cnp->cn_zoom) { ! xa = 0; ! sx++; ! sa++; ! } ! } ! #else ! da = (ximbuf + dy * cnp->cn_xim->bytes_per_line ! + dx * xBypp); ! while (sx < x2 && dx < cnp->cn_wd) { ! pixv = lbm & *sa; ! pixr = fclutr[pixv]; ! pixg = fclutg[pixv]; ! pixb = fclutb[pixv]; ! if (xBypp == 4) { ! pixv = ((redMask & (pixr << redShift)) ! |(greenMask & (pixg << greenShift)) ! |(blueMask & (pixb << blueShift))); ! if (revByte) ! *((IBIT32*)da) = sw4(pixv); ! else ! *((IBIT32*)da) = pixv; ! da += sizeof(IBIT32); ! } ! else { ! /* xBypp == 2 */ ! IBIT16 pixvs; ! pixr = pixr >> 4; ! pixg = pixg >> 4; ! pixb = pixb >> 4; ! pixvs = ((redMask & (pixr << redShift)) ! |(greenMask & (pixg << greenShift)) ! |(blueMask & (pixb << blueShift))); ! if (revByte) ! *((IBIT16*)da) = sw2(pixvs); ! else ! *((IBIT16*)da) = pixvs; ! da += sizeof(IBIT16); ! } ! dx++; ! if (++xa >= cnp->cn_zoom) { ! xa = 0; ! sx++; ! sa++; ! } ! } ! #endif /* ***** End of Modification by S.Adachi (94/07/10) ***** */ ! dy++; ! if (++ya >= cnp->cn_zoom) { ! ya = 0; ! sy++; ! } } } --- 1097,1133 ---- dy = (y1 - cnp->cn_oy) * cnp->cn_zoom; ya = 0; while (sy < y2 && dy < cnp->cn_ht) { ! sx = x1; ! dx = (x1 - cnp->cn_ox) * cnp->cn_zoom; ! xa = 0; ! sa = ribuf + sy * cnp->cn_wd + sx; ! da = ximbuf + dy * cnp->cn_xim->bytes_per_line + dx * sizeof(IBIT32); ! while (sx < x2 && dx < cnp->cn_wd) { ! pixv = lbm & *sa; ! pixr = fclutr[pixv]; ! pixg = fclutg[pixv]; ! pixb = fclutb[pixv]; ! pixv = (redMask & (pixr << redShift)) ! | (greenMask & (pixg << greenShift)) ! | (blueMask & (pixb << blueShift)); ! if (revByte) ! *((IBIT32*)da) = sw4(pixv); ! else ! *((IBIT32*)da) = pixv; ! ! da += sizeof(IBIT32); ! dx++; ! if (++xa >= cnp->cn_zoom) { ! xa = 0; ! sx++; ! sa++; ! } ! } ! dy++; ! if (++ya >= cnp->cn_zoom) { ! ya = 0; ! sy++; ! } } } ------------------------------------------------------------------------------- I would like to make several remarks on the above modifications: (i) In contrast to IBIT32 for the RGB value represented in 32 bit, a new type IBIT 16 is introduced for the RGB value represented in 16 bit as: typedef unsigned short int IBIT16; (ii) In order to confirm that when the true color model is used, the RGB value is represented in either 16 bit or 32 bit, the following code is added: if ((xBypp != 2) && (xBypp != 4)) { fprintf(stderr, "unsupported bytes per pixel: %d\n", xBypp); exit(1); } (iii) The original code to calculate the shift for the red field in the RGB value was redShift = ffs(redMask & ~(redMask >> 1)) - 8; This assumes that the field has 8 bit length. This is changed to redShift = ffs(redMask) - 1; Same is true for the fields of Green and Blue. This new code may have some problem on the respect to byte order mismatch between X server and X client. I am not sure. I did not inspect it. (iv) A new function "sw2()" is added. This is the 16 bit version of sw4(). (v) The following code assumes that each pixel is represented by 32 bit integer: da = (ximbuf + dy * cnp->cn_xim->bytes_per_line + dx * sizeof(IBIT32)); In the new code, "sizeof(IBIT32)" is replaced by "xBypp". (vi) When a pixel value is written in memory, the following "if" statement is introduced to respect the bit length of the pixel: if (xBypp == 4) { /* Same as the original code */ } else { /* xBypp == 2 */ IBIT16 pixvs; pixr = pixr >> 4; pixg = pixg >> 4; pixb = pixb >> 4; pixvs = ((redMask & (pixr << redShift)) |(greenMask & (pixg << greenShift)) |(blueMask & (pixb << blueShift))); if (revByte) *((IBIT16*)da) = sw2(pixvs); else *((IBIT16*)da) = pixvs; da += sizeof(IBIT16); } We should be careful that the original pixr, pixg, pixb values are in the range 0-255. Thank you very much. Satoshi Adachi (adachi@wisdom.ap.titech.ac.jp) Research Associate Department of Applied Physics Tokyo Institute of Technology Meguro, Tokyo 152, JAPAN ./pvm3/xep/myalloc.h0000644007401100740110000000422106741172516013171 0ustar kohlkohl /* $Id: myalloc.h,v 1.3 1999/07/08 19:00:30 kohl Exp $ */ /* * PVM version 3.4: Parallel Virtual Machine System * University of Tennessee, Knoxville TN. * Oak Ridge National Laboratory, Oak Ridge TN. * Emory University, Atlanta GA. * Authors: J. J. Dongarra, G. E. Fagg, M. Fischer * G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci, * P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam * (C) 1997 All Rights Reserved * * NOTICE * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted * provided that the above copyright notice appear in all copies and * that both the copyright notice and this permission notice appear in * supporting documentation. * * Neither the Institutions (Emory University, Oak Ridge National * Laboratory, and University of Tennessee) nor the Authors make any * representations about the suitability of this software for any * purpose. This software is provided ``as is'' without express or * implied warranty. * * PVM version 3 was funded in part by the U.S. Department of Energy, * the National Science Foundation and the State of Tennessee. */ /* * myalloc.h * * Malloc defines. * * $Log: myalloc.h,v $ * Revision 1.3 1999/07/08 19:00:30 kohl * Fixed "Log" keyword placement. * - indent with " * " for new CVS. * * Revision 1.2 1997/07/09 13:56:57 pvmsrc * Fixed Author Header. * * Revision 1.1 1996/09/23 22:52:57 pvmsrc * Initial revision * */ #ifdef HASSTDLIB #include #endif #ifdef USE_PVM_ALLOC #define MY_ALLOC(n,g) pvm_alloc((unsigned)(n),(g)) #define MY_REALLOC(p,n) pvm_realloc((char*)(p),(unsigned)(n)) #define MY_FREE(p) pvm_free((char*)(p)) #else #define MY_ALLOC(n,g) malloc((unsigned)(n)) #define MY_REALLOC(p,n) realloc((char*)(p),(unsigned)(n)) #define MY_FREE(p) free((char*)(p)) #endif #define TALLOC(n,t,g) (t*)MY_ALLOC((n)*sizeof(t),(g)) #define TREALLOC(p,n,t) (t*)MY_REALLOC(p,(n)*sizeof(t)) #define STRALLOC(s) strcpy(TALLOC(strlen(s)+1,char,"str"),s) ./pvm3/xep/hostc.c0000644007401100740110000001447706741172515012661 0ustar kohlkohl static char rcsid[] = "$Id: hostc.c,v 1.5 1999/07/08 19:00:29 kohl Exp $"; /* * PVM version 3.4: Parallel Virtual Machine System * University of Tennessee, Knoxville TN. * Oak Ridge National Laboratory, Oak Ridge TN. * Emory University, Atlanta GA. * Authors: J. J. Dongarra, G. E. Fagg, M. Fischer * G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci, * P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam * (C) 1997 All Rights Reserved * * NOTICE * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted * provided that the above copyright notice appear in all copies and * that both the copyright notice and this permission notice appear in * supporting documentation. * * Neither the Institutions (Emory University, Oak Ridge National * Laboratory, and University of Tennessee) nor the Authors make any * representations about the suitability of this software for any * purpose. This software is provided ``as is'' without express or * implied warranty. * * PVM version 3 was funded in part by the U.S. Department of Energy, * the National Science Foundation and the State of Tennessee. */ /* * hostc.c * * Local host table cache functions. * * $Log: hostc.c,v $ * Revision 1.5 1999/07/08 19:00:29 kohl * Fixed "Log" keyword placement. * - indent with " * " for new CVS. * * Revision 1.4 1998/01/28 19:15:14 pvmsrc * Commented out ancient #include ... * (Spanker=kohl) * * Revision 1.3 1997/08/07 21:58:09 pvmsrc * Fixed stupid bugs... * * Revision 1.2 1997/07/09 13:56:50 pvmsrc * Fixed Author Header. * * Revision 1.1 1996/09/23 22:52:48 pvmsrc * Initial revision * */ #include #ifdef SYSVSTR #include #else #include #endif #include #include /* #ifdef IMA_LINUX */ /* #include */ /* #endif */ #include #include <../src/bfunc.h> #include <../src/listmac.h> #include "myalloc.h" #include "hostc.h" static struct hostc *curhosts = 0; static int addtag = -1; static int deltag = -1; static int (*addcallback)() = 0; static int (*delcallback)() = 0; static struct hostc * hc_new() { struct hostc *hp; if (hp = TALLOC(1, struct hostc, "hd")) BZERO(hp, sizeof(struct hostc)); return hp; } static int hc_init() { if (curhosts = hc_new()) curhosts->link = curhosts->rlink = curhosts; else fprintf(stderr, "hc_init() out of memory\n"); return 0; } static struct hostc * hc_add(hip) struct pvmhostinfo *hip; { struct hostc *hp, *hp2; /* * if we have a delete message tag and it's not this host, notify */ if (deltag != -1 && hip->hi_tid != pvm_tidtohost(pvm_mytid())) pvm_notify(PvmHostDelete, deltag, 1, &hip->hi_tid); if (hp = hc_new()) { hp->pvmd_tid = hip->hi_tid; hp->name = STRALLOC(hip->hi_name); hp->alias = STRALLOC(hip->hi_name); hp->arch = STRALLOC(hip->hi_arch); hp->speed = hip->hi_speed; pvm_hostsync(hp->pvmd_tid, (struct timeval *)0, &(hp->delta)); } for (hp2 = curhosts->link; hp2 != curhosts; hp2 = hp2->link) if (hp->pvmd_tid < hp2->pvmd_tid) break; LISTPUTBEFORE(hp2, hp, link, rlink); return hp; } static int hc_delete(hp) struct hostc *hp; { LISTDELETE(hp, link, rlink); if (hp->name) MY_FREE(hp->name); if (hp->arch) MY_FREE(hp->arch); if (hp->alias) MY_FREE(hp->alias); MY_FREE(hp); return 0; } static struct hostc * hc_find(tid) { struct hostc *hp; for (hp = curhosts->link; hp != curhosts; hp = hp->link) if (tid <= hp->pvmd_tid) break; return (tid == hp->pvmd_tid) ? hp : (struct hostc *)0; } /* host_init() * * Initialize host cache. Called once at beginning of time. * Synchronize to current configuration. * Specify message tags to be used for HostAdd and HostDelete notify. */ host_init(atag, dtag, acb, dcb) int atag; /* message tag to use for HostAdd notify or -1 */ int dtag; /* tag to use for HostDelete notify or -1 */ int (*acb)(); /* callback for each host added */ int (*dcb)(); /* callback for each host deleted */ { struct pvmhostinfo *hip; int nh; addtag = atag; deltag = dtag; addcallback = acb; delcallback = dcb; hc_init(); if (addtag != -1) pvm_notify(PvmHostAdd, addtag, -1, (int *)0); if (!pvm_config(&nh, (int *)0, &hip)) { while (nh > 0) { nh--; hc_add(&hip[nh]); } } return 0; } /* host_add() * * Called when a HostAdd notify message has been received. * The message is in the current receive buffer. */ host_add() { int d = 0; int n; int *dtids; int i, j; struct pvmhostinfo *hip; int nh; pvm_upkint(&n, 1, 1); if (n < 1 || n > 4096) return 0; dtids = TALLOC(n, int, "dtid"); pvm_upkint(dtids, n, 1); pvm_freebuf(pvm_getrbuf()); if (!pvm_config(&nh, (int *)0, &hip)) { for (j = n; j-- > 0; ) for (i = nh; i-- > 0; ) { if (dtids[j] == hip[i].hi_tid) { hc_add(&hip[i]); if (addcallback) addcallback(dtids[j]); d++; break; } } } MY_FREE(dtids); return d; } /* host_delete() * * Called when a HostDelete notify message has been received. * The message is in the current receive buffer. */ host_delete() { int tid; struct hostc *hp; int d = 0; pvm_upkint(&tid, 1, 1); if (tid == pvm_tidtohost(tid) && (hp = hc_find(tid))) { if (delcallback) delcallback(tid); hc_delete(hp); d++; } return d; } struct hostc * host_findtid(tid) int tid; { return hc_find(tid); } struct hostc * host_findname(name) char *name; { struct hostc *hp; for (hp = curhosts->link; hp != curhosts; hp = hp->link) if (!strcmp(name, hp->name)) return hp; return (struct hostc *)0; } struct hostc * host_next(hp) struct hostc *hp; { hp = hp ? hp->link : curhosts->link; return (hp == curhosts) ? 0 : hp; } int host_show() { struct hostc *hp; int nh = 0; int na = 0; int a; long mask = 0; for (hp = 0; hp = host_next(hp); ) { nh++; a = pvm_archcode(hp->arch); if (!(mask & (1 << a))) { na++; mask |= (1 << a); } } printf("Configuration: %d host%s, %d data format%s\n", nh, (nh == 1 ? "" : "s"), na, (na == 1 ? "" : "s")); printf(" TID ARCH SPEED HOSTNAME\n"); for (hp = 0; hp = host_next(hp); ) { printf("%8x %10s %7d %-24s\n", hp->pvmd_tid, hp->arch, hp->speed, hp->name); } return 0; } ./pvm3/xep/into.xbm0000644007401100740110000000056606221611560013037 0ustar kohlkohl#define into_width 16 #define into_height 24 static char into_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x07, 0x00, 0x08, 0x00, 0x10, 0x20, 0x10, 0x40, 0x20, 0x80, 0x20, 0xe0, 0x21, 0x98, 0x20, 0x44, 0x20, 0x24, 0x10, 0x04, 0x10, 0x04, 0x08, 0x08, 0x04, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; ./pvm3/xep/calc.c0000644007401100740110000002676006673500147012441 0ustar kohlkohl static char rcsid[] = "$Id: calc.c,v 1.3 1999/03/16 16:01:43 pvmsrc Exp $"; /* * PVM version 3.4: Parallel Virtual Machine System * University of Tennessee, Knoxville TN. * Oak Ridge National Laboratory, Oak Ridge TN. * Emory University, Atlanta GA. * Authors: J. J. Dongarra, G. E. Fagg, M. Fischer * G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci, * P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam * (C) 1997 All Rights Reserved * * NOTICE * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted * provided that the above copyright notice appear in all copies and * that both the copyright notice and this permission notice appear in * supporting documentation. * * Neither the Institutions (Emory University, Oak Ridge National * Laboratory, and University of Tennessee) nor the Authors make any * representations about the suitability of this software for any * purpose. This software is provided ``as is'' without express or * implied warranty. * * PVM version 3 was funded in part by the U.S. Department of Energy, * the National Science Foundation and the State of Tennessee. */ /* * calc.c * * Bag of tasks driver for tiled workers. * Manages idle, busy, failed workers and message routing sockets. * * Oct 95 Manchek */ #ifdef HASSTDLIB #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include "../src/bfunc.h" #include "../src/listmac.h" #include "myalloc.h" #include "hostc.h" #include "imp.h" #ifndef min #define min(a,b) ((a)<(b)?(a):(b)) #endif #ifndef max #define max(a,b) ((a)>(b)?(a):(b)) #endif #define JobSend 1 /* send tile to worker */ #define JobReturn 2 /* get image back from worker */ #define AddMessage 3 /* hosts were added */ #define DelMessage 4 /* hosts were deleted */ #define ExitMessage 5 /* worker exited */ #define RouteAddTag 6 /* new route socket opened */ #define RouteDeleteTag 7 /* route socket closed */ #define TILEHEIGHT 10 struct worker { struct worker *link, *rlink; /* dll of active or idle */ int tid; /* worker tid */ struct job *job; /* number */ XtInputId route; /* X id for route socket */ }; struct job { struct job *link, *rlink; int tile; /* tile number */ }; int gotmorehosts(); /*************** ** Globals ** ** ** ***************/ extern struct canvas imCan; /* from xep.c */ extern int dobars; /* from xep.c */ extern char *workerfile; /* from xep.c */ extern int nworkers; /* from xep.c */ int mytid; /* pvm tid */ struct worker *active = 0; /* active workers */ struct worker *idle = 0; /* idle workers */ struct job *todo = 0; /* jobs to be started */ int ntiles = 0; /* number of tiles in frame */ pvminit() { if ((mytid = pvm_mytid()) < 0) exit(1); pvm_notify(PvmRouteAdd, RouteAddTag, -1, (int *)0); pvm_setopt(PvmRoute, PvmRouteDirect); host_init(AddMessage, DelMessage, gotmorehosts, (int (*)())0); idle = TALLOC(1, struct worker, "worker"); idle->link = idle->rlink = idle; idle->tid = 0; idle->job = 0; active = TALLOC(1, struct worker, "worker"); active->link = active->rlink = active; active->tid = 0; active->job = 0; todo = TALLOC(1, struct job, "job"); todo->link = todo->rlink = todo; return 0; } more_workers() { int nh; int i; struct hostc *hp; struct worker *wp; int tid; hp = 0; nh = 0; while (hp = host_next(hp)) nh++; nh -= nworkers; if (nh <= 0) return 0; hp = 0; while (hp = host_next(hp)) { i = 0; for (wp = idle->link; wp != idle; wp = wp->link) if (pvm_tidtohost(wp->tid) == hp->pvmd_tid) { i = 1; break; } if (i) continue; for (wp = active->link; wp != active; wp = wp->link) if (pvm_tidtohost(wp->tid) == hp->pvmd_tid) { i = 1; break; } if (i) continue; if (pvm_spawn(workerfile, (char**)0, PvmTaskHost, hp->name, 1, &tid) < 0) { pvm_exit(); exit(1); } if (tid > 0) { wp = TALLOC(1, struct worker, "worker"); wp->tid = tid; wp->job = 0; wp->route = 0; LISTPUTBEFORE(idle, wp, link, rlink); pvm_notify(PvmTaskExit, ExitMessage, 1, &tid); #ifdef DEBUG fprintf(stderr, "more_workers() new worker 0x%x\n", tid); #endif nworkers++; } } setlabel(); return 0; } stop_workers() { struct worker *wp; while ((wp = idle->link) != idle) { #ifdef DEBUG fprintf(stderr, "stop_workers() killing 0x%x\n", wp->tid); #endif pvm_kill(wp->tid); LISTDELETE(wp, link, rlink); if (wp->route) { /* fprintf(stderr, "removeaninput() xii %ld\n", wp->route); */ XtRemoveInput(wp->route); wp->route = 0; } MY_FREE(wp); } while ((wp = active->link) != active) { #ifdef DEBUG fprintf(stderr, "stop_workers() killing 0x%x\n", wp->tid); #endif pvm_kill(wp->tid); LISTDELETE(wp, link, rlink); if (wp->route) { /* fprintf(stderr, "removeaninput() xii %ld\n", wp->route); */ XtRemoveInput(wp->route); wp->route = 0; } MY_FREE(wp); } nworkers = 0; setlabel(); return 0; } do_recalc() { struct worker *wp; struct job *jp; int ht = imCan.cn_ht; int i; /* toss anything that's already on the todo list */ while ((jp = todo->link) != todo) { LISTDELETE(jp, link, rlink); MY_FREE(jp); } /* scrub in-progress jobs */ for (wp = active; (wp = wp->link) != active; ) wp->job->tile = -1; /* fill it with new tiles */ ntiles = ht / TILEHEIGHT + 1; for (i = 0; i < ntiles; i += 8) { jp = TALLOC(1, struct job, "job"); jp->tile = i; LISTPUTBEFORE(todo, jp, link, rlink); } for (i = 4; i < ntiles; i += 8) { jp = TALLOC(1, struct job, "job"); jp->tile = i; LISTPUTBEFORE(todo, jp, link, rlink); } for (i = 2; i < ntiles; i += 4) { jp = TALLOC(1, struct job, "job"); jp->tile = i; LISTPUTBEFORE(todo, jp, link, rlink); } for (i = 1; i < ntiles; i += 2) { jp = TALLOC(1, struct job, "job"); jp->tile = i; LISTPUTBEFORE(todo, jp, link, rlink); } assign_work(); return 0; } /* assign_work() * * Send off tiles to idle workers. */ assign_work() { struct job *jp; struct worker *wp; double im1 = imCan.cn_im1; double im2 = imCan.cn_im2 - im1; int ht = imCan.cn_ht; int wd = imCan.cn_wd; double reim[4]; /* tile corner coords */ int wdht[2]; /* tile wd, ht */ int y1, y2; reim[0] = imCan.cn_re1; reim[2] = imCan.cn_re2; wdht[0] = wd; while (idle->link != idle && todo->link != todo) { jp = todo->link; LISTDELETE(jp, link, rlink); y2 = ((jp->tile + 1) * ht) / ntiles; y1 = (jp->tile * ht) / ntiles; reim[1] = im1 + (y1 * im2) / ht; reim[3] = im1 + (y2 * im2) / ht; wdht[1] = y2 - y1; wp = idle->link; LISTDELETE(wp, link, rlink); LISTPUTBEFORE(active, wp, link, rlink); wp->job = jp; #ifdef DEBUG fprintf(stderr, "sent job %d to 0x%x: %dx%d %f,%f/%f,%f\n", jp->tile, wp->tid, wdht[0], wdht[1], reim[0], reim[1], reim[2], reim[3]); #endif pvm_packf("%+ %2lx %2d", PvmDataDefault, reim, wdht); if (pvm_send(wp->tid, JobSend)) { pvm_exit(); exit(1); } if (dobars) label_row(y1, y2, wp->tid); } /* * we must check receive here because messages may have arrived * while we were sending, so the socket will not be ready to * read to wake us up. a bit sick. */ while (pvm_nrecv(-1, -1) > 0) claim_message(); return 0; } claim_message() { struct job *jp; struct worker *wp; int tag; int tid; /* id of sender */ int wd = imCan.cn_wd; int ht = imCan.cn_ht; double im1 = imCan.cn_im1; double im2 = imCan.cn_im2 - im1; double reim[4]; /* tile corner coords */ int wdht[2]; /* tile wd, ht */ int y1, y2; /* tile start, end rows */ int h; /* height of tile */ pvm_bufinfo(pvm_getrbuf(), (int*)0, &tag, &tid); #ifdef DEBUG fprintf(stderr, "message %d from 0x%x\n", tag, tid); #endif if (tag == AddMessage) { host_add(); } else if (tag == DelMessage) { host_delete(); } else if (tag == ExitMessage) { pvm_upkint(&tid, 1, 1); for (wp = idle->link; wp != idle; wp = wp->link) { if (wp->tid == tid) { LISTDELETE(wp, link, rlink); if (wp->route) { /* fprintf(stderr, "removeaninput() xii %ld\n", wp->route); */ XtRemoveInput(wp->route); wp->route = 0; } MY_FREE(wp); nworkers--; setlabel(); goto tryagain; } } for (wp = active->link; wp != active; wp = wp->link) { if (wp->tid == tid) { int i; LISTDELETE(wp, link, rlink); jp = wp->job; if (jp->tile >= 0) { LISTPUTAFTER(todo, jp, link, rlink); y1 = (jp->tile * ht) / ntiles; y2 = ((jp->tile + 1) * ht) / ntiles; h = y2 - y1; for (i = wd * h; i-- > 0; ) *((char*)imCan.cn_dat + y1 * wd + i) = 32; /* BZERO((char*)imCan.cn_dat + y1 * wd, wd * h); */ repaint_region(&imCan, 0, y1, wd - 1, y2 - 1); refresh_region(&imCan, 0, y1, wd - 1, y2 - 1); } else { MY_FREE(jp); } if (wp->route) { /* fprintf(stderr, "removeaninput() xii %ld\n", wp->route); */ XtRemoveInput(wp->route); wp->route = 0; } MY_FREE(wp); nworkers--; setlabel(); /* assign_work(); */ goto tryagain; } } tryagain: gotmorehosts(); /* hope we can start another */ } else if (tag == JobReturn) { for (wp = active->link; wp != active; wp = wp->link) if (wp->tid == tid) break; if (wp == active) { fprintf(stderr, "bogus message?\n"); return 0; } LISTDELETE(wp, link, rlink); jp = wp->job; if (jp->tile >= 0) { #ifdef DEBUG fprintf(stderr, "got job %d from 0x%x\n", jp->tile, wp->tid); #endif y1 = (jp->tile * ht) / ntiles; y2 = ((jp->tile + 1) * ht) / ntiles; h = y2 - y1; pvm_unpackf("%*c", wd * h, (char*)imCan.cn_dat + y1 * wd); if (dobars) label_row(y1, y2, wp->tid); repaint_region(&imCan, 0, y1, wd - 1, y2 - 1); refresh_region(&imCan, 0, y1, wd - 1, y2 - 1); } MY_FREE(jp); /* put work server back on free list */ LISTPUTBEFORE(idle, wp, link, rlink); /* assign more work if available */ assign_work(); } else if (tag == RouteAddTag) { int tid, fd; XtInputId xii; pvm_unpackf("%d %d", &tid, &fd); fprintf(stderr, "got route add notify tid 0x%x fd %d\n", tid, fd); for (wp = idle->link; wp != idle; wp = wp->link) if (wp->tid == tid) break; if (wp == idle) for (wp = active->link; wp != active; wp = wp->link) if (wp->tid == tid) break; if (wp == active) { fprintf(stderr, "route add notify for worker not mine tid 0x%x\n", tid); } else { addaninputfile(fd, &wp->route); pvm_notify(PvmRouteDelete, RouteDeleteTag, 1, &tid); } } else if (tag == RouteDeleteTag) { int tid, fd; XtInputId xii; pvm_unpackf("%d %d", &tid, &fd); fprintf(stderr, "got route delete notify tid 0x%x fd %d\n", tid, fd); for (wp = idle->link; wp != idle; wp = wp->link) if (wp->tid == tid) break; if (wp == idle) for (wp = active->link; wp != active; wp = wp->link) if (wp->tid == tid) break; if (wp == active) { fprintf(stderr, "route delete notify for worker not mine tid 0x%x\n", tid); } else if (wp->route) { /* removeaninputfile(wp->route); */ /* fprintf(stderr, "removeaninput() xii %ld\n", wp->route); */ XtRemoveInput(wp->route); wp->route = 0; } } return 0; } int gotmorehosts() { #ifdef DEBUG fprintf(stderr, "host added\n"); #endif more_workers(); assign_work(); return 0; } ./pvm3/xep/imp.c0000644007401100740110000003602607052601544012313 0ustar kohlkohl static char rcsid[] = "$Id: imp.c,v 1.4 2000/02/16 20:07:00 pvmsrc Exp $"; /* * PVM version 3.4: Parallel Virtual Machine System * University of Tennessee, Knoxville TN. * Oak Ridge National Laboratory, Oak Ridge TN. * Emory University, Atlanta GA. * Authors: J. J. Dongarra, G. E. Fagg, M. Fischer * G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci, * P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam * (C) 1997 All Rights Reserved * * NOTICE * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted * provided that the above copyright notice appear in all copies and * that both the copyright notice and this permission notice appear in * supporting documentation. * * Neither the Institutions (Emory University, Oak Ridge National * Laboratory, and University of Tennessee) nor the Authors make any * representations about the suitability of this software for any * purpose. This software is provided ``as is'' without express or * implied warranty. * * PVM version 3 was funded in part by the U.S. Department of Energy, * the National Science Foundation and the State of Tennessee. */ /* * imp.c * * X device-independent image display * * Oct 95 Manchek */ #ifdef HASSTDLIB #include #endif #include #include #include #include #include #include #include #include #include #include #include #include "../src/bfunc.h" #include "myalloc.h" #include "imp.h" #define MTALLOC(n,t,g) (t*)malloc((n)*sizeof(t)) #ifndef min #define min(a,b) ((a)<(b)?(a):(b)) #endif #ifndef max #define max(a,b) ((a)>(b)?(a):(b)) #endif #ifndef NCMV #define NCMV 128 #endif #define byteswide(w) (((w)+7)/8) #ifdef __ProtoGlarp__ #undef __ProtoGlarp__ #endif #if defined(__STDC__) || defined(__cplusplus) #define __ProtoGlarp__(x) x #else #define __ProtoGlarp__(x) () #endif static int mkrbow __ProtoGlarp__ (( unsigned int *, unsigned int *, unsigned int *, int, int )); /*************** ** Globals ** ** ** ***************/ extern Display *xDisp; /* from xep.c */ static Colormap myCmap = 0; static Visual *myVisual = 0; static GC myGC = 0; /* canvas painting gc */ static unsigned long *cmapColors = 0; static unsigned int *lutr = 0; /* lut for non-colormapped displays */ static unsigned int *lutg = 0; static unsigned int *lutb = 0; static int ncmv = 0; static int isMono = 0; static int nPlanes = 0; /* display depth */ static int revByte = 0; /* X server byte order is opposite ours */ static int bimbo = 0; /* bitmap bit order */ static int xBpp = 0; /* ximage bits per pixel */ static int xBypp = 0; /* ximage bytes per pixel */ static int redMask = 0; static int redShift = 0; static int greenMask = 0; static int greenShift = 0; static int blueMask = 0; static int blueShift = 0; /*************** ** Xt Gorp ** ** ** ***************/ /* * Ordered dither for worst case / binary displays */ u_char ditclass[8][8] = { 2, 130, 34, 162, 10, 138, 42, 170, 194, 66, 226, 98, 202, 74, 234, 106, 50, 178, 18, 146, 58, 186, 26, 154, 242, 114, 210, 82, 250, 122, 218, 90, 14, 142, 46, 174, 6, 134, 38, 166, 206, 78, 238, 110, 198, 70, 230, 102, 62, 190, 30, 158, 54, 182, 22, 150, 254, 126, 222, 94, 246, 118, 214, 86 }; setup_color(cnp, forcemono, falsecolor) struct canvas *cnp; int forcemono; int falsecolor; { int i, j; XColor colr; unsigned int rbor[NCMV], rbog[NCMV], rbob[NCMV]; unsigned int mbo = 0x04030201; /* to test machine byte order */ int xScrn = DefaultScreen(xDisp); XGCValues xgcv; XWindowAttributes wat; XGetWindowAttributes(xDisp, cnp->cn_win, &wat); nPlanes = wat.depth; myVisual = wat.visual; myCmap = wat.colormap; if (cmapColors && ncmv > 0) { XFreeColors(xDisp, myCmap, cmapColors, ncmv, (long)0); MY_FREE(cmapColors); } cmapColors = 0; ncmv = 0; if (lutr) MY_FREE(lutr); if (lutg) MY_FREE(lutg); if (lutb) MY_FREE(lutb); lutr = lutg = lutb = 0; if (myGC) XFreeGC(xDisp, myGC); xgcv.function = GXcopy; xgcv.background = BlackPixel(xDisp, xScrn); xgcv.foreground = WhitePixel(xDisp, xScrn); myGC = XCreateGC(xDisp, cnp->cn_win, GCBackground|GCForeground|GCFunction, &xgcv); revByte = (ImageByteOrder(xDisp) == MSBFirst) ? 1 : 0; if (*(char *)&mbo == 4) revByte = !revByte; bimbo = BitmapBitOrder(xDisp); if (!forcemono && nPlanes > 1) { isMono = 0; if (myVisual->class == TrueColor || myVisual->class == DirectColor) { XPixmapFormatValues *pfv; int i; if (!(pfv = XListPixmapFormats(xDisp, &i))) { fprintf(stderr, "can't get pixmap format list for screen\n"); exit(1); } while (--i >= 0) if (pfv[i].depth == nPlanes) break; if (i < 0) { fprintf(stderr, "no pixmap format matches screen depth?\n"); exit(1); } xBpp = pfv[i].bits_per_pixel; xBypp = xBpp / 8; redMask = myVisual->red_mask; redShift = ffs(redMask & ~(redMask >> 1)) - 8; greenMask = myVisual->green_mask; greenShift = ffs(greenMask & ~(greenMask >> 1)) - 8; blueMask = myVisual->blue_mask; blueShift = ffs(blueMask & ~(blueMask >> 1)) - 8; #ifdef DEBUG fprintf(stderr, "np %d r 0x%x %d g 0x%x %d b 0x%x %d bpp %d bypp %d\n", nPlanes, redMask, redShift, greenMask, greenShift, blueMask, blueShift, xBpp, xBypp); #endif lutr = TALLOC(256, unsigned int, "lut"); lutg = TALLOC(256, unsigned int, "lut"); lutb = TALLOC(256, unsigned int, "lut"); if (falsecolor) mkrbow(lutr, lutg, lutb, 256, 256); else for (i = 0; i < 256; i++) lutr[i] = lutg[i] = lutb[i] = i; return 0; } else { cmapColors = TALLOC(NCMV, unsigned long, "cmap"); ncmv = NCMV; while (ncmv > 3) { #ifdef DEBUG fprintf(stderr, "setup_color() trying %d cells\n", ncmv); #endif j = 17 - ffs(ncmv); if (falsecolor) mkrbow(rbor, rbog, rbob, 65536, ncmv); for (i = 0; i < ncmv; i++) { if (falsecolor) { colr.red = rbor[i]; colr.green = rbog[i]; colr.blue = rbob[i]; } else colr.red = colr.green = colr.blue = (i * 65536) / ncmv; if (!XAllocColor(xDisp, myCmap, &colr)) { if (i > 0) { #ifdef DEBUG fprintf(stderr, "recycling %d color cells\n", i); #endif XFreeColors(xDisp, myCmap, cmapColors, i, (long)0); } break; } cmapColors[i] = colr.pixel; } if (i == ncmv) return 0; /* ncmv = i; */ ncmv /= 2; } fputs("couldn't alloc enough color cells\n", stderr); MY_FREE(cmapColors); cmapColors = 0; } } isMono = 1; fputs("display is binary, it's not gonna look great...\n", stderr); return 0; } /* mkrbow() * * Generate a rainbow lookup table. 0 is black, len-1 is white, and entries * between those two go through the spectrum from red to violet. * Output values are from 0 to mxval-1. */ static int mkrbow(r, g, b, mxval, len) unsigned int *r, *g, *b; /* red, grn, blu lut return */ int mxval; /* max value */ int len; /* number of entries (length of r, g, b) */ { int i, j; double d, e; for (i = 1; i < len - 1; i++) { j = len - 1 - i; d = (d = cos((double)((j - len * 0.16) * (3.1415926535 / len)))) < 0.0 ? 0.0 : d; b[i] = d * mxval; d = (d = cos((double)((j - len * 0.52) * (3.1415926535 / len)))) < 0.0 ? 0.0 : d; g[i] = d * mxval; d = (d = cos((double)((j - len * .83) * (3.1415926535 / len)))) < 0.0 ? 0.0 : d; e = (e = cos((double)(j * (3.1415926535 / len)))) < 0.0 ? 0.0 : e; r[i] = d * mxval + e * (mxval / 2); } r[i] = g[i] = b[i] = mxval - 1; r[0] = g[0] = b[0] = 0; return 0; } /* bsw() * * Byteswap an integer. */ bsw(p, n) char *p; int n; { char c; char *q; switch (n) { case 4: c = p[0]; p[0] = p[3]; p[3] = c; c = p[1]; p[1] = p[2]; p[2] = c; break; case 8: c = p[0]; p[0] = p[7]; p[7] = c; c = p[1]; p[1] = p[6]; p[6] = c; c = p[2]; p[2] = p[5]; p[5] = c; c = p[3]; p[3] = p[4]; p[4] = c; break; case 2: c = p[0]; p[0] = p[1]; p[1] = c; break; default: q = p + n - 1; while (p < q) { c = *p; *p++ = *q; *q-- = c; } break; } return 0; } /* repaint_region() * * Replot XImage from its underlying image. */ repaint_region(cnp, x1, y1, x2, y2) struct canvas *cnp; int x1, y1, x2, y2; /* image coordinates */ { char *ximbuf; /* ximage data */ u_char *ribuf; /* src image data */ if (x1 < cnp->cn_ox) x1 = cnp->cn_ox; if (y1 < cnp->cn_oy) y1 = cnp->cn_oy; if (++x2 > cnp->cn_wd) x2 = cnp->cn_wd; if (++y2 > cnp->cn_ht) y2 = cnp->cn_ht; ximbuf = cnp->cn_xim->data; ribuf = cnp->cn_dat; if (isMono) { /* * binary display - XXX region not done yet */ int sx, sy; /* source x, y counter */ int dx, dy; /* dest x, y counter */ int xa, ya; unsigned char *sa; char *da; u_char pxa; u_char msks[8]; int lbs; for (lbs = 0; lbs < 8; lbs++) if (bimbo == LSBFirst) msks[lbs] = 1 << lbs; else msks[7 - lbs] = 1 << lbs; sy = cnp->cn_oy; dy = 0; ya = 0; while (sy < cnp->cn_ht && dy < cnp->cn_ht) { sx = cnp->cn_ox; dx = 0; xa = 0; sa = ribuf + sy * cnp->cn_wd + sx; da = ximbuf + dy * cnp->cn_xim->bytes_per_line; pxa = 0; while (sx < cnp->cn_wd && dx < cnp->cn_wd) { if (*sa > ditclass[dx & 7][dy & 7]) pxa |= msks[dx & 7]; if (!(++dx & 7)) { *da++ = pxa; pxa = 0; } if (++xa >= cnp->cn_zoom) { xa = 0; sx++; sa++; } } if (dx & 7) *da++ = pxa; dy++; if (++ya >= cnp->cn_zoom) { ya = 0; sy++; } } } else if (cmapColors) { /* * colormapped display */ int sx, sy; /* source x, y counter */ int dx, dy; /* dest x, y counter */ int xa, ya; unsigned char *sa; char *da; sy = y1; dy = (y1 - cnp->cn_oy) * cnp->cn_zoom; ya = 0; while (sy < y2 && dy < cnp->cn_ht) { sx = x1; dx = (x1 - cnp->cn_ox) * cnp->cn_zoom; xa = 0; sa = ribuf + sy * cnp->cn_wd + sx; da = ximbuf + dy * cnp->cn_xim->bytes_per_line + dx; while (sx < x2 && dx < cnp->cn_wd) { *da = cmapColors[(*sa * ncmv) / 256]; da++; dx++; if (++xa >= cnp->cn_zoom) { xa = 0; sx++; sa++; } } dy++; if (++ya >= cnp->cn_zoom) { ya = 0; sy++; } } } else { /* * non-colormapped display */ int sx, sy; /* source x, y counter */ int dx, dy; /* dest x, y counter */ int xa, ya; unsigned char *sa; char *da; if (xBypp == sizeof(unsigned int)) { unsigned int pixv; unsigned int ps, pixr, pixg, pixb; sy = y1; dy = (y1 - cnp->cn_oy) * cnp->cn_zoom; ya = 0; while (sy < y2 && dy < cnp->cn_ht) { sx = x1; dx = (x1 - cnp->cn_ox) * cnp->cn_zoom; xa = 0; sa = ribuf + sy * cnp->cn_wd + sx; da = ximbuf + dy * cnp->cn_xim->bytes_per_line + dx * xBypp; while (sx < x2 && dx < cnp->cn_wd) { ps = 0xff & *sa; pixr = lutr[ps]; pixg = lutg[ps]; pixb = lutb[ps]; if (redShift >= 0) pixv = redMask & (pixr << redShift); else pixv = redMask & (pixr >> -redShift); if (greenShift >= 0) pixv |= greenMask & (pixg << greenShift); else pixv |= greenMask & (pixg >> -greenShift); if (blueShift >= 0) pixv |= blueMask & (pixb << blueShift); else pixv |= blueMask & (pixb >> -blueShift); if (revByte) bsw((char *)&pixv, (int) sizeof(pixv)); *((unsigned int *)da) = pixv; da += xBypp; dx++; if (++xa >= cnp->cn_zoom) { xa = 0; sx++; sa++; } } dy++; if (++ya >= cnp->cn_zoom) { ya = 0; sy++; } } } else if (xBypp == sizeof(unsigned short)) { unsigned short pixv; unsigned int ps, pixr, pixg, pixb; sy = y1; dy = (y1 - cnp->cn_oy) * cnp->cn_zoom; ya = 0; while (sy < y2 && dy < cnp->cn_ht) { sx = x1; dx = (x1 - cnp->cn_ox) * cnp->cn_zoom; xa = 0; sa = ribuf + sy * cnp->cn_wd + sx; da = ximbuf + dy * cnp->cn_xim->bytes_per_line + dx * xBypp; while (sx < x2 && dx < cnp->cn_wd) { ps = 0xff & *sa; pixr = lutr[ps]; pixg = lutg[ps]; pixb = lutb[ps]; if (redShift >= 0) pixv = redMask & (pixr << redShift); else pixv = redMask & (pixr >> -redShift); if (greenShift >= 0) pixv |= greenMask & (pixg << greenShift); else pixv |= greenMask & (pixg >> -greenShift); if (blueShift >= 0) pixv |= blueMask & (pixb << blueShift); else pixv |= blueMask & (pixb >> -blueShift); if (revByte) bsw((char *)&pixv, (int) sizeof(pixv)); *((unsigned short *)da) = pixv; da += xBypp; dx++; if (++xa >= cnp->cn_zoom) { xa = 0; sx++; sa++; } } dy++; if (++ya >= cnp->cn_zoom) { ya = 0; sy++; } } } else if (xBypp == sizeof(unsigned char)) { unsigned char pixv; unsigned int ps, pixr, pixg, pixb; sy = y1; dy = (y1 - cnp->cn_oy) * cnp->cn_zoom; ya = 0; while (sy < y2 && dy < cnp->cn_ht) { sx = x1; dx = (x1 - cnp->cn_ox) * cnp->cn_zoom; xa = 0; sa = ribuf + sy * cnp->cn_wd + sx; da = ximbuf + dy * cnp->cn_xim->bytes_per_line + dx * xBypp; while (sx < x2 && dx < cnp->cn_wd) { ps = 0xff & *sa; pixr = lutr[ps]; pixg = lutg[ps]; pixb = lutb[ps]; if (redShift >= 0) pixv = redMask & (pixr << redShift); else pixv = redMask & (pixr >> -redShift); if (greenShift >= 0) pixv |= greenMask & (pixg << greenShift); else pixv |= greenMask & (pixg >> -greenShift); if (blueShift >= 0) pixv |= blueMask & (pixb << blueShift); else pixv |= blueMask & (pixb >> -blueShift); *((unsigned char *)da) = pixv; da += xBypp; dx++; if (++xa >= cnp->cn_zoom) { xa = 0; sx++; sa++; } } dy++; if (++ya >= cnp->cn_zoom) { ya = 0; sy++; } } } else { fprintf(stderr, "aaugh, i can't do %d byte true color pixels\n", xBypp); exit(1); } } return 0; } /* cre_xim() * * Create (or change) XImage for a canvas. */ cre_xim(cnp) struct canvas *cnp; { char *ximbuf; int wd = cnp->cn_wd; int ht = cnp->cn_ht; if (cnp->cn_xim) XDestroyImage(cnp->cn_xim); if (isMono) { ximbuf = MTALLOC(byteswide(wd) * ht, char, "imb"); cnp->cn_xim = XCreateImage(xDisp, myVisual, 1, XYBitmap, 0, ximbuf, wd, ht, 8, byteswide(wd)); } else if (cmapColors) { ximbuf = MTALLOC(wd * ht, char, "imb"); cnp->cn_xim = XCreateImage(xDisp, myVisual, nPlanes, ZPixmap, 0, ximbuf, wd, ht, 8, wd); } else { ximbuf = MTALLOC(wd * ht * xBypp, char, "imb"); cnp->cn_xim = XCreateImage(xDisp, myVisual, nPlanes, ZPixmap, 0, ximbuf, wd, ht, xBpp, wd * xBypp); } return 0; } /* refresh_region() * * Refresh a canvas window. */ refresh_region(cnp, x1, y1, x2, y2) struct canvas *cnp; int x1, y1, x2, y2; { XPutImage(xDisp, cnp->cn_win, myGC, cnp->cn_xim, x1, y1, x1, y1, x2 - x1 + 1, y2 - y1 + 1); return 0; } ./pvm3/xep/hostc.h0000644007401100740110000000416706741172516012662 0ustar kohlkohl /* $Id: hostc.h,v 1.3 1999/07/08 19:00:30 kohl Exp $ */ /* * PVM version 3.4: Parallel Virtual Machine System * University of Tennessee, Knoxville TN. * Oak Ridge National Laboratory, Oak Ridge TN. * Emory University, Atlanta GA. * Authors: J. J. Dongarra, G. E. Fagg, M. Fischer * G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci, * P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam * (C) 1997 All Rights Reserved * * NOTICE * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted * provided that the above copyright notice appear in all copies and * that both the copyright notice and this permission notice appear in * supporting documentation. * * Neither the Institutions (Emory University, Oak Ridge National * Laboratory, and University of Tennessee) nor the Authors make any * representations about the suitability of this software for any * purpose. This software is provided ``as is'' without express or * implied warranty. * * PVM version 3 was funded in part by the U.S. Department of Energy, * the National Science Foundation and the State of Tennessee. */ /* * hostc.h * * Host cache definitions. * * $Log: hostc.h,v $ * Revision 1.3 1999/07/08 19:00:30 kohl * Fixed "Log" keyword placement. * - indent with " * " for new CVS. * * Revision 1.2 1997/07/09 13:56:51 pvmsrc * Fixed Author Header. * * Revision 1.1 1996/09/23 22:52:54 pvmsrc * Initial revision * */ struct hostc { struct hostc *link, *rlink; int pvmd_tid; char *name; char *alias; char *arch; int speed; struct timeval delta; }; int host_init __ProtoGlarp__(( int atag, int dtag, int (*acb)(), int (*dcb)() )); int host_add __ProtoGlarp__(( void )); int host_delete __ProtoGlarp__(( void )); struct hostc *host_findtid __ProtoGlarp__(( int tid )); struct hostc *host_findname __ProtoGlarp__(( char *name )); struct hostc *host_next __ProtoGlarp__(( struct hostc *hp )); int host_show __ProtoGlarp__(( void )); ./pvm3/xep/mtile.c0000644007401100740110000000704106360714250012633 0ustar kohlkohl static char rcsid[] = "$Id: mtile.c,v 1.2 1997/07/09 13:56:56 pvmsrc Exp $"; /* * PVM version 3.4: Parallel Virtual Machine System * University of Tennessee, Knoxville TN. * Oak Ridge National Laboratory, Oak Ridge TN. * Emory University, Atlanta GA. * Authors: J. J. Dongarra, G. E. Fagg, M. Fischer * G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci, * P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam * (C) 1997 All Rights Reserved * * NOTICE * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted * provided that the above copyright notice appear in all copies and * that both the copyright notice and this permission notice appear in * supporting documentation. * * Neither the Institutions (Emory University, Oak Ridge National * Laboratory, and University of Tennessee) nor the Authors make any * representations about the suitability of this software for any * purpose. This software is provided ``as is'' without express or * implied warranty. * * PVM version 3 was funded in part by the U.S. Department of Energy, * the National Science Foundation and the State of Tennessee. */ /* * mtile.c * * Mandelbrot tile calculation server. * Receives a request to calculate a tile, generates the tile, and * sends it back. * * 3 Jun 1991 Robert Manchek manchek@CS.UTK.EDU. * 2 Dec 91 check for null argv[0] * 02 Sep 92 - ported to v3 */ #ifdef HASSTDLIB #include #endif #include #include #include #include "pvm3.h" char* calc_tile(); main(argc, argv) int argc; char **argv; { int mytid; /* my task id */ int mastertid; /* who sent us this tile */ double x1, y1, x2, y2; /* tile corner coordinates */ int wd, ht; /* size of tile */ char *pix; /* calculated image */ int mid; mytid = pvm_mytid(); /* loop forever reading sizes and coords of tiles we should calculate */ while ((mid = pvm_recv(-1, 1)) > 0) { pvm_bufinfo(mid, (int*)0, (int*)0, &mastertid); pvm_unpackf("%lf %lf %lf %lf %d %d", &x1, &y1, &x2, &y2, &wd, &ht); /* fprintf(stderr, "%dx%d tile between %f,%f and %f,%f\n", wd, ht, x1, y1, x2, y2); */ pix = calc_tile(x1, y1, x2, y2, wd, ht); pvm_packf("%+ %*c", PvmDataDefault, wd * ht, pix); /* umbuf_dump(pvm_getsbuf(), 1); */ /* pvm_packf("%+ %*c", PvmDataInPlace, wd * ht, pix); */ if (pvm_send(mastertid, 2)) { fprintf(stderr, "error sending image back\n"); } free(pix); } fprintf(stderr, "error receiving work to do\n"); pvm_exit(); exit(1); } char* calc_tile(x1, y1, x2, y2, wd, ht) double x1, y1, x2, y2; /* tile corner coords */ int wd, ht; /* size of tile */ { char *pix; /* calculated image */ int ix, iy; /* pixel coords */ double x, y; /* re, im coords */ register double ar, ai; /* accumulator */ register double a1, a2; register int ite; /* number of iter until divergence */ if (wd < 1 || wd > 2048 || ht < 1 || ht > 2048) { fputs("insane wd/ht\n", stderr); pvm_exit(); exit(1); } pix = (char*)malloc(wd * ht); x2 -= x1; y2 -= y1; for (iy = ht; iy-- > 0; ) { y = (iy * y2) / ht + y1; for (ix = wd; ix-- > 0; ) { x = (ix * x2) / wd + x1; ar = x; ai = y; for (ite = 0; ite < 255; ite++) { a1 = (ar * ar); a2 = (ai * ai); if (a1 + a2 > 4.0) break; ai = 2 * ai * ar + y; ar = a1 - a2 + x; } pix[iy * wd + ix] = ~ite; } } return pix; } ./pvm3/xep/PMAX/0000755007401100740110000000000011141631057012114 5ustar kohlkohl./pvm3/xep/PMAX/Makefile0000644007401100740110000000204706334376062013571 0ustar kohlkohl# # $Id: Makefile,v 1.3 1997/05/08 16:15:46 pvmsrc Exp $ # # # Generic Makefile body to be concatenated to config header. # # Imports: # PVM_ARCH = the official pvm-name of your processor # ARCHCFLAGS = special cc flags # ARCHLIB = special libs needed for daemon # PVMDIR = ../.. PVMIDIR = $(PVMDIR)/include PVMLDIR = $(PVMDIR)/lib/$(PVM_ARCH) PVMLIB = -lpvm3 SDIR = $(PVMDIR)/xep BDIR = $(PVMDIR)/bin XDIR = $(BDIR)/$(PVM_ARCH) CFLOPTS = -O CFLAGS = $(CFLOPTS) -I$(PVMIDIR) -L$(PVMLDIR) $(ARCHCFLAGS) LIBS = $(PVMLIB) $(ARCHLIB) XLIBS = -lXaw -lXmu-mit -lXext-mit -lXt-mit -lX11-mit XCFLAGS = -I/usr/include/mit default: mtile xep all: mmain mtile xep $(XDIR): - mkdir $(BDIR) - mkdir $(XDIR) mmain: $(SDIR)/mmain.c $(XDIR) $(CC) $(CFLAGS) -o mmain $(SDIR)/mmain.c $(LIBS) mv mmain $(XDIR) mtile: $(SDIR)/mtile.c $(XDIR) $(CC) $(CFLAGS) -o mtile $(SDIR)/mtile.c $(LIBS) -lm mv mtile $(XDIR) xep: $(SDIR)/xep.c $(XDIR) $(CC) $(XCFLAGS) $(CFLAGS) -o xep $(SDIR)/xep.c $(XLIBS) $(LIBS) -lm mv xep $(XDIR) clean: rm -f mmain mtile xep *.o ./pvm3/xep/redo.xbm0000644007401100740110000000101406221611566013012 0ustar kohlkohl#define redo_width 24 #define redo_height 24 static char redo_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x07, 0x20, 0x00, 0x04, 0x20, 0xf8, 0x05, 0x20, 0x08, 0x05, 0x20, 0x08, 0x05, 0x20, 0x08, 0x05, 0x20, 0xf8, 0x05, 0x20, 0x00, 0x04, 0x20, 0x00, 0x04, 0x20, 0x00, 0x04, 0xe0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; ./pvm3/xep/quit.xbm0000644007401100740110000000056606221611565013055 0ustar kohlkohl#define quit_width 16 #define quit_height 24 static char quit_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0xc0, 0x01, 0xe0, 0x03, 0xf0, 0x07, 0xf8, 0x0f, 0xfc, 0x1f, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1f, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; ./pvm3/xep/neww.xbm0000644007401100740110000000101406221611562013035 0ustar kohlkohl#define neww_width 24 #define neww_height 24 static char neww_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x08, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x49, 0x00, 0x80, 0x88, 0x00, 0x40, 0x08, 0x01, 0xe0, 0x9c, 0x03, 0xe0, 0x9c, 0x03, 0xe0, 0x9c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; ./pvm3/xep/Makefile.aimk0000644007401100740110000000345106401555014013733 0ustar kohlkohl# # $Id: Makefile.aimk,v 1.6 1997/08/29 14:17:48 pvmsrc Exp $ # # Generic Makefile body to be concatenated to config header. # # Imports: # PVM_ARCH = the official pvm-name of your processor # ARCHCFLAGS = special cc flags # ARCHLIB = special libs needed for daemon # SHELL = /bin/sh PVMDIR = ../.. PVMIDIR = $(PVMDIR)/include PVMLDIR = $(PVMDIR)/lib/$(PVM_ARCH) PVMLIB = pvm3 LIBPREFIX = lib PVMLIBDEP = $(PVMLDIR)/$(LIBPREFIX)$(PVMLIB).a SDIR = $(PVMDIR)/xep BDIR = $(PVMDIR)/bin XDIR = $(BDIR)/$(PVM_ARCH) #CFLOPTS = -O CFLOPTS = -g CFLAGS = $(CFLOPTS) -I$(PVMIDIR) -L$(PVMLDIR) $(ARCHCFLAGS) LIBS = -l$(PVMLIB) $(ARCHLIB) $(OS2XEPLIBS) XLIBS = -lXaw -lXmu -lXext -lXt -lX11 XCFLAGS = -I/usr/local/X11R5/include -I/usr/local/X11/include \ -L/usr/local/X11R5/lib -L/usr/local/X11/lib HEADERS = $(SDIR)/hostc.h $(SDIR)/imp.h $(SDIR)/myalloc.h \ $(PVMIDIR)/pvm3.h $(PVMDIR)/src/bfunc.h default: mtile$(EXESFX) xep$(EXESFX) all: mmain$(EXESFX) mtile$(EXESFX) xep$(EXESFX) $(XDIR): - mkdir $(BDIR) - mkdir $(XDIR) mmain$(EXESFX): $(SDIR)/mmain.c $(XDIR) $(PVMLIBDEP) $(CC) $(CFLAGS) -o $@ $(SDIR)/mmain.c $(LIBS) mv $@ $(XDIR) mtile$(EXESFX): $(SDIR)/mtile.c $(XDIR) $(PVMLIBDEP) $(CC) $(CFLAGS) -o $@ $(SDIR)/mtile.c $(LIBS) -lm mv $@ $(XDIR) xep$(EXESFX): xep.o hostc.o calc.o imp.o $(XDIR) $(PVMLIBDEP) $(CC) $(XCFLAGS) $(CFLAGS) -o $@ xep.o calc.o imp.o hostc.o \ $(XLIBS) $(LIBS) -lm mv $@ $(XDIR) clean: rm -f mmain$(EXESFX) mtile$(EXESFX) xep$(EXESFX) *.o xep.o: $(SDIR)/xep.c $(HEADERS) $(CC) $(XCFLAGS) $(CFLAGS) -c $(SDIR)/xep.c imp.o: $(SDIR)/imp.c $(HEADERS) $(CC) $(XCFLAGS) $(CFLAGS) -c $(SDIR)/imp.c calc.o: $(SDIR)/calc.c $(HEADERS) $(CC) $(XCFLAGS) $(CFLAGS) -c $(SDIR)/calc.c hostc.o: $(SDIR)/hostc.c $(HEADERS) $(CC) $(XCFLAGS) $(CFLAGS) -c $(SDIR)/hostc.c ./pvm3/xep/outof.xbm0000644007401100740110000000057106221611563013221 0ustar kohlkohl#define outof_width 16 #define outof_height 24 static char outof_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x43, 0x10, 0x4c, 0x08, 0x50, 0x04, 0x60, 0x04, 0x7c, 0x02, 0x00, 0x02, 0x00, 0x82, 0x01, 0x02, 0x02, 0x04, 0x02, 0x04, 0x02, 0x18, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; ./pvm3/xep/reset.xbm0000644007401100740110000000057106221611567013213 0ustar kohlkohl#define reset_width 16 #define reset_height 24 static char reset_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x70, 0x38, 0x78, 0x3c, 0x7c, 0x3e, 0x7e, 0x3f, 0x7c, 0x3e, 0x78, 0x3c, 0x70, 0x38, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; ./pvm3/xep/xep.c0000644007401100740110000005333306673500152012323 0ustar kohlkohl static char rcsid[] = "$Id: xep.c,v 1.5 1999/03/16 16:01:46 pvmsrc Exp $"; /* * PVM version 3.4: Parallel Virtual Machine System * University of Tennessee, Knoxville TN. * Oak Ridge National Laboratory, Oak Ridge TN. * Emory University, Atlanta GA. * Authors: J. J. Dongarra, G. E. Fagg, M. Fischer * G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci, * P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam * (C) 1997 All Rights Reserved * * NOTICE * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted * provided that the above copyright notice appear in all copies and * that both the copyright notice and this permission notice appear in * supporting documentation. * * Neither the Institutions (Emory University, Oak Ridge National * Laboratory, and University of Tennessee) nor the Authors make any * representations about the suitability of this software for any * purpose. This software is provided ``as is'' without express or * implied warranty. * * PVM version 3 was funded in part by the U.S. Department of Energy, * the National Science Foundation and the State of Tennessee. */ /* * xep.c * * Display pixmap calculated by tiled workers in an X window. * * Nov 92 Manchek * Oct 95 Manchek */ #ifdef HASSTDLIB #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include "../src/bfunc.h" #include "myalloc.h" #include "hostc.h" #include "imp.h" #include "bars.xbm" #include "color.xbm" #include "reset.xbm" #include "quit.xbm" #include "into.xbm" #include "outof.xbm" #ifndef min #define min(a,b) ((a)<(b)?(a):(b)) #endif #ifndef max #define max(a,b) ((a)>(b)?(a):(b)) #endif static void pick(); static void zoom(); static void redraw(); static void configure(); static void pvm_cb(); static void zin_cb(); static void zout_cb(); static void reset_cb(); /*************** ** Globals ** ** ** ***************/ Display *xDisp; XtAppContext context; Widget topLevel = 0; /* main widget */ Widget thelabel1 = 0; Widget thelabel2 = 0; int xScrn; Window xRootW; GC rubGc; /* rubberbox gc */ Cursor crossCr; struct canvas imCan; /* just one image for now */ char *workerfile = 0; int nworkers = 0; /* number of active+idle work servers */ int dobars = 0; /* label tiles with worker number */ /*************** ** Xt Gorp ** ** ** ***************/ char canvasTl[] = "*canvas.translations:\ :pick(start)\\n\ :pick(adjust)\\n\ :pick(end)\\n\ :zoom()\\n\ :pick(modify)\\n\ :pick(adjust)\\n\ :pick(end)\\n\ :redraw()\\n\ :configure()\\n\ "; /* Widget default values */ static char *fallbacks[] = { "*allowShellResize:true", "*quitButton.label:Quit", "*recalcButton.label:Redo", "*workersButton.label:NewWorkers", canvasTl, 0 }; /* To get custom resources */ typedef struct { Bool mono; /* force monochrome display */ Bool fc; /* use false-color graymap */ String worker; /* worker a.out name */ Bool bars; /* display processor id bars */ int n; /* number of workers */ } app_res_t, *app_resp_t; static app_res_t app_res; static XtResource res_list[] = { { "worker", "Worker", XtRString, sizeof(String), XtOffset(app_resp_t, worker), XtRString, "mtile" }, { "monochrome", "Monochrome", XtRBool, sizeof(Bool), XtOffset(app_resp_t, mono), XtRString, "off" }, { "falsecolor", "Falsecolor", XtRBool, sizeof(Bool), XtOffset(app_resp_t, fc), XtRString, "on" }, { "bars", "Bars", XtRBool, sizeof(Bool), XtOffset(app_resp_t, bars), XtRString, "off" }, { "nWorkers", "NWorkers", XtRInt, sizeof(int), XtOffset(app_resp_t, n), XtRString, "-1" }, }; static XrmOptionDescRec knownargs[] = { { "-mono", ".monochrome", XrmoptionNoArg, "on" }, { "+mono", ".monochrome", XrmoptionNoArg, "off" }, { "-fc", ".falsecolor", XrmoptionNoArg, "on" }, { "+fc", ".falsecolor", XrmoptionNoArg, "off" }, { "-worker", ".worker", XrmoptionSepArg, 0 }, { "-bars", ".bars", XrmoptionNoArg, "on" }, { "+bars", ".bars", XrmoptionNoArg, "off" }, { "-n", ".nWorkers", XrmoptionSepArg, 0 }, }; static XtCallbackRec callback[2] = { { 0, 0 }, { 0, 0 } }; static Arg args[16]; static XtActionsRec actbl[] = { { "pick", pick }, { "zoom", zoom }, { "redraw", redraw }, { "configure", configure }, }; main(argc, argv) int argc; char **argv; { int n; XGCValues xgcv; int *fds; srandom(getpid()); n = 0; topLevel = XtAppInitialize(&context, "xep", knownargs, XtNumber(knownargs), &argc, argv, fallbacks, args, n); if (argc > 1) { for (n = 1; n < argc; n++) fprintf(stderr, "unknown option <%s>\n", argv[n]); fputs("options:\n", stderr); fputs(" -worker filename set calculation task name\n", stderr); fputs(" -/+mono force mono mode\n", stderr); fputs(" -/+fc use false-color graymap\n", stderr); fputs(" -/+bars display/don't display processor bars\n", stderr); /* fputs(" -n count set number of workers\n", stderr); */ exit(1); } XtGetApplicationResources(topLevel, (caddr_t)&app_res, res_list, XtNumber(res_list), 0, 0); workerfile = app_res.worker; dobars = app_res.bars; pvminit(); XtAppAddActions(context, actbl, XtNumber(actbl)); xDisp = XtDisplay(topLevel); xScrn = DefaultScreen(xDisp); xRootW = RootWindow(xDisp, xScrn); crossCr = XCreateFontCursor(xDisp, XC_tcross); xgcv.function = GXxor; xgcv.background = BlackPixel(xDisp, xScrn); /* xgcv.foreground = WhitePixel(xDisp, xScrn) ^ BlackPixel(xDisp, xScrn); */ xgcv.foreground = ~0; rubGc = XCreateGC(xDisp, xRootW, GCBackground|GCForeground|GCFunction, &xgcv); create_xep_widget(); more_workers(); do_recalc(); n = pvm_getfds(&fds); #if 0 while (n-- > 0) { #ifdef DEBUG fprintf(stderr, "adding fd %d as input\n", fds[n]); #endif XtAppAddInput(context, fds[n], (XtPointer)XtInputReadMask, pvm_cb, (XtPointer)0); } #endif addaninputfile(fds[0], (XtInputId *)0); XtAppMainLoop(context); } int addaninputfile(fd, xiip) int fd; XtInputId *xiip; { XtInputId xii; xii = XtAppAddInput(context, fd, (XtPointer)XtInputReadMask, pvm_cb, (XtPointer)0); fprintf(stderr, "addaninputfile() fd %d xii %ld\n", fd, xii); if (xiip) *xiip = xii; return 0; } int removeaninputfile(xii) XtInputId xii; { XtRemoveInput(xii); return 0; } static void pvm_cb(cli, src, id) XtPointer cli; int *src; XtInputId *id; { while (pvm_nrecv(-1, -1) > 0) claim_message(); } static void quit_cb(wgt, cli, cd) Widget wgt; caddr_t cli; caddr_t cd; { stop_workers(); pvm_exit(); exit(0); } static void reset_cb(wgt, cli, cd) Widget wgt; caddr_t cli; caddr_t cd; { if (imCan.cn_wd < imCan.cn_ht) { imCan.cn_re1 = -2.0; imCan.cn_im1 = (-2.0 * imCan.cn_ht) / imCan.cn_wd; imCan.cn_re2 = 2.0; imCan.cn_im2 = (2.0 * imCan.cn_ht) / imCan.cn_wd; } else { imCan.cn_re1 = (-2.0 * imCan.cn_wd) / imCan.cn_ht; imCan.cn_im1 = -2.0; imCan.cn_re2 = (2.0 * imCan.cn_wd) / imCan.cn_ht; imCan.cn_im2 = 2.0; } splat_out(imCan.cn_dat, imCan.cn_wd, imCan.cn_ht, 1); repaint_region(&imCan, 0, 0, imCan.cn_wd - 1, imCan.cn_ht - 1); refresh_region(&imCan, 0, 0, imCan.cn_wd - 1, imCan.cn_ht - 1); imCan.cn_x1 = 0; imCan.cn_y1 = 0; imCan.cn_x2 = 0; imCan.cn_y2 = 0; do_recalc(); } static void zout_cb(wgt, cli, cd) Widget wgt; caddr_t cli; caddr_t cd; { double d; d = (imCan.cn_re2 - imCan.cn_re1) / 2; imCan.cn_re1 -= d; imCan.cn_re2 += d; d = (imCan.cn_im2 - imCan.cn_im1) / 2; imCan.cn_im1 -= d; imCan.cn_im2 += d; splat_out(imCan.cn_dat, imCan.cn_wd, imCan.cn_ht, 1); repaint_region(&imCan, 0, 0, imCan.cn_wd - 1, imCan.cn_ht - 1); refresh_region(&imCan, 0, 0, imCan.cn_wd - 1, imCan.cn_ht - 1); imCan.cn_x1 = 0; imCan.cn_y1 = 0; imCan.cn_x2 = 0; imCan.cn_y2 = 0; do_recalc(); } static void zin_cb(wgt, cli, cd) Widget wgt; caddr_t cli; caddr_t cd; { double re1, im1, re2, im2; int wd = imCan.cn_wd; int ht = imCan.cn_ht; int x1 = imCan.cn_x1; int y1 = imCan.cn_y1; int x2 = imCan.cn_x2; int y2 = imCan.cn_y2; int t; if (x1 != x2 && y1 != y2) { if (x1 > x2) { t = x1; x1 = x2; x2 = t; } if (y1 > y2) { t = y1; y1 = y2; y2 = t; } re1 = imCan.cn_re1 + x1 * (imCan.cn_re2 - imCan.cn_re1) / wd; im1 = imCan.cn_im1 + y1 * (imCan.cn_im2 - imCan.cn_im1) / ht; re2 = re1 + (x2 - x1) * (imCan.cn_re2 - imCan.cn_re1) / wd; im2 = im1 + (x2 - x1) * (imCan.cn_im2 - imCan.cn_im1) / wd; imCan.cn_re1 = re1; imCan.cn_im1 = im1; imCan.cn_re2 = re2; imCan.cn_im2 = im2; splat_out(imCan.cn_dat, imCan.cn_wd, imCan.cn_ht, 1); repaint_region(&imCan, 0, 0, imCan.cn_wd - 1, imCan.cn_ht - 1); refresh_region(&imCan, 0, 0, imCan.cn_wd - 1, imCan.cn_ht - 1); imCan.cn_x1 = 0; imCan.cn_y1 = 0; imCan.cn_x2 = 0; imCan.cn_y2 = 0; do_recalc(); } } static void bars_cb(wgt, cli, cd) Widget wgt; caddr_t cli; caddr_t cd; { dobars = !dobars; } static void color_cb(wgt, cli, cd) Widget wgt; caddr_t cli; caddr_t cd; { app_res.fc = !app_res.fc; setup_color(&imCan, app_res.mono, app_res.fc); repaint_region(&imCan, 0, 0, imCan.cn_wd - 1, imCan.cn_ht - 1); refresh_region(&imCan, 0, 0, imCan.cn_wd - 1, imCan.cn_ht - 1); } create_xep_widget() { Widget box, box2; Widget w; int n; char buf[128]; Pixmap pm; n = 0; box = XtCreateManagedWidget("box", formWidgetClass, topLevel, args, n); imCan.cn_re1 = -2.0; imCan.cn_im1 = -2.0; imCan.cn_re2 = 2.0; imCan.cn_im2 = 2.0; n = 0; XtSetArg(args[n], XtNdefaultDistance, 2); n++; XtSetArg(args[n], XtNborderWidth, 0); n++; XtSetArg(args[n], XtNleft, XtChainLeft); n++; XtSetArg(args[n], XtNright, XtChainLeft); n++; XtSetArg(args[n], XtNtop, XtChainTop); n++; XtSetArg(args[n], XtNbottom, XtChainTop); n++; box2 = XtCreateManagedWidget("box3", formWidgetClass, box, args, n); n = 0; XtSetArg(args[n], XtNborderWidth, 0); n++; w = XtCreateManagedWidget("hosts", labelWidgetClass, box2, args, n); n = 0; XtSetArg(args[n], XtNfromHoriz, w); n++; XtSetArg(args[n], XtNborderWidth, 0); n++; XtSetArg(args[n], XtNlabel, "0"); n++; /* sprintf(buf, "(%.2e,%.2e) (%.2e,%.2e)", imCan.cn_re1, imCan.cn_im1, imCan.cn_re2, imCan.cn_im2); XtSetArg(args[n], XtNlabel, buf); n++; */ thelabel1 = w = XtCreateManagedWidget("thelabel1", labelWidgetClass, box2, args, n); n = 0; XtSetArg(args[n], XtNfromHoriz, w); n++; XtSetArg(args[n], XtNborderWidth, 0); n++; w = XtCreateManagedWidget("workers", labelWidgetClass, box2, args, n); n = 0; XtSetArg(args[n], XtNfromHoriz, w); n++; XtSetArg(args[n], XtNborderWidth, 0); n++; XtSetArg(args[n], XtNlabel, "0"); n++; thelabel2 = w = XtCreateManagedWidget("thelabel2", labelWidgetClass, box2, args, n); n = 0; XtSetArg(args[n], XtNfromVert, box2); n++; XtSetArg(args[n], XtNdefaultDistance, 2); n++; XtSetArg(args[n], XtNborderWidth, 0); n++; XtSetArg(args[n], XtNleft, XtChainLeft); n++; XtSetArg(args[n], XtNright, XtChainLeft); n++; XtSetArg(args[n], XtNtop, XtChainTop); n++; XtSetArg(args[n], XtNbottom, XtChainTop); n++; box2 = XtCreateManagedWidget("box2", formWidgetClass, box, args, n); n = 0; /* XtSetArg(args[n], XtNhorizDistance, 0); n++; XtSetArg(args[n], XtNvertDistance, 0); n++; */ callback[0].callback = (XtCallbackProc)quit_cb; callback[0].closure = (caddr_t)0; XtSetArg(args[n], XtNcallback, callback); n++; pm = XCreatePixmapFromBitmapData(xDisp, xRootW, quit_bits, quit_width, quit_height, 1, 0, 1); XtSetArg(args[n], XtNbitmap, (XtArgVal)pm); n++; w = XtCreateManagedWidget("quitButton", commandWidgetClass, box2, args, n); n = 0; /* XtSetArg(args[n], XtNhorizDistance, 0); n++; XtSetArg(args[n], XtNvertDistance, 0); n++; */ callback[0].callback = (XtCallbackProc)reset_cb; callback[0].closure = (caddr_t)0; XtSetArg(args[n], XtNcallback, callback); n++; XtSetArg(args[n], XtNfromHoriz, w); n++; pm = XCreatePixmapFromBitmapData(xDisp, xRootW, reset_bits, reset_width, reset_height, 1, 0, 1); XtSetArg(args[n], XtNbitmap, (XtArgVal)pm); n++; w = XtCreateManagedWidget("resetButton", commandWidgetClass, box2, args, n); n = 0; callback[0].callback = (XtCallbackProc)zin_cb; callback[0].closure = (caddr_t)0; XtSetArg(args[n], XtNcallback, callback); n++; XtSetArg(args[n], XtNfromHoriz, w); n++; pm = XCreatePixmapFromBitmapData(xDisp, xRootW, into_bits, into_width, into_height, 1, 0, 1); XtSetArg(args[n], XtNbitmap, (XtArgVal)pm); n++; w = XtCreateManagedWidget("recalcButton", commandWidgetClass, box2, args, n); n = 0; callback[0].callback = (XtCallbackProc)zout_cb; callback[0].closure = (caddr_t)0; XtSetArg(args[n], XtNcallback, callback); n++; XtSetArg(args[n], XtNfromHoriz, w); n++; pm = XCreatePixmapFromBitmapData(xDisp, xRootW, outof_bits, outof_width, outof_height, 1, 0, 1); XtSetArg(args[n], XtNbitmap, (XtArgVal)pm); n++; w = XtCreateManagedWidget("zoomoutButton", commandWidgetClass, box2, args, n); n = 0; callback[0].callback = (XtCallbackProc)color_cb; callback[0].closure = (caddr_t)0; XtSetArg(args[n], XtNcallback, callback); n++; XtSetArg(args[n], XtNfromHoriz, w); n++; XtSetArg(args[n], XtNstate, (app_res.fc ? 1 : 0)); n++; pm = XCreatePixmapFromBitmapData(xDisp, xRootW, color_bits, color_width, color_height, 1, 0, 1); XtSetArg(args[n], XtNbitmap, (XtArgVal)pm); n++; w = XtCreateManagedWidget("colorButton", toggleWidgetClass, box2, args, n); n = 0; callback[0].callback = (XtCallbackProc)bars_cb; callback[0].closure = (caddr_t)0; XtSetArg(args[n], XtNcallback, callback); n++; XtSetArg(args[n], XtNfromHoriz, w); n++; XtSetArg(args[n], XtNstate, dobars); n++; pm = XCreatePixmapFromBitmapData(xDisp, xRootW, bars_bits, bars_width, bars_height, 1, 0, 1); XtSetArg(args[n], XtNbitmap, (XtArgVal)pm); n++; w = XtCreateManagedWidget("barsButton", toggleWidgetClass, box2, args, n); imCan.cn_wd = 200; imCan.cn_ht = 200; n = 0; XtSetArg(args[n], XtNleft, XtChainLeft); n++; XtSetArg(args[n], XtNright, XtChainRight); n++; XtSetArg(args[n], XtNtop, XtChainTop); n++; XtSetArg(args[n], XtNbottom, XtChainBottom); n++; XtSetArg(args[n], XtNwidth, imCan.cn_wd); n++; XtSetArg(args[n], XtNheight, imCan.cn_ht); n++; XtSetArg(args[n], XtNfromVert, box2); n++; imCan.cn_wgt = XtCreateManagedWidget("canvas", widgetClass, box, args, n); XtRealizeWidget(topLevel); imCan.cn_win = XtWindow(imCan.cn_wgt); /* testothervisual(TrueColor); */ setup_color(&imCan, app_res.mono, app_res.fc); imCan.cn_x1 = 0; imCan.cn_y1 = 0; imCan.cn_x2 = 0; imCan.cn_y2 = 0; imCan.cn_zoom = 1; imCan.cn_ox = 0; imCan.cn_oy = 0; imCan.cn_dat = TALLOC(imCan.cn_wd * imCan.cn_ht, u_char, "data"); splat_out(imCan.cn_dat, imCan.cn_wd, imCan.cn_ht, 1); cre_xim(&imCan); repaint_region(&imCan, 0, 0, imCan.cn_wd - 1, imCan.cn_ht - 1); XDefineCursor(xDisp, imCan.cn_win, crossCr); return 0; } testothervisual(clas) int clas; { XVisualInfo *vinf; int nv; int i; XSetWindowAttributes xswat; vinf = XGetVisualInfo(xDisp, VisualNoMask, (XVisualInfo*)0, &nv); for (i = 0; i < nv; i++) if (vinf[i].class == clas) break; if (i == nv) { fprintf(stderr, "couldn't find the right visual\n"); exit(1); } fprintf(stderr, "found visual %d: np %d cs %d r 0x%lx g 0x%lx b 0x%lx\n", i, vinf[i].depth, vinf[i].colormap_size, (long) vinf[i].red_mask, (long) vinf[i].blue_mask, (long) vinf[i].green_mask); xswat.colormap = XCreateColormap(xDisp, xRootW, vinf[i].visual, AllocNone); xswat.border_pixmap = XCreatePixmap(xDisp, xRootW, 16, 16, 8); imCan.cn_win = XCreateWindow(xDisp, xRootW, 0, 0, 300, 300, 1, 8, InputOutput, vinf[i].visual, CWColormap|CWBorderPixmap, &xswat); XMapWindow(xDisp, imCan.cn_win); return 0; } setlabel() { int nh; struct hostc *hp; char buf[64]; hp = 0; nh = 0; while (hp = host_next(hp)) nh++; sprintf(buf, "%d", nh); XtSetArg(args[0], XtNlabel, buf); XtSetValues(thelabel1, args, 1); sprintf(buf, "%d", nworkers); XtSetArg(args[0], XtNlabel, buf); XtSetValues(thelabel2, args, 1); return 0; } static void configure(wgt, xev, par, nump) Widget wgt; XEvent *xev; String *par; int *nump; { int wd, ht; /* size of new canvas */ double re1, im1, re2, im2; int ox, oy; /* offset of new image in old */ u_char *dat; /* new canvas image */ u_char *b1, *b2; /* for copying image data */ int w, h; if (xev->type == ConfigureNotify) { wd = xev->xconfigure.width; ht = xev->xconfigure.height; ox = (imCan.cn_wd - wd) / 2; re1 = imCan.cn_re1 + ((imCan.cn_re2 - imCan.cn_re1) * ox) / imCan.cn_wd; re2 = imCan.cn_re1 + ((imCan.cn_re2 - imCan.cn_re1) * (ox + wd)) / imCan.cn_wd; oy = (imCan.cn_ht - ht) / 2; im1 = imCan.cn_im1 + ((imCan.cn_re2 - imCan.cn_re1) * oy) / imCan.cn_wd; im2 = imCan.cn_im1 + ((imCan.cn_re2 - imCan.cn_re1) * (oy + ht)) / imCan.cn_wd; imCan.cn_re1 = re1; imCan.cn_re2 = re2; imCan.cn_im1 = im1; imCan.cn_im2 = im2; /* fprintf(stderr, "%dx%d %e,%e %e,%e\n", wd, ht, re1, im1, re2, im2); fprintf(stderr, "%e : %e\n", (re2 - re1) / wd, (im2 - im1) / ht); */ dat = TALLOC(wd * ht, u_char, "data"); splat_out(dat, wd, ht, 1); w = min(imCan.cn_wd, wd); h = min(imCan.cn_ht, ht); b1 = imCan.cn_dat + max(0, ox) + max(0, oy) * imCan.cn_wd; b2 = dat + max(0, -ox) + max(0, -oy) * wd; while (h-- > 0) { BCOPY(b1, b2, w); b1 += imCan.cn_wd; b2 += wd; } MY_FREE(imCan.cn_dat); imCan.cn_dat = dat; imCan.cn_wd = wd; imCan.cn_ht = ht; imCan.cn_x1 = 0; imCan.cn_y1 = 0; imCan.cn_x2 = 0; imCan.cn_y2 = 0; cre_xim(&imCan); repaint_region(&imCan, 0, 0, imCan.cn_wd - 1, imCan.cn_ht - 1); refresh_region(&imCan, 0, 0, imCan.cn_wd - 1, imCan.cn_ht - 1); do_recalc(); } } static void redraw(wgt, xev, par, nump) Widget wgt; XEvent *xev; String *par; int *nump; { if (xev->type == Expose) { rubbox(imCan.cn_win, imCan.cn_x1, imCan.cn_y1, imCan.cn_x2, imCan.cn_y2); refresh_region(&imCan, xev->xexpose.x, xev->xexpose.y, xev->xexpose.x + xev->xexpose.width - 1, xev->xexpose.y + xev->xexpose.height - 1); rubbox(imCan.cn_win, imCan.cn_x1, imCan.cn_y1, imCan.cn_x2, imCan.cn_y2); } } static void zoom(wgt, xev, par, nump) Widget wgt; XEvent *xev; String *par; int *nump; { zin_cb(wgt, (char *)0, (char *)0); } /* pick() * * s - start * a - adjust * e - end * m - modify */ static void pick(wgt, xev, par, nump) Widget wgt; XEvent *xev; String *par; int *nump; { Window w = XtWindow(wgt); int wd = imCan.cn_wd; int ht = imCan.cn_ht; int x1 = imCan.cn_x1; int y1 = imCan.cn_y1; int x2 = imCan.cn_x2; int y2 = imCan.cn_y2; int x, y; if (*nump == 1 && get_event_xy(xev, &x, &y)) { switch (par[0][0]) { case 's': if (x1 != -1) rubbox(w, x1, y1, x2, y2); x2 = x1 = x; y2 = y1 = y; rubbox(w, x1, y1, x2, y2); break; case 'a': if (x1 != -1) { rubbox(w, x1, y1, x2, y2); x2 = (abs(y - y1) * wd) / ht; x2 = x - x1 > 0 ? x1 + x2 : x1 - x2; y2 = (abs(x - x1) * ht) / wd; y2 = y - y1 > 0 ? y1 + y2 : y1 - y2; if (abs(x2 - x1) > abs(x - x1)) y2 = y; else x2 = x; rubbox(w, x1, y1, x2, y2); } break; case 'e': if (x1 != -1) { x2 = (abs(y - y1) * wd) / ht; x2 = x - x1 > 0 ? x1 + x2 : x1 - x2; y2 = (abs(x - x1) * ht) / wd; y2 = y - y1 > 0 ? y1 + y2 : y1 - y2; if (abs(x2 - x1) > abs(x - x1)) y2 = y; else x2 = x; /* fprintf(stderr, "%d, %d -> %d, %d\n", x1, y1, x2, y2); */ } break; case 'm': if (x1 != -1) { rubbox(w, x1, y1, x2, y2); if (abs(x - x1) < abs(x - x2)) x1 = x2; if (abs(y - y1) < abs(y - y2)) y1 = y2; x2 = (abs(y - y1) * wd) / ht; x2 = x - x1 > 0 ? x1 + x2 : x1 - x2; y2 = (abs(x - x1) * ht) / wd; y2 = y - y1 > 0 ? y1 + y2 : y1 - y2; if (abs(x2 - x1) > abs(x - x1)) y2 = y; else x2 = x; rubbox(w, x1, y1, x2, y2); } break; default: break; } imCan.cn_x1 = x1; imCan.cn_y1 = y1; imCan.cn_x2 = x2; imCan.cn_y2 = y2; } } int get_event_xy(xev, xp, yp) XEvent *xev; int *xp, *yp; { switch (xev->type) { case KeyPress: case KeyRelease: *xp = xev->xkey.x; *yp = xev->xkey.y; return 1; /* break; */ case ButtonPress: case ButtonRelease: *xp = xev->xbutton.x; *yp = xev->xbutton.y; return 1; /* break; */ case MotionNotify: *xp = xev->xmotion.x; *yp = xev->xmotion.y; return 1; /* break; */ case EnterNotify: case LeaveNotify: *xp = xev->xcrossing.x; *yp = xev->xcrossing.y; return 1; /* break; */ default: return 0; } } /* rubbox() * * Draw a rubberband box XOR in a window. Call again to undraw. */ rubbox(w, x1, y1, x2, y2) Window w; int x1, x2, y1, y2; { register int x, y, h, v; if (x1 < x2) { x = x1; h = x2 - x1; } else { x = x2; h = x1 - x2; } if (y1 < y2) { y = y1; v = y2 - y1; } else { y = y2; v = y1 - y2; } XDrawRectangle(xDisp, w, rubGc, x, y, h, v); return 0; } splat_out(ba, wd, ht, dir) u_char *ba; int wd, ht; int dir; { int x = wd; int o = 0; int n = wd * ht; dir = dir ? 7 : 1; while (--n >= 0) { *ba++ = x & 7 ? 0 : 255; if (--x <= o) { o = (o + dir) & 7; x = wd + o; } } return 0; } label_row(y1, y2, n) int y1, y2; int n; { int wd = imCan.cn_wd; int h = y2 - y1; int y, x; u_char *ba; int c = 240; ba = imCan.cn_dat + y1 * wd; for (y = h; y-- > 0; ) { BZERO(ba, 21); ba += wd; } ba = imCan.cn_dat + y1 * wd; for (y = h - 2; y-- > 0; ) { ba += wd; for (x = 0; x < 20; x++) if (x & 3) ba[x] = (n & (1 << x / 4)) ? 255 : c; } repaint_region(&imCan, 0, y1, 20, y2 - 1); refresh_region(&imCan, 0, y1, 20, y2 - 1); return 0; } ./pvm3/xep/mmain.c0000644007401100740110000001350311140667766012635 0ustar kohlkohl static char rcsid[] = "$Id: mmain.c,v 1.3 2009/01/30 21:24:06 pvmsrc Exp $"; /* * PVM version 3.4: Parallel Virtual Machine System * University of Tennessee, Knoxville TN. * Oak Ridge National Laboratory, Oak Ridge TN. * Emory University, Atlanta GA. * Authors: J. J. Dongarra, G. E. Fagg, M. Fischer * G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci, * P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam * (C) 1997 All Rights Reserved * * NOTICE * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted * provided that the above copyright notice appear in all copies and * that both the copyright notice and this permission notice appear in * supporting documentation. * * Neither the Institutions (Emory University, Oak Ridge National * Laboratory, and University of Tennessee) nor the Authors make any * representations about the suitability of this software for any * purpose. This software is provided ``as is'' without express or * implied warranty. * * PVM version 3 was funded in part by the U.S. Department of Energy, * the National Science Foundation and the State of Tennessee. */ /* * main.c * * Mandelbrot calculator. * Uses tile processes to calculate strips from the requested * region, cats the strips together. * * Usage: * main width height x1 y1 x2 y2 filename * ( main 256 256 -2.0 -2.0 2.0 2.0 whole_mandelbrot ) * * 3 Jun 1991 Robert Manchek manchek@CS.UTK.EDU. * 22 Sep 91 - took out ncpus command arg because we can find out from pvm * 02 Sep 92 - ported to v3 */ #ifdef HASSTDLIB #include #endif #include #include #include #include #include "pvm3.h" #include "../src/bfunc.h" char *mandelbrot(); int nprocessors = 1; /* number of processors to use */ int *prtids = 0; /* processor task ids */ main(argc, argv) int argc; char **argv; { int mytid; /* my task id */ int wd = 16, ht = 16; /* size of image to calculate */ double x1, y1, x2, y2; /* image corner coordinates */ char *pix; /* image data */ int d; /* output file */ int i; /* gp */ char *dfn; /* file to write to */ if (argc != 8) goto usage; wd = atoi(argv[1]); ht = atoi(argv[2]); x1 = atof(argv[3]); y1 = atof(argv[4]); x2 = atof(argv[5]); y2 = atof(argv[6]); dfn = argv[7]; if (wd < 1 || wd > 2048 || ht < 1 || ht > 2048) { fputs("width and heigh must be between 1 and 2048\n", stderr); goto usage; } /* enroll in pvm */ if ((mytid = pvm_mytid()) < 0) { exit(1); } /* printf("i'm t%x\n", mytid); */ pvm_config(&nprocessors, (int*)0, (struct pvmhostinfo**)0); if (nprocessors > wd) nprocessors = wd; fprintf(stderr, "using %d tile servers in calculation\n", nprocessors); /* create n instances of tile */ prtids = (int*)malloc(nprocessors * sizeof(int)); /* if (pvm_spawn("mtile", (char**)0, 0, "", nprocessors, prtids) < 0) { fputs("can't initiate calculators\n", stderr); pvm_exit(); exit(1); } */ for (i = 0; i < nprocessors; i++) { if (pvm_spawn("mtile", (char**)0, 0, "", 1, &prtids[i]) < 0) { fputs("can't initiate calculator\n", stderr); pvm_exit(); exit(1); } /* printf("task t%x\n", prtids[i]); */ } pix = mandelbrot(x1, y1, x2, y2, wd, ht); fputs("writing\n", stderr); if ((d = open(dfn, O_WRONLY|O_CREAT|O_EXCL|O_TRUNC, 0666)) == -1) { perror(dfn); } else { (void)write(d, pix, wd * ht); (void)close(d); fprintf(stderr, "%s: written\n", dfn); } /* kill processors we created */ for (i = 0; i < nprocessors; i++) pvm_kill(prtids[i]); /* un-enroll from pvm */ pvm_exit(); exit(0); usage: fputs("usage: mmain width height x1 y1 x2 y2 filename\n", stderr); exit(1); } char* mandelbrot(x1, y1, x2, y2, wd, ht) double x1, y1, x2, y2; int wd, ht; { char *pix = 0; /* calculated image */ char *tile = 0; /* data from a single strip */ int *tpos; /* tile positions */ int maxwd = 0; /* maximum width of strip */ int slavetid; /* processor id responding */ int twd; /* width of a tile */ double xyxy[4]; /* gp */ int wdht[2]; /* gp */ int i, j; /* gp */ int y; /* gp */ char *ba1, *ba2; /* gp */ pix = (char*)malloc(wd * ht); /* divide up area into strips and assign them to processors */ tpos = (int*)malloc((nprocessors + 1) * sizeof(int)); x2 -= x1; xyxy[0] = x1; xyxy[1] = y1; xyxy[3] = y2; wdht[1] = ht; tpos[0] = 0; fputs("sending work to processors\n", stderr); for (i = 0; i < nprocessors; i++) { pvm_initsend(PvmDataDefault); tpos[i + 1] = ((i + 1) * wd) / nprocessors; wdht[0] = tpos[i + 1] - tpos[i]; if (wdht[0] > maxwd) maxwd = wdht[0]; xyxy[2] = (tpos[i + 1] * x2) / wd + x1; pvm_pkdouble(xyxy, 4, 1); pvm_pkint(wdht, 2, 1); if (pvm_send(prtids[i], 1)) { fprintf(stderr, "error sending to <%x>\n", prtids[i]); pvm_exit(); exit(1); } xyxy[0] = xyxy[2]; } /* collect results and patch together */ tile = (char*)malloc(maxwd * ht); fputs("processors responding:", stderr); fflush(stderr); for (i = 0; i < nprocessors; i++) { if (pvm_recv(-1, 2) < 1) { fprintf(stderr, "error receiving message type 2\n"); pvm_exit(); exit(1); } pvm_bufinfo(pvm_getrbuf(), &j, (int*)0, &slavetid); /* fprintf(stderr, "len %d\n", j); */ for (j = 0; j < nprocessors; j++) if (prtids[j] == slavetid) break; if (j < nprocessors) { fprintf(stderr, " %d", j); fflush(stderr); twd = tpos[j + 1] - tpos[j]; pvm_upkbyte(tile, twd * ht, 1); ba1 = tile; ba2 = pix + tpos[j]; for (y = ht; y-- > 0; ) { BCOPY(ba1, ba2, twd); ba1 += twd; ba2 += wd; } } else { fprintf(stderr, "got response from unknown processor %x?\n", slavetid); } } fputs("\n", stderr); free(tpos); free(tile); return pix; } ./pvm3/xep/imp.h0000644007401100740110000000336306360714246012323 0ustar kohlkohl /* $Id: imp.h,v 1.2 1997/07/09 13:56:54 pvmsrc Exp $ */ /* * PVM version 3.4: Parallel Virtual Machine System * University of Tennessee, Knoxville TN. * Oak Ridge National Laboratory, Oak Ridge TN. * Emory University, Atlanta GA. * Authors: J. J. Dongarra, G. E. Fagg, M. Fischer * G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci, * P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam * (C) 1997 All Rights Reserved * * NOTICE * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted * provided that the above copyright notice appear in all copies and * that both the copyright notice and this permission notice appear in * supporting documentation. * * Neither the Institutions (Emory University, Oak Ridge National * Laboratory, and University of Tennessee) nor the Authors make any * representations about the suitability of this software for any * purpose. This software is provided ``as is'' without express or * implied warranty. * * PVM version 3 was funded in part by the U.S. Department of Energy, * the National Science Foundation and the State of Tennessee. */ /* describes an image canvas */ struct canvas { Widget cn_wgt; /* widget */ Window cn_win; /* window */ int cn_wd; /* image size */ int cn_ht; u_char *cn_dat; /* image data */ XImage *cn_xim; /* ximage struct */ int cn_zoom; /* display mag */ int cn_ox; /* offset for zoom */ int cn_oy; double cn_re1; /* corner coords */ double cn_im1; double cn_re2; double cn_im2; int cn_x1; /* pick coords */ int cn_y1; int cn_x2; int cn_y2; }; ./pvm3/xep/bars.xbm0000644007401100740110000000056606221611556013022 0ustar kohlkohl#define bars_width 16 #define bars_height 24 static char bars_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x19, 0x98, 0x19, 0x98, 0x19, 0x98, 0x19, 0x98, 0x19, 0x98, 0x19, 0x98, 0x19, 0x98, 0x19, 0x98, 0x19, 0x98, 0x19, 0x98, 0x19, 0x98, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; ./pvm3/xep/PGON/0000755007401100740110000000000011141631057012112 5ustar kohlkohl./pvm3/xep/PGON/Makefile0000644007401100740110000000315706406052661013566 0ustar kohlkohl# # $Id: Makefile,v 1.4 1997/09/11 20:33:53 pvmsrc Exp $ # ARCH = PGON # # Generic Makefile body. # To update, edit Makefile.body and run lib/UpdateMk. # # Imports: # ARCH = the official pvm-name of your processor # ARCHCFLAGS = special cc flags # ARCHLIB = special libs needed for daemon # PVMDIR = ../.. PVMIDIR = $(PVMDIR)/include PVMLDIR = $(PVMDIR)/lib/$(ARCH) PVMLIB = -lpvm3 ARCHLIB = -lrpc -lnx SDIR = $(PVMDIR)/xep BDIR = $(PVMDIR)/bin # on cross compiler host # XIDIR = /usr/local/paragon/include/X11 # XLDIR = /usr/local/paragon/lib-coff # on paragon set XIDIR = /usr/include/X11 XLDIR = /usr/lib XDIR = $(BDIR)/$(ARCH) CC = icc CFLOPTS = -O CFLAGS = $(CFLOPTS) -I$(PVMIDIR) -L$(PVMLDIR) $(ARCHCFLAGS) LIBS = $(PVMLIB) $(ARCHLIB) XLIBS = -lXaw -lXmu -lXt -lXext -lX11 XCFLAGS = -I$(XIDIR) -I$(XLDIR) default: mtile xep all: mmain mtile xep $(XDIR): $(BDIR) - mkdir $(XDIR) $(BDIR): - mkdir $(BDIR) mmain: $(SDIR)/mmain.c $(XDIR) $(CC) $(CFLAGS) -o mmain $(SDIR)/mmain.c $(LIBS) mv mmain $(XDIR) mtile: $(SDIR)/mtile.c $(XDIR) $(CC) $(CFLAGS) -o mtile $(SDIR)/mtile.c -lpvm3pe $(ARCHLIB) -lm mv mtile $(XDIR) xep: xep.o calc.o imp.o hostc.o $(XDIR) $(CC) $(XCFLAGS) $(CFLAGS) -o xep xep.o calc.o imp.o hostc.o \ $(XLIBS) $(LIBS) -lm mv xep $(XDIR) xep.o: $(SDIR)/xep.c $(HEADERS) $(CC) $(XCFLAGS) $(CFLAGS) -c $(SDIR)/xep.c imp.o: $(SDIR)/imp.c $(HEADERS) $(CC) $(XCFLAGS) $(CFLAGS) -c $(SDIR)/imp.c calc.o: $(SDIR)/calc.c $(HEADERS) $(CC) $(XCFLAGS) $(CFLAGS) -c $(SDIR)/calc.c hostc.o: $(SDIR)/hostc.c $(HEADERS) $(CC) $(XCFLAGS) $(CFLAGS) -c $(SDIR)/hostc.c clean: rm -f mmain mtile xep *.o ./pvm3/include/0000755007401100740110000000000011141631057012176 5ustar kohlkohl./pvm3/include/pvmtev.h0000644007401100740110000003162206741172444013706 0ustar kohlkohl /* $Id: pvmtev.h,v 1.13 1999/07/08 18:59:48 kohl Exp $ */ /* * PVM version 3.4: Parallel Virtual Machine System * University of Tennessee, Knoxville TN. * Oak Ridge National Laboratory, Oak Ridge TN. * Emory University, Atlanta GA. * Authors: J. J. Dongarra, G. E. Fagg, M. Fischer * G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci, * P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam * (C) 1997 All Rights Reserved * * NOTICE * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted * provided that the above copyright notice appear in all copies and * that both the copyright notice and this permission notice appear in * supporting documentation. * * Neither the Institutions (Emory University, Oak Ridge National * Laboratory, and University of Tennessee) nor the Authors make any * representations about the suitability of this software for any * purpose. This software is provided ``as is'' without express or * implied warranty. * * PVM version 3 was funded in part by the U.S. Department of Energy, * the National Science Foundation and the State of Tennessee. */ /* * pvmtev.h * * Libpvm tracing includes. * * $Log: pvmtev.h,v $ * Revision 1.13 1999/07/08 18:59:48 kohl * Fixed "Log" keyword placement. * - indent with " * " for new CVS. * * Revision 1.12 1997/12/31 22:13:39 pvmsrc * Renamed TEV_REMOVE -> TEV_DELINFO. D-Oh. * (Spanker=kohl) * * Revision 1.11 1997/12/23 20:26:22 pvmsrc * Added new TEV_MHF_INVOKE event id. * - for message handler function invocation. * (Spanker=kohl) * * Revision 1.10 1997/12/17 22:17:19 pvmsrc * Added new tracing constants for mhf stuff. * - TEV_DID_MHI message handler index. * - TEV_ADDMHF & TEV_DELMHF trace event indices. * (Spanker=kohl) * * Revision 1.9 1997/10/24 15:16:01 pvmsrc * Added TEV_DID_RCX constant for Receiving message context. * (Spanker=kohl) * * Revision 1.8 1997/10/24 14:20:20 pvmsrc * Added TEV_DID_MCX constant, Message Context. * (Spanker=kohl) * * Revision 1.7 1997/07/09 13:29:39 pvmsrc * Fixed Author Header. * * Revision 1.6 1997/05/01 20:16:50 pvmsrc * Renamed TEV_MBOXINFO -> TEV_GETMBOXINFO. * * Revision 1.5 1997/04/10 20:25:52 pvmsrc * TEV_GETNAMES -> TEV_MBOXINFO. * * Revision 1.4 1997/02/17 21:26:44 pvmsrc * Fixed comments for Steve (who actually reads them, hahahaha). * - decls for pvmtevdidlist[] & pvmtevinfo[] are now in global.c. * * Revision 1.3 1997/01/28 19:14:23 pvmsrc * New Copyright Notice & Authors. * * Revision 1.2 1996/10/24 19:35:12 pvmsrc * Modified for New Tracing Facility: * - added trace buffer marker constants, TEV_MARK_*. * - added dummy user-defined trace tid & message code, * PVM_TRACE_TID & PVM_TRACE_CODE. * - added trace event data types, TEV_DATA_*. * - added semantic data IDs, TEV_DID_*, with new struct Pvmtevdid. * - replaced old trace event IDs, no longer TEV_*0 / TEV_*1, * use TEV_EVENT_ENTRY & TEV_EVENT_EXIT to distinguish. * - added new struct Pvmtevinfo. * - modified trace mask defn & macros, fix length large enough for * compatible growth. * - renamed macros for consistency -> TEV_MASK_*(). * - added new struct Pvmtracer. * * Revision 1.1 1996/09/23 21:06:34 pvmsrc * Initial revision * */ #ifndef _PVMTEV_H_ #define _PVMTEV_H_ /* Trace Markers */ #define TEV_MARK_EVENT_BUFFER -1 #define TEV_MARK_EVENT_BUFFER_END -2 #define TEV_MARK_DATA_ID -3 #define TEV_MARK_DATA_ID_END -4 #define TEV_MARK_EVENT_DESC -5 #define TEV_MARK_EVENT_DESC_END -6 #define TEV_MARK_EVENT_RECORD -7 #define TEV_MARK_EVENT_RECORD_END -8 #define TEV_MARK_USER_EVENT_RECORD -9 #define TEV_MARK_USER_EVENT_RECORD_END -10 /* Dummy Trace Tid & Code for User Defined Events */ #define PVM_TRACE_TID -1111 #define PVM_TRACE_CODE -2222 /* Trace Event Data Types */ #define TEV_DATA_NULL 0 #define TEV_DATA_BYTE 1 #define TEV_DATA_CPLX 2 #define TEV_DATA_DCPLX 3 #define TEV_DATA_DOUBLE 4 #define TEV_DATA_FLOAT 5 #define TEV_DATA_INT 6 #define TEV_DATA_UINT 7 #define TEV_DATA_LONG 8 #define TEV_DATA_ULONG 9 #define TEV_DATA_SHORT 10 #define TEV_DATA_USHORT 11 #define TEV_DATA_STRING 12 #define TEV_DATA_STRUCT_START 13 #define TEV_DATA_STRUCT_END 14 #define TEV_DATA_DEFERRED 15 #define TEV_DATA_SCALAR 0x00 #define TEV_DATA_ARRAY 0x80 /* Trace Event Data Identifier ID Constants */ /************* PLEASE NOTE ******************/ /* */ /* When Adding or Changing, ALWAYS Update: */ /* struct Pvmtevdid pvmtevdidlist[]; */ /* in file $PVM_ROOT/src/global.c */ /* */ /************* PLEASE NOTE ******************/ #define TEV_DID_FIRST 0 #define TEV_DID_AN 0 #define TEV_DID_AC 1 #define TEV_DID_AS 2 #define TEV_DID_BF 3 #define TEV_DID_CC 4 #define TEV_DID_CN 5 #define TEV_DID_CI 6 #define TEV_DID_CF 7 #define TEV_DID_CD 8 #define TEV_DID_CR 9 #define TEV_DID_CL 10 #define TEV_DID_CDA 11 #define TEV_DID_CDT 12 #define TEV_DID_CDX 13 #define TEV_DID_CDC 14 #define TEV_DID_CGI 15 #define TEV_DID_CRF 16 #define TEV_DID_CXC 17 #define TEV_DID_CXF 18 #define TEV_DID_CXN 19 #define TEV_DID_CXS 20 #define TEV_DID_ERI 21 #define TEV_DID_ERR 22 #define TEV_DID_FDS 23 #define TEV_DID_FP 24 #define TEV_DID_GN 25 #define TEV_DID_GI 26 #define TEV_DID_GT 27 #define TEV_DID_GS 28 #define TEV_DID_GBC 29 #define TEV_DID_HN 30 #define TEV_DID_HNL 31 #define TEV_DID_HNA 32 #define TEV_DID_HPT 33 #define TEV_DID_HA 34 #define TEV_DID_HSP 35 #define TEV_DID_HIS 36 #define TEV_DID_HCS 37 #define TEV_DID_HCU 38 #define TEV_DID_HDS 39 #define TEV_DID_HDU 40 #define TEV_DID_HS 41 #define TEV_DID_INB 42 #define TEV_DID_IMC 43 #define TEV_DID_IST 44 #define TEV_DID_MC 45 #define TEV_DID_MCX 46 #define TEV_DID_MB 47 #define TEV_DID_MNB 48 #define TEV_DID_SRC 49 #define TEV_DID_DST 50 #define TEV_DID_MDL 51 #define TEV_DID_MTS 52 #define TEV_DID_MTU 53 #define TEV_DID_MRF 54 #define TEV_DID_MRB 55 #define TEV_DID_MSB 56 #define TEV_DID_ME 57 #define TEV_DID_MHI 58 #define TEV_DID_AST 59 #define TEV_DID_AMC 60 #define TEV_DID_AML 61 #define TEV_DID_NE 62 #define TEV_DID_NMC 63 #define TEV_DID_NCT 64 #define TEV_DID_NTL 65 #define TEV_DID_NH 66 #define TEV_DID_NA 67 #define TEV_DID_OPT 68 #define TEV_DID_OPV 69 #define TEV_DID_OS 70 #define TEV_DID_PDA 71 #define TEV_DID_PDT 72 #define TEV_DID_PC 73 #define TEV_DID_PSD 74 #define TEV_DID_PSG 75 #define TEV_DID_PF 76 #define TEV_DID_PRF 77 #define TEV_DID_RST 78 #define TEV_DID_RMC 79 #define TEV_DID_RCX 80 #define TEV_DID_SN 81 #define TEV_DID_SE 82 #define TEV_DID_SF 83 #define TEV_DID_SW 84 #define TEV_DID_SC 85 #define TEV_DID_STL 86 #define TEV_DID_SIB 87 #define TEV_DID_TID 88 #define TEV_DID_PT 89 #define TEV_DID_MT 90 #define TEV_DID_TF 91 #define TEV_DID_TN 92 #define TEV_DID_PID 93 #define TEV_DID_TT 94 #define TEV_DID_TW 95 #define TEV_DID_TIS 96 #define TEV_DID_TNT 97 #define TEV_DID_TST 98 #define TEV_DID_TUS 99 #define TEV_DID_TUU 100 #define TEV_DID_TSS 101 #define TEV_DID_TSU 102 #define TEV_DID_TES 103 #define TEV_DID_TA 104 #define TEV_DID_TR 105 #define TEV_DID_TS 106 #define TEV_DID_TU 107 #define TEV_DID_TGS 108 #define TEV_DID_TGU 109 #define TEV_DID_TMW 110 #define TEV_DID_TM 111 #define TEV_DID_TRC 112 #define TEV_DID_TRT 113 #define TEV_DID_TRX 114 #define TEV_DID_TRO 115 #define TEV_DID_TRM 116 #define TEV_DID_TRB 117 #define TEV_DID_TRL 118 #define TEV_DID_VER 119 #define TEV_DID_VCT 120 #define TEV_DID_VID 121 #define TEV_DID_WID 122 #define TEV_DID_MAX 122 /* Trace Data Identifier Structure */ struct Pvmtevdid { char *did; /* Semantic Data ID */ char *desc; /* Semantic Data Description */ }; /* Trace Event ID Constants */ /************* PLEASE NOTE ******************/ /* */ /* When Adding or Changing, ALWAYS Update: */ /* struct Pvmtevinfo pvmtevinfo[]; */ /* in file $PVM_ROOT/src/global.c */ /* */ /************* PLEASE NOTE ******************/ #define TEV_FIRST 0 #define TEV_ADDHOSTS 0 #define TEV_BARRIER 1 #define TEV_BCAST 2 #define TEV_BUFINFO 3 #define TEV_CONFIG 4 #define TEV_DELETE 5 #define TEV_DELHOSTS 6 #define TEV_EXIT 7 #define TEV_FREEBUF 8 #define TEV_GETFDS 9 #define TEV_GETINST 10 #define TEV_GETOPT 11 #define TEV_GETRBUF 12 #define TEV_GETSBUF 13 #define TEV_GETTID 14 #define TEV_GSIZE 15 #define TEV_HALT 16 #define TEV_INITSEND 17 #define TEV_INSERT 18 #define TEV_JOINGROUP 19 #define TEV_KILL 20 #define TEV_LOOKUP 21 #define TEV_LVGROUP 22 #define TEV_MCAST 23 #define TEV_MKBUF 24 #define TEV_MSTAT 25 #define TEV_MYTID 26 #define TEV_NOTIFY 27 #define TEV_NRECV 28 #define TEV_PARENT 29 #define TEV_PERROR 30 #define TEV_PKBYTE 31 #define TEV_PKCPLX 32 #define TEV_PKDCPLX 33 #define TEV_PKDOUBLE 34 #define TEV_PKFLOAT 35 #define TEV_PKINT 36 #define TEV_PKUINT 37 #define TEV_PKLONG 38 #define TEV_PKULONG 39 #define TEV_PKSHORT 40 #define TEV_PKUSHORT 41 #define TEV_PKSTR 42 #define TEV_PROBE 43 #define TEV_PSTAT 44 #define TEV_RECV 45 #define TEV_RECVF 46 #define TEV_SEND 47 #define TEV_SENDSIG 48 #define TEV_SETOPT 49 #define TEV_SETRBUF 50 #define TEV_SETSBUF 51 #define TEV_SPAWN 52 #define TEV_START_PVMD 53 #define TEV_TASKS 54 #define TEV_TICKLE 55 #define TEV_TIDTOHOST 56 #define TEV_TRECV 57 #define TEV_UPKBYTE 58 #define TEV_UPKCPLX 59 #define TEV_UPKDCPLX 60 #define TEV_UPKDOUBLE 61 #define TEV_UPKFLOAT 62 #define TEV_UPKINT 63 #define TEV_UPKUINT 64 #define TEV_UPKLONG 65 #define TEV_UPKULONG 66 #define TEV_UPKSHORT 67 #define TEV_UPKUSHORT 68 #define TEV_UPKSTR 69 #define TEV_VERSION 70 #define TEV_REG_HOSTER 71 #define TEV_REG_RM 72 #define TEV_REG_TASKER 73 #define TEV_REG_TRACER 74 #define TEV_NEWTASK 75 #define TEV_ENDTASK 76 #define TEV_SPNTASK 77 #define TEV_ARCHCODE 78 #define TEV_CATCHOUT 79 #define TEV_GETMWID 80 #define TEV_GETTMASK 81 #define TEV_HOSTSYNC 82 #define TEV_PACKF 83 #define TEV_PRECV 84 #define TEV_PSEND 85 #define TEV_REDUCE 86 #define TEV_SETMWID 87 #define TEV_SETTMASK 88 #define TEV_UNPACKF 89 #define TEV_GATHER 90 #define TEV_SCATTER 91 #define TEV_PUTINFO 92 #define TEV_GETINFO 93 #define TEV_DELINFO 94 #define TEV_GETMBOXINFO 95 #define TEV_NEWCONTEXT 96 #define TEV_FREECONTEXT 97 #define TEV_SETCONTEXT 98 #define TEV_GETCONTEXT 99 #define TEV_SIBLINGS 100 #define TEV_GETMINFO 101 #define TEV_SETMINFO 102 #define TEV_ADDMHF 103 #define TEV_DELMHF 104 #define TEV_MHF_INVOKE 105 #define TEV_TIMING 106 #define TEV_PROFILING 107 #define TEV_USER_DEFINED 108 #define TEV_MAX 108 #define TEV_EVENT_ENTRY 0x4000 #define TEV_EVENT_EXIT 0x8000 /* Trace Event Info Structure */ struct Pvmtevinfo { char *name; /* trace event name */ int desc_status; /* trace descriptor status */ struct timeval mark; /* trace time marker */ struct timeval total; /* trace cumulative time */ int count; /* trace invocation counter */ }; /* Trace Mask Definitions */ /****************************************************************/ /* */ /* Fix Length Larger Than Necessary to Allow Interoperability */ /* with Different Effective Mask Lengths: */ /* */ /* -> for TEV_MAX of 101, Min Length is (101/4 + 2) = 26. */ /* => bump to 36, sufficient for TEV_MAX up to 139. */ /* */ /****************************************************************/ #define TEV_MASK_LENGTH 36 /* Trace Event Mask Kept as Ascii String */ typedef char Pvmtmask[TEV_MASK_LENGTH]; /* Trace Mask Macros */ #define TEV_MASK_SET( m, k ) ( m[ (k) / 4 ] |= ( 1 << ((k) & 3) ) ) #define TEV_MASK_UNSET( m, k ) ( m[ (k) / 4 ] &= ~( 1 << ((k) & 3) ) ) #define TEV_MASK_CHECK( m, k ) ( m[ (k) / 4 ] & ( 1 << ((k) & 3) ) ) #define TEV_MASK_INIT( m ) \ { \ int tev_init_mask_i = TEV_MASK_LENGTH - 1; \ m[ tev_init_mask_i ] = 0; \ while ( tev_init_mask_i-- > 0 ) \ m[ tev_init_mask_i ] = '@'; \ } /* Tracer Info Structure */ struct Pvmtracer { int trctid; /* trace dst */ int trcctx; /* trace context */ int trctag; /* trace message tag */ int outtid; /* stdout dst */ int outctx; /* stdout context */ int outtag; /* stdout message tag */ int trcbuf; /* trace buffering */ int trcopt; /* trace options */ Pvmtmask tmask; /* trace bitmask */ }; #ifdef __ProtoGlarp__ #undef __ProtoGlarp__ #endif #if defined(__STDC__) || defined(__cplusplus) #define __ProtoGlarp__(x) x #else #define __ProtoGlarp__(x) () #endif #ifdef __cplusplus extern "C" { #endif int pvm_gettmask __ProtoGlarp__(( int, Pvmtmask )); int pvm_settmask __ProtoGlarp__(( int, Pvmtmask )); #ifdef __cplusplus } #endif #endif /*_PVMTEV_H_*/ ./pvm3/include/fpvm3_watcom.h0000644007401100740110000000702506673257303014774 0ustar kohlkohlc c $Id: fpvm3_watcom.h,v 1.2 1999/03/15 19:25:55 pvmsrc Exp $ c c ------------------------------------------------------------------- c PVM version 3.4: Parallel Virtual Machine System c University of Tennessee, Knoxville TN. c Oak Ridge National Laboratory, Oak Ridge TN. c Emory University, Atlanta GA. c Authors: J. J. Dongarra, G. E. Fagg, M. Fischer c G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci, c P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam c (C) 1997 All Rights Reserved c c NOTICE c c Permission to use, copy, modify, and distribute this software and c its documentation for any purpose and without fee is hereby granted c provided that the above copyright notice appear in all copies and c that both the copyright notice and this permission notice appear in c supporting documentation. c c Neither the Institutions (Emory University, Oak Ridge National c Laboratory, and University of Tennessee) nor the Authors make any c representations about the suitability of this software for any c purpose. This software is provided ``as is'' without express or c implied warranty. c c PVM version 3 was funded in part by the U.S. Department of Energy, c the National Science Foundation and the State of Tennessee. c ------------------------------------------------------------------- c ---------------------------------- c fpvm3_watcom.h c c c For the WIN32 WATCOM fortran compiler... c c To activate throughout your code - uncomment this line c of code in the ../pvm3.4/include/fpvm3.h file c c include '../include/fpvm3_watcom.h' c c ---------------------------------- *$pragma aux pvmfmytid "!_" *$pragma aux pvmfaddhost "!_" *$pragma aux pvmfaddmhf "!_" *$pragma aux pvmfarchcode "!_" *$pragma aux pvmfbarrier "!_" *$pragma aux pvmfbcast "!_" *$pragma aux pvmfbufinfo "!_" *$pragma aux pvmfcatchout "!_" *$pragma aux pvmfconfig "!_" *$pragma aux pvmfdelhost "!_" *$pragma aux pvmfdelinfo "!_" *$pragma aux pvmfdelmhf "!_" *$pragma aux pvmfgather "!_" *$pragma aux pvmffreebuf "!_" *$pragma aux pvmfgetcontext "!_" *$pragma aux pvmffreecontext "!_" *$pragma aux pvmffreezegroup "!_" *$pragma aux pvmfgetmboxinfo "!_" *$pragma aux pvmfgetinst "!_" *$pragma aux pvmfgetopt "!_" *$pragma aux pvmfgetrbuf "!_" *$pragma aux pvmfgetsbuf "!_" *$pragma aux pvmfgettid "!_" *$pragma aux pvmfgsize "!_" *$pragma aux pvmfhalt "!_" *$pragma aux pvmfhostsync "!_" *$pragma aux pvmfinitsend "!_" *$pragma aux pvmfjoingroup "!_" *$pragma aux pvmfkill "!_" *$pragma aux pvmflvgroup "!_" *$pragma aux pvmfmcast "!_" *$pragma aux pvmfmkbuf "!_" *$pragma aux pvmfstat "!_" *$pragma aux pvmfmytid "!_" *$pragma aux pvmfnewcontext "!_" *$pragma aux pvmfnotify "!_" *$pragma aux pvmfnrecv "!_" *$pragma aux pvmfpack "!_" *$pragma aux pvmfperror "!_" *$pragma aux pvmfparent "!_" *$pragma aux pvmfprecv "!_" *$pragma aux pvmfprobe "!_" *$pragma aux pvmfpsend "!_" *$pragma aux pvmfpstat "!_" *$pragma aux pvmfputinfo "!_" *$pragma aux pvmfrecv "!_" *$pragma aux pvmfexit "!_" *$pragma aux pvmfrecvinfo "!_" *$pragma aux pvmfreduce "!_" *$pragma aux pvmfscatter "!_" *$pragma aux pvmfsend "!_" *$pragma aux pvmfsendsig "!_" *$pragma aux pvmfsetopt "!_" *$pragma aux pvmfsetcontext "!_" *$pragma aux pvmfsetrbuf "!_" *$pragma aux pvmfsetsbuf "!_" *$pragma aux pvmfsiblings "!_" *$pragma aux pvmfsleep "!_" *$pragma aux pvmfspawn "!_" *$pragma aux pvmfstartpvmd "!_" *$pragma aux pvmftasks "!_" *$pragma aux pvmftrecv "!_" *$pragma aux pvmfunpack "!_" ./pvm3/include/pvmproto.h0000644007401100740110000003636007050621412014243 0ustar kohlkohl /* $Id: pvmproto.h,v 1.18 2000/02/10 20:43:54 pvmsrc Exp $ */ /* * PVM version 3.4: Parallel Virtual Machine System * University of Tennessee, Knoxville TN. * Oak Ridge National Laboratory, Oak Ridge TN. * Emory University, Atlanta GA. * Authors: J. J. Dongarra, G. E. Fagg, M. Fischer * G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci, * P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam * (C) 1997 All Rights Reserved * * NOTICE * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted * provided that the above copyright notice appear in all copies and * that both the copyright notice and this permission notice appear in * supporting documentation. * * Neither the Institutions (Emory University, Oak Ridge National * Laboratory, and University of Tennessee) nor the Authors make any * representations about the suitability of this software for any * purpose. This software is provided ``as is'' without express or * implied warranty. * * PVM version 3 was funded in part by the U.S. Department of Energy, * the National Science Foundation and the State of Tennessee. */ /* * pvmproto.h * * PVM protocol definitions. * * $Log: pvmproto.h,v $ * Revision 1.18 2000/02/10 20:43:54 pvmsrc * Removed hard-coded /tmp in TDSOCKNAME / TDSOCKNAME_CSPP. * - use pvmgettmp() routine now to determine PVM temp dir. * (Spanker=kohl) * * Revision 1.17 1999/07/08 18:59:48 kohl * Fixed "Log" keyword placement. * - indent with " * " for new CVS. * * Revision 1.16 1998/01/12 21:12:01 pvmsrc * Added task output collection op defines. * - TO_NEW, TO_SPAWN, TO_EOF. * (Spanker=kohl) * * Revision 1.15 1997/10/22 22:08:16 pvmsrc * Added SYSCTX_DG constant for dynamic group context. * (Spanker=kohl) * * Revision 1.14 1997/10/01 15:34:49 pvmsrc * Fixed TM_LAST decl. * - should be same as last entry, not last + 1... * (Spanker=kohl) * * Revision 1.13 1997/07/09 13:29:37 pvmsrc * Fixed Author Header. * * Revision 1.12 1997/06/10 16:38:55 pvmsrc * Minor text cleanup. * * Revision 1.11 1997/05/29 15:15:05 pvmsrc * Fixed decl of SM_FIRST: * - some compilers too stupid to know it's an (int)0x80040001... * - D-Oh. * * Revision 1.10 1997/05/27 14:40:58 pvmsrc * Added new TM message: * TM_SHMCONN. This allows socket and shmem task structs to be merged. * Also when exchanged sets new TF flag TF_SHMCONN. * * Revision 1.9 1997/04/09 14:37:17 pvmsrc * PVM patches from the base 3.3.10 to 3.3.11 versions where applicable. * Originals by Bob Manchek. Altered by Graham Fagg where required. * * Revision 1.8 1997/04/08 19:18:11 pvmsrc * Damn. Added matching DM_RESETACK constant... :-Q * * Revision 1.7 1997/04/08 19:05:51 pvmsrc * Added DM_RESET constant. * - for reset of system, cleanup of persistent message mboxes. * * Revision 1.6 1997/04/07 18:20:15 pvmsrc * Added TMDB_RESET constant. * - for resetting mbox db on pvmreset()... * * Revision 1.5 1997/04/04 15:45:03 pvmsrc * Typos CTXT -> CTX for consistency. Affects task.c, too * * Revision 1.4 1997/04/03 19:15:52 pvmsrc * Added some system defined contexts for use by TM, TC messages * * Revision 1.3 1997/04/03 16:12:38 pvmsrc * Added correct macro for sequence number wrap-around comparison. * This is on SEQLESSTHAN and is useful for 16 bit sequence numbers * * Revision 1.2 1997/01/28 19:14:22 pvmsrc * New Copyright Notice & Authors. * * Revision 1.1 1996/10/25 13:43:38 pvmsrc * Initial revision * * */ #ifndef _PVMPROTO_H_ #define _PVMPROTO_H_ /* protocol version */ #ifndef SDPROTOCOL #define SDPROTOCOL 4302 #endif /* * t - task * d - pvmd * R - resource manager * H - hoster * T - tasker */ #define SM_FIRST (int)0x80040001 /* first SM_ message */ #define SM_SPAWN (SM_FIRST+0) /* t<>R like TM_SPAWN */ #define SM_EXEC (SM_FIRST+1) /* R->d like DM_EXEC */ #define SM_EXECACK (SM_FIRST+2) /* d->R like DM_EXECACK */ #define SM_TASK (SM_FIRST+3) /* t<>R like TM_TASK */ #define SM_CONFIG (SM_FIRST+4) /* t<>R like TM_CONFIG */ #define SM_ADDHOST (SM_FIRST+5) /* t<>R like TM_ADDHOST */ #define SM_DELHOST (SM_FIRST+6) /* t<>R like TM_DELHOST */ #define SM_ADD (SM_FIRST+7) /* R->d like DM_ADD */ #define SM_ADDACK (SM_FIRST+8) /* d->R like DM_ADDACK */ #define SM_NOTIFY (SM_FIRST+9) /* t->R like TM_NOTIFY */ #define SM_TASKX (SM_FIRST+10) /* d->R notify of task exit */ #define SM_HOSTX (SM_FIRST+11) /* d->R notify sched of host delete */ #define SM_HANDOFF (SM_FIRST+12) /* R->d pvmd to new sched */ #define SM_SCHED (SM_FIRST+13) /* t<>R like TM_SCHED */ #define SM_STHOST (SM_FIRST+14) /* d->H start slave pvmds */ #define SM_STHOSTACK (SM_FIRST+15) /* H->d like DM_STARTACK */ #define SM_STTASK (SM_FIRST+16) /* d->T start task */ #define SM_LAST (SM_FIRST+16) /* last SM_ message */ /* * ddpro.h * * Pvmd-pvmd protocol * * Revision 1.5 1996/05/13 20:24:06 manchek * [GEF pvm3.3.10to11 patch updates] * added PVMDISTASK * * Revision 1.4 1995/05/17 16:06:18 manchek * cast DM_FIRST to int. * added debugging classes * * Revision 1.3 1994/07/18 19:19:27 manchek * added PDMWAITC * * Revision 1.2 1994/06/03 20:38:13 manchek * version 3.3.0 * * Revision 1.1 1993/08/30 23:26:47 manchek * Initial revision * */ /* protocol version */ #ifndef DDPROTOCOL #define DDPROTOCOL 2316 #endif #define DDMINRETRIES 10 #define DDMAXRTT 9 /* seconds */ #define DDMINTIMEOUT (DDMINRETRIES*DDMAXRTT*2) /* seconds */ #define DDERRRETRY 300000 /* uSec */ #define DDPINGTIME 60 /* (sec) between keepalive pings */ #define DDBAILTIME 300 /* (sec) for new slave to bail if no config */ #define NEXTSEQNUM(x) (((x)+1)&0xffff) #define SEQNUMCOMPARE(x,y) ((x)<(y)||(((x)>0x8000)&&((y)<0x8000))) #define SEQLESSTHAN(x,y)( ((x)<(y) && (y)-(x) < 32768) ||\ ((x)>(y) && (x)-(y) >= 32768) ) /*DocThis*/ /* * Pvmd-pvmd packet header * * 0 1 2 3 * +---------------------------------------------------------------+ * 0| dst | * +---------------------------------------------------------------+ * 4| src | * +-------------------------------+-------------------------------+ * 8| seq | ack | * +---------------+---------------+-------------------------------+ * 12| flags | | * +---------------+-----------------------------------------------+ */ /*EndDocThis*/ #define DDFRAGHDR 16 /* frag flags */ #define FFDAT 4 /* packet contains data, seq num is valid */ #define FFFIN 8 /* sender closing connection */ #define FFACK 16 /* ack num is valid */ /* d-d message flavors */ #define DM_FIRST (int)0x80020001 /* first DM_ message */ #define DM_ADD (DM_FIRST+0) /* add hosts to machine */ #define DM_ADDACK (DM_FIRST+1) #define DM_EXEC (DM_FIRST+2) /* start tasks */ #define DM_EXECACK (DM_FIRST+3) #define DM_SENDSIG (DM_FIRST+4) /* signal a task */ #define DM_HTUPD (DM_FIRST+5) /* define new host table */ #define DM_HTUPDACK (DM_FIRST+6) #define DM_HTCOMMIT (DM_FIRST+7) /* switch to new host table */ #define DM_SLCONF (DM_FIRST+8) /* config slave pvmd */ #define DM_STARTACK (DM_FIRST+9) /* pvmd' completed slave startup */ #define DM_TASK (DM_FIRST+10) /* get list of tasks */ #define DM_TASKACK (DM_FIRST+11) #define DM_DELHOST (DM_FIRST+12) /* delete hosts from machine */ #define DM_DELHOSTACK (DM_FIRST+13) #define DM_NULL (DM_FIRST+14) /* null message */ #define DM_TASKOUT (DM_FIRST+15) /* task standard out/err data */ #define DM_PSTAT (DM_FIRST+16) /* query status of task */ #define DM_PSTATACK (DM_FIRST+17) #define DM_HALT (DM_FIRST+18) /* request master pvmd to halt */ #define DM_MCA (DM_FIRST+19) /* define multicast tid */ #define DM_NOTIFY (DM_FIRST+20) /* request notify */ #define DM_NOTIFYACK (DM_FIRST+21) #define DM_DB (DM_FIRST+22) /* message-mailbox request */ #define DM_DBACK (DM_FIRST+23) #define DM_RESET (DM_FIRST+24) /* reset linkage (mbox tidy) */ #define DM_RESETACK (DM_FIRST+25) #define DM_HTDEL (DM_FIRST+26) /* delete hosts from host table */ #define DM_HOSTSYNC (DM_FIRST+27) /* request clock sample */ #define DM_HOSTSYNCACK (DM_FIRST+28) #define DM_LAST (DM_FIRST+28) /* last DM_ message */ /* DM_SLCONF fields - don't use 0 */ #define DM_SLCONF_EP 1 /* set epath */ #define DM_SLCONF_BP 2 /* set bpath */ #define DM_SLCONF_WD 3 /* set wdir */ #define DM_SLCONF_SCHED 4 /* set scheduler tid */ #define DM_SLCONF_TRACE 5 /* set tracer info */ /* pvmd run states */ #define PVMDNORMAL 1 /* normal running state */ #define PVMDHTUPD 2 /* getting host table update */ #define PVMDSTARTUP 3 /* slave just started, not fully configured */ #define PVMDPRIME 4 /* am pvmd' */ #define PVMDHALTING 5 /* stopping rsn */ #define PVMDSHUTDOWN 6 /* in timeout to halt, waiting for FIN|ACK */ #define PVMDISTASK 7 /* between fork and exec to spawn task */ /* used to cache multicast addresses */ struct mca { struct mca *mc_link; /* dll of peers */ struct mca *mc_rlink; int mc_tid; /* the multicast tid */ int mc_ndst; /* number of dsts */ int *mc_dsts; /* dst tids (local tasks or foreign pvmds) */ }; struct mca *mca_new __ProtoGlarp__(( void )); void mca_free __ProtoGlarp__((struct mca *mcap)); struct pmsg *mesg_new __ProtoGlarp__(( int master )); /* * tdpro.h * * Task-pvmd protocol * * Revision 1.5 1995/06/28 15:32:29 manchek * added TC_SHMAT * * Revision 1.4 1995/05/17 16:56:06 manchek * added support for CSPP subcomplexes (/tmp file naming). * case TM_FIRST, TC_FIRST to int * add TM_GETOPT message * * Revision 1.3 1994/06/03 20:38:31 manchek * version 3.3.0 * * Revision 1.2 1993/10/04 20:30:50 manchek * added alternate TDSOCKNAME if SHAREDTMP is defined * * Revision 1.1 1993/08/30 23:26:52 manchek * Initial revision * */ /* protocol version */ #ifndef TDPROTOCOL #define TDPROTOCOL 1318 #endif /*DocThis*/ /* * Task-task, task-pvmd fragment header * * 0 1 2 3 * +---------------------------------------------------------------+ * 0| dst | * +---------------------------------------------------------------+ * 4| src | * +---------------------------------------------------------------+ * 8| length | * +---------------+-----------------------------------------------+ * 12| flags | | * +---------------+-----------------------------------------------+ */ /*EndDocThis*/ #define TDFRAGHDR 16 /* * Maximum size of all headers in system */ #define MAXHDR ((DDFRAGHDR > TDFRAGHDR ? DDFRAGHDR : TDFRAGHDR) \ + MSGHDRLEN) /* file with task->pvmd sockaddr */ #ifdef SHAREDTMP #define TDSOCKNAME "%s/pvmd.%d.%s" #else #define TDSOCKNAME "%s/pvmd.%d" #endif #ifdef IMA_CSPP #ifdef SHAREDTMP #define TDSOCKNAME_CSPP "%s/pvmd.%d.%d.%s" #else #define TDSOCKNAME_CSPP "%s/pvmd.%d.%d" #endif #endif /*IMA_CSPP*/ #define TM_FIRST (int)0x80010001 /* first TM_ message */ #define TM_CONNECT (TM_FIRST+0) /* task connects */ #define TM_CONN2 (TM_FIRST+1) /* 2nd round of connect */ #define TM_EXIT (TM_FIRST+2) /* task disconnects */ #define TM_ADDHOST (TM_FIRST+3) /* add hosts to machine */ #define TM_DELHOST (TM_FIRST+4) /* delete hosts from machine */ #define TM_CONFIG (TM_FIRST+5) /* get machine config */ #define TM_MSTAT (TM_FIRST+6) /* get host status */ #define TM_HALT (TM_FIRST+7) /* halt machine */ #define TM_TICKLE (TM_FIRST+8) /* tickle pvmd */ #define TM_SPAWN (TM_FIRST+9) /* spawn new tasks */ #define TM_PSTAT (TM_FIRST+10) /* get task status */ #define TM_SENDSIG (TM_FIRST+11) /* signal a task */ #define TM_TASK (TM_FIRST+12) /* list tasks */ #define TM_MCA (TM_FIRST+13) /* request multicast tid */ #define TM_NOTIFY (TM_FIRST+14) /* request notification */ #define TM_DB (TM_FIRST+15) /* message-mailbox request */ #define TM_SCHED (TM_FIRST+16) /* register task as scheduler */ #define TM_TASKER (TM_FIRST+17) /* register task as task starter */ #define TM_HOSTER (TM_FIRST+18) /* register task as pvmd starter */ #define TM_TRACER (TM_FIRST+19) /* register task as task tracer */ #define TM_HOSTSYNC (TM_FIRST+20) /* get clock delta to host */ #define TM_SETOPT (TM_FIRST+21) /* set task parameters */ #define TM_GETOPT (TM_FIRST+22) /* get all task parameters */ #define TM_CONTEXT (TM_FIRST+23) /* allocate or free a context id */ #define TM_SHMCONN (TM_FIRST+24) /* shmem task connect */ #define TM_LAST (TM_FIRST+24) /* last TM_ message */ /* * for TM_DB */ #define TMDB_PUT 1 /* insert message */ #define TMDB_REMOVE 2 /* delete entry */ #define TMDB_GET 3 /* retrieve entry */ #define TMDB_NAMES 4 /* get list of all names defined */ #define TMDB_RESET 5 /* wipe out mbox db entries */ /* * for TM_SETOPT */ #define TS_OUTTID 1 /* stdout dst */ #define TS_OUTCTX 2 /* stdout message context */ #define TS_OUTTAG 3 /* stdout message tag */ #define TS_TRCTID 4 /* trace dst */ #define TS_TRCCTX 5 /* trace message context */ #define TS_TRCTAG 6 /* trace message tag */ #define TC_FIRST (int)0x80030001 /* first TC_ message */ #define TC_CONREQ (TC_FIRST+0) /* connection request */ #define TC_CONACK (TC_FIRST+1) /* connection request ack */ #define TC_TASKEXIT (TC_FIRST+2) /* task exited/doesn't exist */ #define TC_NOOP (TC_FIRST+3) /* do nothing */ #define TC_OUTPUT (TC_FIRST+4) /* child stdout data */ #define TC_SETTRACE (TC_FIRST+5) /* set task tracing */ #define TC_SETTMASK (TC_FIRST+6) /* set task trace mask */ #define TC_SETTRCBUF (TC_FIRST+7) /* set task trace buffer */ #define TC_SETTRCOPT (TC_FIRST+8) /* set task trace options */ #define TC_SHMAT (TC_FIRST+9) /* shmem connect handshake */ #define TC_OUTPUTX (TC_FIRST+10) /* (not sent) flush out coll */ #define TC_SIBLINGS (TC_FIRST+11) /* parent announce spawn grp */ #define TC_LAST (TC_FIRST+11) /* last TC_ message */ /* * for Task Output Ops */ #define TO_EOF 0 #define TO_SPAWN -1 #define TO_NEW -2 /* Contexts Used by Some System Calls - these are allocated from the top of the context space */ #define SYSCTX_FIRST (int) 0x0007ffff /* first system context */ #define SYSCTX_TC (SYSCTX_FIRST-0) /* ctxt for TC messages */ #define SYSCTX_TM (SYSCTX_FIRST-1) /* ctxt for TM messages */ #define SYSCTX_SG (SYSCTX_FIRST-2) /* ctxt for static group formation*/ #define SYSCTX_DG (SYSCTX_FIRST-3) /* ctxt for dynamic groups */ #define SYSCTX_RS4 (SYSCTX_FIRST-4) /* Reserved system context */ #define SYSCTX_RS5 (SYSCTX_FIRST-5) /* Reserved system context */ #define SYSCTX_RS6 (SYSCTX_FIRST-6) /* Reserved system context */ #define SYSCTX_RS7 (SYSCTX_FIRST-7) /* Reserved system context */ #define SYSCTX_RS8 (SYSCTX_FIRST-8) /* Reserved system context */ #define SYSCTX_RS9 (SYSCTX_FIRST-9) /* Reserved system context */ #define SYSCTX_LAST (SYSCTX_FIRST-9) #define NUM_SYSCTX (SYSCTX_FIRST-SYSCTX_LAST+1) #define BASECONTEXT (int) 0 #endif /*_PVMPROTO_H_*/ ./pvm3/include/pvm3.h0000644007401100740110000006146711136216346013256 0ustar kohlkohl /* $Id: pvm3.h,v 1.55 2009/01/23 01:27:02 pvmsrc Exp $ */ /* * PVM version 3.4: Parallel Virtual Machine System * University of Tennessee, Knoxville TN. * Oak Ridge National Laboratory, Oak Ridge TN. * Emory University, Atlanta GA. * Authors: J. J. Dongarra, G. E. Fagg, M. Fischer * G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci, * P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam * (C) 1997 All Rights Reserved * * NOTICE * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted * provided that the above copyright notice appear in all copies and * that both the copyright notice and this permission notice appear in * supporting documentation. * * Neither the Institutions (Emory University, Oak Ridge National * Laboratory, and University of Tennessee) nor the Authors make any * representations about the suitability of this software for any * purpose. This software is provided ``as is'' without express or * implied warranty. * * PVM version 3 was funded in part by the U.S. Department of Energy, * the National Science Foundation and the State of Tennessee. */ /* * pvm3.h * * Libpvm3 includes. * * $Log: pvm3.h,v $ * Revision 1.55 2009/01/23 01:27:02 pvmsrc * Upped version to 3.4.6, in preparation for long-awaited release... :-D * (Spanker=kohl) * * Revision 1.54 2008/12/17 20:53:44 pvmsrc * Hell, just cram the fricking pre-release version in there... * - up to 3.4.5+10 now... :-} * (hope this doesn't break anything...! :-) * (Spanker=kohl) * * Revision 1.53 2007/01/04 22:46:20 pvmsrc * Upped PVMTMPNAMLEN again, from 64 to 128. * Also added proto for new pvm_strerror() function. * - both submitted by Frank Sonntag * (Spanker=kohl) * * Revision 1.52 2004/09/08 19:52:43 pvmsrc * Upped to PVM version 3.4.5 (how sequential... :) * (Spanker=kohl) * * Revision 1.51 2001/09/27 21:24:18 pvmsrc * Increased default PVMTMPNAMLEN to 64... * - suggested by BEOSCYLD / Joe Vitale * - seems like a good idea. :-) * (Spanker=kohl) * * Revision 1.50 2001/09/27 18:24:39 pvmsrc * Upped version to 3.4.4. * (Spanker=kohl) * * Revision 1.49 2001/09/26 21:55:51 pvmsrc * Oops... fixed function proto for pvmtmpnam()... * - leftover bogus cruft... * (Spanker=kohl) * * Revision 1.48 2001/09/25 21:17:49 pvmsrc * Minor TMPNAMFUN()/tmpnam() cleanup. * - moved macro def to pvm3.h, renamed PVMTNPMAN(). * - same for LEN_OF_TMP_NAM -> PVMTMPNAMLEN. * - mostly a huge waste of time, since *both* tmpnam() & mktemp() * produce the same "dangerous" warning message in Linux/gcc... * - damn. * (Spanker=kohl) * * Revision 1.47 2001/06/18 18:38:23 pvmsrc * Added missing function prototype for pvm_freezegroup()... * (Spanker=kohl) * * Revision 1.46 2000/02/16 22:50:01 pvmsrc * Upped version to 3.4.3 so I don't forget later. * (Spanker=kohl) * * Revision 1.45 2000/02/10 23:53:09 pvmsrc * Added new PvmIPLoopback error code. * - Master Host IP Address tied to Loopback. * (Spanker=kohl) * * Revision 1.44 1999/11/08 17:21:32 pvmsrc * Added PvmMboxDirectIndex stuff: * - PvmMboxMaxFlag: capped regular flags to squeeze in direct index... * - PvmMboxDirectIndexShift: # of bits to shift index in flags * - PvmMboxMaxDirectIndex: max direct index value, for error checking * - PvmMboxDirectIndex(): macro to convert direct index into flag bits * - PvmMboxDirectIndexOf(): macro to decode direct index from flags * (Spanker=kohl) * * Revision 1.43 1999/10/27 18:48:40 pvmsrc * Fixed (yet again) the prototype for pvm_recvf(). * - hopefully got it right this time... :-Q * (Spanker=kohl) * * Revision 1.42 1999/10/22 13:34:55 pvmsrc * Fixed prototype for pvm_recvf(). * - reported by "Ed D'Azevedo" . * (Spanker=kohl) * * Revision 1.41 1999/10/18 21:22:00 pvmsrc * Added function prototypes for: * - pvm_pkmesg(), pvm_pkmesgbody(), pvm_upkmesg(). * (Spanker=kohl) * * Revision 1.40 1999/08/19 16:07:14 pvmsrc * Upped version to 3.4.2. * (Spanker=kohl) * * Revision 1.39 1999/07/08 18:59:47 kohl * Fixed "Log" keyword placement. * - indent with " * " for new CVS. * * Revision 1.38 1999/06/07 20:06:53 pvmsrc * Upped version to 3.4.1. * (Spanker=kohl) * * Revision 1.37 1999/03/03 19:00:36 pvmsrc * Added new define PVM_PATCH_VERSION. * - the "0" in "3.4.0". * - to go along with PVM_MAJOR_VERSION & PVM_MINOR_VERSION. * (Spanker=kohl) * * Revision 1.36 1999/01/19 18:02:17 pvmsrc * Bumped PVM_VER to 3.4.0. * (Spanker=kohl) * * Revision 1.35 1999/01/13 00:03:19 pvmsrc * Fixed backwards compat. * - redefine old pvm_insert/lookup/delete() consts: * * PvmNoEntry -> PvmNotFound * * PvmDupEntry -> PvmDenied * - remove #ifdef PVM33COMPAT... O.K. in general. * (Spanker=kohl) * * Revision 1.34 1998/08/27 15:17:14 pvmsrc * Time to bump up to beta 7... * (Spanker=kohl) * * Revision 1.33 1997/12/30 18:15:32 pvmsrc * Oops... better skip directly to beta 6 instead of beta 5... * - separate WIN32 release is beta 5... * (Spanker=kohl) * * Revision 1.32 1997/12/29 19:53:51 pvmsrc * Upgraded from beta4 to beta5. * (Spanker=kohl) * * Revision 1.31 1997/09/15 20:54:29 pvmsrc * Fixed PVM_MAJOR_VERSION and PVM_MINOR_VERSION defines. * - VER -> VERSION. * - MAJOR = 3, MINOR = 4 (3.4.*). * (Spanker=kohl) * * Revision 1.30 1997/09/02 13:05:37 pvmsrc * Upgraded PVM_VER to 3.4 beta 4. * (Spanker=kohl) * * Revision 1.29 1997/07/09 13:29:36 pvmsrc * Fixed Author Header. * * Revision 1.28 1997/07/01 17:19:03 pvmsrc * The real real beta version number according to Garp. * * Revision 1.27 1997/07/01 15:54:35 pvmsrc * Trying again on the version. * - just straight 3.4.0. * * Revision 1.26 1997/07/01 14:17:26 pvmsrc * Set version for beta release to 3.4.1.0. * * Revision 1.25 1997/06/26 19:36:22 pvmsrc * Added error constant "PvmParentNotSet" so that * tc_siblings can get sibling tids even if the spawn flags * had parent as PvmNoParent. * * Revision 1.24 1997/06/25 19:41:02 pvmsrc * WIN32 fixes from Markus. * * Revision 1.23 1997/06/23 21:08:42 pvmsrc * Added new error code "PvmHostrNMstr" / -34. * - Hoster run on non-master host. * * Revision 1.22 1997/06/10 16:38:53 pvmsrc * Minor text cleanup. * * Revision 1.21 1997/05/06 18:58:56 pvmsrc * Upped version to 3.4.0.16. * * Revision 1.20 1997/04/17 12:52:28 pvmsrc * rename of pvm_mboxinfo() to include word "get" * * Revision 1.19 1997/04/10 20:09:57 pvmsrc * Fixed prototype for pvm_mboxinfo(). * - pvm_getnames() is history. * * Revision 1.18 1997/04/10 19:34:57 pvmsrc * Added new pvmmboxinfo structure. * - for pvm_mboxinfo(). * * Revision 1.17 1997/04/09 20:21:51 pvmsrc * Added PvmMboxWaitForInfo/PVMMBOXWAITFORINFO constants. * * Revision 1.16 1997/04/07 20:50:48 pvmsrc * pvm_addmhf() protoglarp set to new parameter interface * * Revision 1.15 1997/04/03 18:19:02 pvmsrc * Added a define for PvmBaseContext - this is 3.3 compatible context. * codes that don't ever set their context should operate in this context. * * Revision 1.14 1997/04/01 16:46:09 pvmsrc * Fixed protos for pvm_putinfo(), pvm_recvinfo() (formerly pvm_getinfo()). * * Revision 1.13 1997/03/31 21:38:05 pvmsrc * Replaced original mbox constants with new syntax: * - gone: PvmExclusive, PvmFirstAvail, PvmLock, PvmSticky. * - new: PvmMboxDefault, PvmMboxPersistent, PvmMboxMultiInstance, * PvmMboxOverWritable, PvmMboxFirstAvail, PvmMboxReadAndDelete. * - fortran equivalents. * - checked in for sscott. * * Revision 1.12 1997/03/26 21:51:55 pvmsrc * Added "PvmNoSpawnParent" spawn option constant. * - PVMNOSPAWNPARENT for Fortran. * * Revision 1.11 1997/03/07 14:41:10 pvmsrc * PVM patches from the base 3.3.10 to 3.3.11 versions where applicable. * Originals by Bob Manchek. Altered by Graham Fagg where required. * * added pvm_export / pvm_unexport to user API. * * Revision 1.10 1997/03/04 19:44:11 pvmsrc * Added system message mailbox class name #defines: * - PVMHOSTERCLASS, PVMTASKERCLASS, PVMTRACERCLASS, PVMRMCLASS. * * Revision 1.9 1997/02/17 18:47:51 pvmsrc * Oops... must pass ptr to tids array for pvm_getnoresets(). * * Revision 1.8 1997/02/17 16:30:11 pvmsrc * Added proto for new pvm_getnoresets() routine. * - note: not an official interface routine... * * Revision 1.7 1997/02/13 23:12:41 pvmsrc * Added PVMNORESETCLASS class name for PvmNoReset. * * Revision 1.6 1997/02/13 23:05:22 pvmsrc * Added new PvmNoReset setopt/getopt constant. * * Revision 1.5 1997/01/28 19:14:20 pvmsrc * New Copyright Notice & Authors. * * Revision 1.4 1996/10/24 19:33:48 pvmsrc * Modified for New Tracing Facility: * - added user-defined message encoding, PvmDataTrace. * - added new option constants: * PvmTraceBuffer, PvmTraceOptions, * PvmSelfTraceBuffer & PvmSelfTraceOptions, * - added PvmTraceFull, PvmTraceTime & PvmTraceCount for trace opts. * - added function prototype for new pvm_reg_tracer() routine. * * Revision 1.3 1996/10/11 17:01:52 pvmsrc * Replaced references to pvm_remove() with pvm_delinfo(): renamed. * * Revision 1.2 1996/10/08 18:30:30 pvmsrc * Renamed routines: * - pvm_put() -> pvm_putinfo(). * - pvm_get() -> pvm_getinfo(). * * Revision 1.1 1996/09/23 21:06:31 pvmsrc * Initial revision * */ #ifndef _PVM3_H_ #define _PVM3_H_ /* * Release version */ #define PVM_VER "3.4.6" #define PVM_MAJOR_VERSION 3 #define PVM_MINOR_VERSION 4 #define PVM_PATCH_VERSION 6 #ifndef WIN32 #include #else #include "pvmwin.h" #include #include #endif /* * Data packing styles for pvm_initsend() */ #define PvmDataDefault 0 /* XDR encoding */ #define PvmDataRaw 1 /* Raw data copy */ #define PvmDataInPlace 2 /* Raw data, left in place */ #define PvmDataFoo PvmDataDefault /* Internal use */ #define PvmDataTrace 4 /* User-Defined Trace Encoding */ /* * pvm_spawn options */ #define PvmTaskDefault 0 #define PvmTaskHost 1 /* specify host */ #define PvmTaskArch 2 /* specify architecture */ #define PvmTaskDebug 4 /* start task in debugger */ #define PvmTaskTrace 8 /* process generates trace data */ /* for MPP ports */ #define PvmMppFront 16 /* spawn task on service node */ #define PvmHostCompl 32 /* complement host set */ /* for parent-less spawning */ #define PvmNoSpawnParent 64 /* * pvm_notify kinds */ #define PvmTaskExit 1 /* on task exit */ #define PvmHostDelete 2 /* on host fail/delete */ #define PvmHostAdd 3 /* on host startup */ #define PvmRouteAdd 4 /* new task-task route opened */ #define PvmRouteDelete 5 /* task-task route closed */ /* flags combined with notify kind */ #define PvmNotifyCancel 256 /* cancel (complete immediately) notifies */ /* * for pvm_setopt and pvm_getopt */ #define PvmRoute 1 /* routing policy */ #define PvmDontRoute 1 /* don't allow direct task-task links */ #define PvmAllowDirect 2 /* allow direct links, but don't request */ #define PvmRouteDirect 3 /* request direct links */ #define PvmDebugMask 2 /* debugmask */ #define PvmAutoErr 3 /* auto error reporting */ #define PvmOutputTid 4 /* stdout destination for children */ #define PvmOutputCode 5 /* stdout message tag */ #define PvmTraceTid 6 /* trace destination for children */ #define PvmTraceCode 7 /* trace message tag */ #define PvmTraceBuffer 8 /* trace buffering for children */ #define PvmTraceOptions 9 /* trace options for children */ #define PvmTraceFull 1 /* do full trace events */ #define PvmTraceTime 2 /* only do PVM routine timings */ #define PvmTraceCount 3 /* only do PVM routine profiling */ #define PvmFragSize 10 /* message fragment size */ #define PvmResvTids 11 /* allow reserved message tids and codes */ #define PvmSelfOutputTid 12 /* stdout destination for task */ #define PvmSelfOutputCode 13 /* stdout message tag */ #define PvmSelfTraceTid 14 /* trace destination for task */ #define PvmSelfTraceCode 15 /* trace message tag */ #define PvmSelfTraceBuffer 16 /* trace buffering for task */ #define PvmSelfTraceOptions 17 /* trace options for task */ #define PvmShowTids 18 /* pvm_catchout prints task ids with output */ #define PvmPollType 19 /* shared memory wait method */ #define PvmPollConstant 1 #define PvmPollSleep 2 #define PvmPollTime 20 /* time before sleep if PvmPollSleep */ #define PvmOutputContext 21 /* stdout message context */ #define PvmTraceContext 22 /* trace message context */ #define PvmSelfOutputContext 23 /* stdout message context */ #define PvmSelfTraceContext 24 /* trace message context */ #define PvmNoReset 25 /* do not kill task on reset */ /* * for pvm_[sg]ettmask */ #define PvmTaskSelf 0 /* this task */ #define PvmTaskChild 1 /* (future) child tasks */ /* * Need to have PvmBaseContext defined */ #define PvmBaseContext 0 /* * for message mailbox operations: pvm_putinfo and pvm_recvinfo */ #define PvmMboxDefault 0 /* put: single locked instance */ /* recv: 1st entry */ /* start w/index=0 */ #define PvmMboxPersistent 1 /* entry remains after owner exit */ #define PvmMboxMultiInstance 2 /* multiple entries in class */ #define PvmMboxOverWritable 4 /* can write over this entry */ #define PvmMboxFirstAvail 8 /* select 1st index >= specified */ #define PvmMboxReadAndDelete 16 /* atomic read / delete */ /* requires read & delete rights */ #define PvmMboxWaitForInfo 32 /* for blocking recvinfo */ #define PvmMboxMaxFlag 512 /* maximum mbox flag bit value */ #define PvmMboxDirectIndexShift 10 /* log2(PvmMboxMaxFlag) + 1 */ #define PvmMboxMaxDirectIndex \ ( (unsigned) 1 << ( 31 - PvmMboxDirectIndexShift ) ) #define PvmMboxDirectIndexOf( _flags ) \ ( ( (_flags) & \ ( ( PvmMboxMaxDirectIndex - 1 ) << PvmMboxDirectIndexShift ) ) \ >> PvmMboxDirectIndexShift ) #define PvmMboxDirectIndex( _index ) \ ( ( (_index) >= PvmMboxMaxDirectIndex ) ? \ ( fprintf( stderr, "Mbox Direct Index Too Large: %d >= %d\n", \ (_index), PvmMboxMaxDirectIndex ), 0 ) \ : ( (_index) << PvmMboxDirectIndexShift ) ) /* * pre-defined system message mailbox classes */ #define PVMNORESETCLASS "###_PVM_NO_RESET_###" #define PVMHOSTERCLASS "###_PVM_HOSTER_###" #define PVMTASKERCLASS "###_PVM_TASKER_###" #define PVMTRACERCLASS "###_PVM_TRACER_###" #define PVMRMCLASS "###_PVM_RM_###" /* * Libpvm error codes */ #define PvmOk 0 /* Success */ #define PvmBadParam -2 /* Bad parameter */ #define PvmMismatch -3 /* Parameter mismatch */ #define PvmOverflow -4 /* Value too large */ #define PvmNoData -5 /* End of buffer */ #define PvmNoHost -6 /* No such host */ #define PvmNoFile -7 /* No such file */ #define PvmDenied -8 /* Permission denied */ #define PvmNoMem -10 /* Malloc failed */ #define PvmBadMsg -12 /* Can't decode message */ #define PvmSysErr -14 /* Can't contact local daemon */ #define PvmNoBuf -15 /* No current buffer */ #define PvmNoSuchBuf -16 /* No such buffer */ #define PvmNullGroup -17 /* Null group name */ #define PvmDupGroup -18 /* Already in group */ #define PvmNoGroup -19 /* No such group */ #define PvmNotInGroup -20 /* Not in group */ #define PvmNoInst -21 /* No such instance */ #define PvmHostFail -22 /* Host failed */ #define PvmNoParent -23 /* No parent task */ #define PvmNotImpl -24 /* Not implemented */ #define PvmDSysErr -25 /* Pvmd system error */ #define PvmBadVersion -26 /* Version mismatch */ #define PvmOutOfRes -27 /* Out of resources */ #define PvmDupHost -28 /* Duplicate host */ #define PvmCantStart -29 /* Can't start pvmd */ #define PvmAlready -30 /* Already in progress */ #define PvmNoTask -31 /* No such task */ #define PvmNotFound -32 /* Not Found */ #define PvmExists -33 /* Already exists */ #define PvmHostrNMstr -34 /* Hoster run on non-master host */ #define PvmParentNotSet -35 /* Spawning parent set PvmNoSpawnParent */ #define PvmIPLoopback -36 /* Master Host's IP is Loopback */ /* * crusty error constants from 3.3, now redefined... */ #define PvmNoEntry PvmNotFound /* No such entry */ #define PvmDupEntry PvmDenied /* Duplicate entry */ /* * Data types for pvm_reduce(), pvm_psend(), pvm_precv() */ #define PVM_STR 0 /* string */ #define PVM_BYTE 1 /* byte */ #define PVM_SHORT 2 /* short */ #define PVM_INT 3 /* int */ #define PVM_FLOAT 4 /* real */ #define PVM_CPLX 5 /* complex */ #define PVM_DOUBLE 6 /* double */ #define PVM_DCPLX 7 /* double complex */ #define PVM_LONG 8 /* long integer */ #define PVM_USHORT 9 /* unsigned short int */ #define PVM_UINT 10 /* unsigned int */ #define PVM_ULONG 11 /* unsigned long int */ /* * returned by pvm_config() */ struct pvmhostinfo { int hi_tid; /* pvmd tid */ char *hi_name; /* host name */ char *hi_arch; /* host arch */ int hi_speed; /* cpu relative speed */ int hi_dsig; /* data signature */ }; /* * returned by pvm_tasks() */ struct pvmtaskinfo { int ti_tid; /* task id */ int ti_ptid; /* parent tid */ int ti_host; /* pvmd tid */ int ti_flag; /* status flags */ char *ti_a_out; /* a.out name */ int ti_pid; /* task (O/S dependent) process id */ }; /* * for pvm_getminfo(), pvm_setminfo() */ struct pvmminfo { int len; /* message length */ int ctx; /* context */ int tag; /* tag */ int wid; /* wait id */ int enc; /* encoding */ int crc; /* crc checksum */ int src; /* source tid */ int dst; /* destination tid */ }; /* * returned by pvm_getmboxinfo() */ struct pvmmboxinfo { char *mi_name; /* class name */ int mi_nentries; /* # of entries for this class */ int *mi_indices; /* mbox entry indices */ int *mi_owners; /* mbox entry owner tids */ int *mi_flags; /* mbox entry flags */ }; /* * temporary file name function / macro * (since there are so many choices, but so little time, * and since gcc now complains about tmpnam()... :-Q) */ #ifdef NOTMPNAM #define PVMTMPNAMFUN(x) pvmtmpnam(x) #define PVMTMPNAMLEN 128 #else #define PVMTMPNAMFUN(x) tmpnam(x) #ifdef L_tmpnam #define PVMTMPNAMLEN L_tmpnam #else #define PVMTMPNAMLEN 128 #endif #endif /* * function prototypes */ #ifdef __ProtoGlarp__ #undef __ProtoGlarp__ #endif #if defined(__STDC__) || defined(__cplusplus) #define __ProtoGlarp__(x) x #else #define __ProtoGlarp__(x) () #endif #ifdef __cplusplus extern "C" { #endif #ifdef NOTMPNAM char *pvmtmpnam __ProtoGlarp__(( char * )); #endif char *pvmgetrsh __ProtoGlarp__(( void )); char *pvmgettmp __ProtoGlarp__(( void )); char *pvm_strerror __ProtoGlarp__(( void )); int pvm_addhosts __ProtoGlarp__(( char **, int, int * )); int pvm_addmhf __ProtoGlarp__(( int, int, int, int (*) (int) )); int pvm_archcode __ProtoGlarp__(( char * )); int pvm_barrier __ProtoGlarp__(( char *, int )); int pvm_bcast __ProtoGlarp__(( char *, int )); int pvm_bufinfo __ProtoGlarp__(( int, int *, int *, int * )); #if defined(EOF) int pvm_catchout __ProtoGlarp__(( FILE * )); #endif int pvm_config __ProtoGlarp__(( int *, int *, struct pvmhostinfo ** )); int pvm_delhosts __ProtoGlarp__(( char **, int, int * )); int pvm_delinfo __ProtoGlarp__(( char *, int, int )); int pvm_delmhf __ProtoGlarp__(( int )); int pvm_exit __ProtoGlarp__(( void )); int pvm_export __ProtoGlarp__(( char * )); int pvm_freebuf __ProtoGlarp__(( int )); int pvm_freecontext __ProtoGlarp__(( int )); int pvm_freezegroup __ProtoGlarp__(( char *, int )); int pvm_gather __ProtoGlarp__(( void*, void*, int, int, int, char*, int)); int pvm_getcontext __ProtoGlarp__(( void )); int pvm_getfds __ProtoGlarp__(( int ** )); int pvm_getinst __ProtoGlarp__(( char *, int )); int pvm_getminfo __ProtoGlarp__(( int, struct pvmminfo * )); int pvm_getnoresets __ProtoGlarp__(( int **, int * )); int pvm_getopt __ProtoGlarp__(( int )); int pvm_getrbuf __ProtoGlarp__(( void )); int pvm_getsbuf __ProtoGlarp__(( void )); int pvm_gettid __ProtoGlarp__(( char *, int )); int pvm_gsize __ProtoGlarp__(( char * )); int pvm_halt __ProtoGlarp__(( void )); int pvm_hostsync __ProtoGlarp__(( int, struct timeval *, struct timeval * )); int pvm_initsend __ProtoGlarp__(( int )); int pvm_joingroup __ProtoGlarp__(( char * )); int pvm_kill __ProtoGlarp__(( int )); int pvm_lvgroup __ProtoGlarp__(( char * )); int pvm_getmboxinfo __ProtoGlarp__(( char *, int *, struct pvmmboxinfo ** )); int pvm_mcast __ProtoGlarp__(( int *, int, int )); int pvm_mkbuf __ProtoGlarp__(( int )); int pvm_mstat __ProtoGlarp__(( char * )); int pvm_mytid __ProtoGlarp__(( void )); int pvm_newcontext __ProtoGlarp__(( void )); int pvm_notify __ProtoGlarp__(( int, int, int, int * )); int pvm_nrecv __ProtoGlarp__(( int, int )); int pvm_packf __ProtoGlarp__(( const char *, ... )); int pvm_parent __ProtoGlarp__(( void )); int pvm_perror __ProtoGlarp__(( char * )); int pvm_pkbyte __ProtoGlarp__(( char *, int, int )); int pvm_pkcplx __ProtoGlarp__(( float *, int, int )); int pvm_pkdcplx __ProtoGlarp__(( double *, int, int )); int pvm_pkdouble __ProtoGlarp__(( double *, int, int )); int pvm_pkfloat __ProtoGlarp__(( float *, int, int )); int pvm_pkint __ProtoGlarp__(( int *, int, int )); int pvm_pklong __ProtoGlarp__(( long *, int, int )); int pvm_pkshort __ProtoGlarp__(( short *, int, int )); int pvm_pkstr __ProtoGlarp__(( char * )); int pvm_pkuint __ProtoGlarp__(( unsigned int *, int, int )); int pvm_pkulong __ProtoGlarp__(( unsigned long *, int, int )); int pvm_pkushort __ProtoGlarp__(( unsigned short *, int, int )); int pvm_pkmesg __ProtoGlarp__(( int )); int pvm_pkmesgbody __ProtoGlarp__(( int )); int pvm_precv __ProtoGlarp__(( int, int, void *, int, int, int *, int *, int * )); int pvm_probe __ProtoGlarp__(( int, int )); int pvm_psend __ProtoGlarp__(( int, int, void *, int, int )); int pvm_pstat __ProtoGlarp__(( int )); int pvm_putinfo __ProtoGlarp__(( char *, int, int )); int pvm_recv __ProtoGlarp__(( int, int )); int (*pvm_recvf __ProtoGlarp__(( int (*)(int, int, int) )) ) __ProtoGlarp__(( int (*)(int, int, int) )); int pvm_recvinfo __ProtoGlarp__(( char *, int, int )); int pvm_reduce __ProtoGlarp__(( void (*)(int*, void*, void*, int*, int*), void *, int, int, int, char *, int )); /* * Predefined pvm_reduce functions */ void PvmMax __ProtoGlarp__(( int *, void *, void *, int *, int * )); void PvmMin __ProtoGlarp__(( int *, void *, void *, int *, int * )); void PvmSum __ProtoGlarp__(( int *, void *, void *, int *, int * )); void PvmProduct __ProtoGlarp__(( int *, void *, void *, int *, int * )); int pvm_reg_hoster __ProtoGlarp__(( void )); int pvm_reg_rm __ProtoGlarp__(( struct pvmhostinfo ** )); int pvm_reg_tasker __ProtoGlarp__(( void )); int pvm_reg_tracer __ProtoGlarp__(( int, int, int, int, char*, int, int )); int pvm_scatter __ProtoGlarp__(( void*, void*, int, int, int, char*, int)); int pvm_send __ProtoGlarp__(( int, int )); int pvm_sendsig __ProtoGlarp__(( int, int )); int pvm_setcontext __ProtoGlarp__(( int )); int pvm_setminfo __ProtoGlarp__(( int, struct pvmminfo * )); int pvm_setopt __ProtoGlarp__(( int, int )); int pvm_setrbuf __ProtoGlarp__(( int )); int pvm_setsbuf __ProtoGlarp__(( int )); int pvm_siblings __ProtoGlarp__(( int ** )); int pvm_spawn __ProtoGlarp__(( char *, char **, int, char *, int, int * )); int pvm_start_pvmd __ProtoGlarp__(( int, char **, int )); int pvm_tasks __ProtoGlarp__(( int, int *, struct pvmtaskinfo ** )); int pvm_tickle __ProtoGlarp__(( int, int *, int *, int * )); int pvm_tidtohost __ProtoGlarp__(( int )); int pvm_trecv __ProtoGlarp__(( int, int, struct timeval * )); int pvm_unexport __ProtoGlarp__(( char * )); int pvm_unpackf __ProtoGlarp__(( const char *, ... )); int pvm_upkbyte __ProtoGlarp__(( char *, int, int )); int pvm_upkcplx __ProtoGlarp__(( float *, int, int )); int pvm_upkdcplx __ProtoGlarp__(( double *, int, int )); int pvm_upkdouble __ProtoGlarp__(( double *, int, int )); int pvm_upkfloat __ProtoGlarp__(( float *, int, int )); int pvm_upkint __ProtoGlarp__(( int *, int, int )); int pvm_upklong __ProtoGlarp__(( long *, int, int )); int pvm_upkshort __ProtoGlarp__(( short *, int, int )); int pvm_upkstr __ProtoGlarp__(( char * )); int pvm_upkuint __ProtoGlarp__(( unsigned int *, int, int )); int pvm_upkulong __ProtoGlarp__(( unsigned long *, int, int )); int pvm_upkushort __ProtoGlarp__(( unsigned short *, int, int )); int pvm_upkmesg __ProtoGlarp__(( void )); char *pvm_version __ProtoGlarp__(( void )); /* * these are going away in the next version. * use the replacements */ #ifdef PVM33COMPAT int pvm_getmwid __ProtoGlarp__(( int )); int pvm_setmwid __ProtoGlarp__(( int, int )); #endif /* these are now backwards compatible -> they use mbox interface... */ int pvm_delete __ProtoGlarp__(( char *, int )); int pvm_insert __ProtoGlarp__(( char *, int, int )); int pvm_lookup __ProtoGlarp__(( char *, int, int * )); #ifdef __cplusplus } #endif #endif /*_PVM3_H_*/ ./pvm3/include/fpvm3.h0000644007401100740110000002231007050647544013414 0ustar kohlkohlc c $Id: fpvm3.h,v 1.15 2000/02/10 23:53:08 pvmsrc Exp $ c c ------------------------------------------------------------------- c PVM version 3.4: Parallel Virtual Machine System c University of Tennessee, Knoxville TN. c Oak Ridge National Laboratory, Oak Ridge TN. c Emory University, Atlanta GA. c Authors: J. J. Dongarra, G. E. Fagg, M. Fischer c G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci, c P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam c (C) 1997 All Rights Reserved c c NOTICE c c Permission to use, copy, modify, and distribute this software and c its documentation for any purpose and without fee is hereby granted c provided that the above copyright notice appear in all copies and c that both the copyright notice and this permission notice appear in c supporting documentation. c c Neither the Institutions (Emory University, Oak Ridge National c Laboratory, and University of Tennessee) nor the Authors make any c representations about the suitability of this software for any c purpose. This software is provided ``as is'' without express or c implied warranty. c c PVM version 3 was funded in part by the U.S. Department of Energy, c the National Science Foundation and the State of Tennessee. c ------------------------------------------------------------------- c ---------------------------------- c fpvm3.h c c Definitions to be included with c User Fortran application c ---------------------------------- integer PVMTASKDEFAULT, PVMTASKHOST, PVMTASKARCH, PVMTASKDEBUG integer PVMTASKTRACE, PVMMPPFRONT, PVMHOSTCOMPL, PVMNOSPAWNPARENT integer PVMHOST, PVMARCH, PVMDEBUG, PVMTRACE integer PVMDATADEFAULT, PVMDATARAW, PVMDATAINPLACE integer PVMDATATRACE integer PVMDEFAULT, PVMRAW, PVMINPLACE integer PVMTASKEXIT, PVMHOSTDELETE, PVMHOSTADD, PVMROUTEADD integer PVMROUTEDELETE, PVMNOTIFYCANCEL integer PVMROUTE, PVMDEBUGMASK, PVMAUTOERR integer PVMOUTPUTTID, PVMOUTPUTCODE, PVMRESVTIDS integer PVMTRACETID, PVMTRACECODE, PVMTRACEBUFFER integer PVMTRACEOPTIONS, PVMFRAGSIZE, PVMSHOWTIDS, PVMNORESET integer PVMTRACEFULL, PVMTRACETIME, PVMTRACECOUNT integer PVMSOUTPUTTID, PVMSOUTPUTCODE, PVMSTRACETID integer PVMSTRACECODE, PVMSTRACEBUFFER, PVMSTRACEOPTIONS integer PVMOUTPUTCTX, PVMTRACECTX, PVMSOUTPUTCTX, PVMSTRACECTX integer PVMDONTROUTE, PVMALLOWDIRECT, PVMROUTEDIRECT integer PVMPOLLTYPE, PVMPOLLTIME, PVMPOLLCONSTANT, PVMPOLLSLEEP integer PVMMBOXDEFAULT, PVMMBOXPERSISTENT, PVMMBOXMULTIINSTANCE integer PVMMBOXOVERWRITABLE, PVMMBOXFIRSTAVAIL integer PVMMBOXREADANDDELETE, PVMMBOXWAITFORINFO integer STRING, BYTE1, INTEGER2, INTEGER4, INTEGER8 integer REAL4, COMPLEX8, REAL8, COMPLEX16 integer PvmOk, PvmSysErr, PvmBadParam, PvmMismatch integer PvmNoData, PvmNoHost, PvmNoFile, PvmNoMem integer PvmBadMsg, PvmNoBuf, PvmNoSuchBuf integer PvmNullGroup, PvmDupGroup, PvmNoGroup integer PvmNotInGroup, PvmNoInst, PvmHostFail, PvmNoParent integer PvmNotImpl, PvmDSysErr, PvmBadVersion, PvmOutOfRes integer PvmDupHost, PvmCantStart, PvmAlready, PvmNoTask integer PvmNoEntry, PvmDupEntry, PvmOverflow, PvmDenied integer PvmNotFound, PvmExists, PvmHostrNMstr, PvmParentNotSet integer PvmIPLoopback c -------------------- c spawn 'flag' options c -------------------- parameter( PVMTASKDEFAULT = 0) parameter( PVMTASKHOST = 1) parameter( PVMTASKARCH = 2) parameter( PVMTASKDEBUG = 4) parameter( PVMTASKTRACE = 8) parameter( PVMMPPFRONT = 16) parameter( PVMHOSTCOMPL = 32) parameter( PVMNOSPAWNPARENT = 64) c -------------------------------- c old option names still supported c -------------------------------- parameter( PVMHOST = 1) parameter( PVMARCH = 2) parameter( PVMDEBUG = 4) parameter( PVMTRACE = 8) c ------------------------- c buffer 'encoding' options c ------------------------- parameter( PVMDATADEFAULT = 0) parameter( PVMDATARAW = 1) parameter( PVMDATAINPLACE = 2) parameter( PVMDATATRACE = 4) c -------------------------------- c old option names still supported c -------------------------------- parameter( PVMDEFAULT = 0) parameter( PVMRAW = 1) parameter( PVMINPLACE = 2) c ---------------------- c notify 'about' options c ---------------------- parameter( PVMTASKEXIT = 1 ) parameter( PVMHOSTDELETE = 2 ) parameter( PVMHOSTADD = 3 ) parameter( PVMROUTEADD = 4 ) parameter( PVMROUTEDELETE = 5 ) parameter( PVMNOTIFYCANCEL = 256 ) c -------------------------------- c packing/unpacking 'what' options c -------------------------------- parameter( STRING = 0) parameter( BYTE1 = 1) parameter( INTEGER2 = 2) parameter( INTEGER4 = 3) parameter( REAL4 = 4) parameter( COMPLEX8 = 5) parameter( REAL8 = 6) parameter( COMPLEX16= 7) parameter( INTEGER8 = 8) c -------------------------------- c setopt/getopt options for 'what' c -------------------------------- parameter( PVMROUTE = 1) parameter( PVMDEBUGMASK = 2) parameter( PVMAUTOERR = 3) parameter( PVMOUTPUTTID = 4) parameter( PVMOUTPUTCODE = 5) parameter( PVMTRACETID = 6) parameter( PVMTRACECODE = 7) parameter( PVMTRACEBUFFER = 8) parameter( PVMTRACEOPTIONS = 9) parameter( PVMFRAGSIZE = 10) parameter( PVMRESVTIDS = 11) parameter( PVMSOUTPUTTID = 12) parameter( PVMSOUTPUTCODE = 13) parameter( PVMSTRACETID = 14) parameter( PVMSTRACECODE = 15) parameter( PVMSTRACEBUFFER = 16) parameter( PVMSTRACEOPTIONS = 17) parameter( PVMSHOWTIDS = 18) parameter( PVMPOLLTYPE = 19) parameter( PVMPOLLTIME = 20) parameter( PVMOUTPUTCTX = 21) parameter( PVMTRACECTX = 22) parameter( PVMSOUTPUTCTX = 23) parameter( PVMSTRACECTX = 24) parameter( PVMNORESET = 25) c -------------------------------------------- c tracing option values for setopt function c -------------------------------------------- parameter( PVMTRACEFULL = 1) parameter( PVMTRACETIME = 2) parameter( PVMTRACECOUNT = 3) c -------------------------------------------- c poll type options for 'how' in setopt function c -------------------------------------------- parameter( PVMPOLLCONSTANT = 1) parameter( PVMPOLLSLEEP = 2) c -------------------------------------------- c for message mailbox operations c -------------------------------------------- parameter( PVMMBOXDEFAULT = 0) parameter( PVMMBOXPERSISTENT = 1) parameter( PVMMBOXMULTIINSTANCE = 2) parameter( PVMMBOXOVERWRITABLE = 4) parameter( PVMMBOXFIRSTAVAIL = 8) parameter( PVMMBOXREADANDDELETE = 16) parameter( PVMMBOXWAITFORINFO = 32) c -------------------------------------------- c routing options for 'how' in setopt function c -------------------------------------------- parameter( PVMDONTROUTE = 1) parameter( PVMALLOWDIRECT= 2) parameter( PVMROUTEDIRECT= 3) c -------------------------- c error 'info' return values c -------------------------- parameter( PvmOk = 0) parameter( PvmBadParam = -2) parameter( PvmMismatch = -3) parameter( PvmOverflow = -4) parameter( PvmNoData = -5) parameter( PvmNoHost = -6) parameter( PvmNoFile = -7) parameter( PvmDenied = -8) parameter( PvmNoMem = -10) parameter( PvmBadMsg = -12) parameter( PvmSysErr = -14) parameter( PvmNoBuf = -15) parameter( PvmNoSuchBuf = -16) parameter( PvmNullGroup = -17) parameter( PvmDupGroup = -18) parameter( PvmNoGroup = -19) parameter( PvmNotInGroup = -20) parameter( PvmNoInst = -21) parameter( PvmHostFail = -22) parameter( PvmNoParent = -23) parameter( PvmNotImpl = -24) parameter( PvmDSysErr = -25) parameter( PvmBadVersion = -26) parameter( PvmOutOfRes = -27) parameter( PvmDupHost = -28) parameter( PvmCantStart = -29) parameter( PvmAlready = -30) parameter( PvmNoTask = -31) parameter( PvmNotFound = -32) parameter( PvmExists = -33) parameter( PvmHostrNMstr = -34) parameter( PvmParentNotSet = -35) parameter( PvmIPLoopback = -36) c -------------------------- c these are going away in the next version. c use the replacements c -------------------------- parameter( PvmNoEntry = -32) parameter( PvmDupEntry = -33) c Uncomment this include for use with the WIN32 WATCOM fortran compiler c c include '../include/fpvm3_watcom.h' c ./pvm3/Readme.Beoscyld0000644007401100740110000001143107354706706013455 0ustar kohlkohl This readme file describes the BEOSCYLD (Scyld Beowulf) port of PVM. DESCRIPTION: The purpose of this port is to implement a version of PVM for use with the Scyld Beowulf cluster operating system. Since the slave nodes in a Scyld Beowulf cluster do not by default contain a full installation, the primary changes for this port were to provide the mechanisms for getting jobs out to the slave nodes. There were two major problems to solve. Number one, how do we get PVM slave daemons out to the slave nodes? And number two, how can a slave daemon spawn a job when there typically aren't any binaries on the slave node? The first problem is typically solved using 'rsh' or 'ssh'. However since Scyld slave nodes don't contain a full Linux installation, these tools couldn't be used. The solution was to use 'bpsh'. The bproc shell facility is used to migrate PVM slave daemons from the master node to the appropriate slave nodes. The solution to the second problem was implemented through the magic of bproc. The traditional fork/exec sequence could not be used on a slave node because in all likelihood the desired binary would not be available locally. When a PVM slave daemon performs a task spawn, the following sequence occurs: 1) fork is called to create a new process; 2) using bproc, the new process is moved back to the master node; 3) the binary is located on the master by searching the DEFBINDIR path; 4) once located, bproc is again used to execmove the process back to the slave node from which it came. The master PVM daemon can be started on the master node using the PVM console. You can use the console's add command to add slave nodes to your virtual machine. The syntax for the command would be as follows: "add .#", replacing the '#' character with the node's assigned number in the cluster (as listed in beosetup). Alternately, you can start the PVM console by specifying a hostfile name on the command line. This file should contain the .# names of the slave nodes you want as part of the virtual machine. As with standard PVM, this method automatically spawns PVM slave daemons to the appropriate slave nodes in the cluster. INSTALLATION & RUNTIME ISSUES: This section describes the installation and runtime issues associated with the RPM installation of the BEOSCYLD PVM port. If you're working from a tarball, with the BEOSCYLD patches applied, you need to define the following environment variables (as specified below) as explained in the general PVM Readme file: export PVM_ARCH=BEOSCYLD export PVM_RSH=`which bpsh` export PVM_ROOT= The use of these variables and others is explained in more detail in the pvm_intro man page. It's also probably a good idea to examine the build time configuration file: $PVM_ROOT/conf/BEOSCYLD.def. Assuming you're using the PVM tools from the RPM installation, the following build / runtime information may prove useful. 1) PVM_ARCH was set to BEOSCYLD when building the binaries. 2) PVM_ROOT was set to /usr/share/pvm3 when building the binaries. You can override this setting at runtime by creating a PVM_ROOT environment variable. 3) RSHCOMMAND was set to /usr/bin/bpsh when building the binaries. You can override this setting at runtime by creating a PVM_RSH environment variable. 4) PVMDPATH was set to /usr/sbin/pvmd3 when building the binaries. 5) The default binary directory search path, DEFBINDIR, was set to the following when building the binaries: /usr/bin:$PVM_ROOT/bin/$PVM_ARCH:$HOME/pvm3/bin/$PVM_ARCH PVM_ROOT and PVM_ARCH are as defined above and $HOME will of course be expanded appropriately at runtime. 6) All PVM tools and applications which make use of the PVM library, are statically linked against /usr/lib/libbproc.a. This alleviates the need to have the shared library version of libbproc out on the slave nodes to execute PVM binaries. KNOWN BUGS: This port was verified using the pvmtest33 "pvm test suite" tarball. All tests were executed and all tests passed. The only item worth mentioning is that if a PVM daemon running on a slave node crashes such that the file /tmp/pvmd.uid does not get deleted, the daemon will not restart on that slave node until the file is removed. This is not really a bug, but a result of PVM's implementation. It's mentioned merely because it is an easy thing to verify when things don't appear to be working properly with respect to slave nodes. Note that the PVM debugger was not tested. SUPPORT: For questions or comments about this PVM port, contact the author by sending an email to Joe Vitale at Scyld Computing Corporation, vitale@scyld.com, or by contacting the Scyld Technical Support Team directly at support@scyld.com. DISCLAIMER: THE AUTHOR MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESSED OR IMPLIED WARRANTY. ./pvm3/libfpvm/0000755007401100740110000000000011141631057012212 5ustar kohlkohl./pvm3/libfpvm/pvmfsleep.m40000644007401100740110000000026406673254612014473 0ustar kohlkohl /* $Id: pvmfsleep.m4,v 1.1 1999/03/15 19:03:38 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfsleep) ARGS(`secs') int *secs; { pvmsleep(*secs); } ./pvm3/libfpvm/pvmfgetrbuf.m40000644007401100740110000000027606225226313015012 0ustar kohlkohl /* $Id: pvmfgetrbuf.m4,v 1.2 1996/10/04 15:27:07 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfgetrbuf) ARGS(`mbuf') int *mbuf; { *mbuf = pvm_getrbuf(); } ./pvm3/libfpvm/pvmfgetctx.m40000644007401100740110000000030006336125743014646 0ustar kohlkohl /* $Id: pvmfgetctx.m4,v 1.2 1997/05/13 17:58:59 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfgetcontext) ARGS(`ctx') int *ctx; { *ctx = pvm_getcontext(); } ./pvm3/libfpvm/pvmfhostsync.m40000644007401100740110000000064506225226320015224 0ustar kohlkohl /* $Id: pvmfhostsync.m4,v 1.2 1996/10/04 15:27:12 pvmsrc Exp $ */ #include #include #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfhostsync) ARGS(`host, sec, usec, dsec, dusec, info') int *host, *sec, *usec, *dsec, *dusec, *info; { struct timeval t, dt; *info = pvm_hostsync(*host, &t, &dt); *sec = t.tv_sec; *usec = t.tv_usec; *dsec = dt.tv_sec; *dusec = dt.tv_usec; } ./pvm3/libfpvm/pvmfspawn.m40000644007401100740110000000172206225226354014506 0ustar kohlkohl /* $Id: pvmfspawn.m4,v 1.2 1996/10/04 15:27:40 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfspawn) ARGS(`STRING_ARG(aout), flag, STRING_ARG(where), count, tids, info') STRING_ARG_DECL(aout); STRING_ARG_DECL(where); int *flag, *count, *tids, *info; { char taout[MAX_PROC_NAME + 1]; char twhere[MAX_HOST_NAME + 1]; /* * Copy the program and where names to make sure there's * a NUL at the end. */ if (ftocstr(taout, sizeof(taout), STRING_PTR(aout), STRING_LEN(aout))) { *info = PvmBadParam; return; } /* * if the where parameter is '*', pass a NULL pointer to * initiate which will allow execution on any machine. */ if (*(STRING_PTR(where)) == '*') { *info = pvm_spawn(taout, (char**)0, *flag, "", *count, tids); } else { if (ftocstr(twhere, sizeof(twhere), STRING_PTR(where), STRING_LEN(where))) { *info = PvmBadParam; return; } *info = pvm_spawn(taout, (char**)0, *flag, twhere, *count, tids); } } ./pvm3/libfpvm/pvmfnotify.m40000644007401100740110000000042106225226331014654 0ustar kohlkohl /* $Id: pvmfnotify.m4,v 1.2 1996/10/04 15:27:21 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfnotify) ARGS(`about, msgtag, ntid, tids, info') int *about, *ntid, *tids, *msgtag, *info; { *info = pvm_notify(*about, *msgtag, *ntid, tids); } ./pvm3/libfpvm/pvmfgetopt.m40000644007401100740110000000031506225226312014647 0ustar kohlkohl /* $Id: pvmfgetopt.m4,v 1.2 1996/10/04 15:27:06 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfgetopt) ARGS(`what, val') int *what, *val; { *val = pvm_getopt(*what); } ./pvm3/libfpvm/pvmfunpack.m40000644007401100740110000000170607024271332014633 0ustar kohlkohl /* $Id: pvmfunpack.m4,v 1.4 1999/12/10 21:38:34 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfunpack) ARGS(`what, vp, cnt, std, info') int *what, *cnt, *std, *info; #ifdef __STDC__ void *vp; #else char *vp; #endif { switch( *what ) { case BYTE1: *info = pvm_upkbyte((char*)vp, *cnt, *std); break; case INTEGER2: *info = pvm_upkshort((short*)vp, *cnt, *std); break; case INTEGER4: *info = pvm_upkint((int*)vp, *cnt, *std); break; case INTEGER8: *info = pvm_upklong((long*)vp, *cnt, *std); break; case REAL4: *info = pvm_upkfloat((float*)vp, *cnt, *std); break; case COMPLEX8: *info = pvm_upkcplx((float*)vp, *cnt, *std); break; case REAL8: *info = pvm_upkdouble((double*)vp, *cnt, *std); break; case COMPLEX16: *info = pvm_upkdcplx((double*)vp, *cnt, *std); break; case STRING: *info = pvm_upkbyte((char*)vp, *cnt, *std); break; default: *info = PvmBadParam; break; } } ./pvm3/libfpvm/pvmfconfig.m40000644007401100740110000000224606334142342014620 0ustar kohlkohl /* $Id: pvmfconfig.m4,v 1.4 1997/05/07 18:07:30 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" #include "../src/bfunc.h" void FUNCTION(pvmfconfig) ARGS(`nhostp, narchp, tidp, STRING_ARG(name), STRING_ARG(arch), speedp, infop') int *nhostp, *narchp, *tidp, *speedp, *infop; STRING_ARG_DECL(name); STRING_ARG_DECL(arch); { static struct pvmhostinfo *hip = 0; static int nhost = 0; static int narch = 0; static int next = 0; int nh; int cc; /* if user sets nhostp to -1 then pvmfconfig() will be reset */ if ( nhost && nhostp && (*nhostp == -1) ) nhost = 0; if ( !nhost ) { if ( (cc = pvm_config( &nh, &narch, &hip )) < 0 ) { *infop = cc; return; } nhost = nh; next = 0; } if ( next < nhost ) { if ( nhostp ) *nhostp = nhost; if ( narchp ) *narchp = narch; if ( tidp ) *tidp = hip[ next ].hi_tid; if ( STRING_PTR(name) ) ctofstr( STRING_PTR(name), STRING_LEN(name), hip[ next ].hi_name ); if ( STRING_PTR(arch) ) ctofstr( STRING_PTR(arch), STRING_LEN(arch), hip[ next ].hi_arch ); if ( speedp ) *speedp = hip[ next ].hi_speed; *infop = 1; next++; } if ( next == nhost ) nhost = 0; } ./pvm3/libfpvm/pvmfdelhost.m40000644007401100740110000000101306225226304015004 0ustar kohlkohl /* $Id: pvmfdelhost.m4,v 1.2 1996/10/04 15:27:00 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfdelhost) ARGS(`STRING_ARG(host), info') STRING_ARG_DECL(host); int *info; { char thost[MAX_HOST_NAME + 1]; char *ptr = thost; int cc; /* * Copy the host name to make sure there's * a NUL at the end. */ if (ftocstr(thost, sizeof(thost), STRING_PTR(host), STRING_LEN(host))) { *info = PvmBadParam; return; } *info = pvm_delhosts(&ptr, 1, &cc); if (*info >= 0) *info = cc; } ./pvm3/libfpvm/pvmfsetsbuf.m40000644007401100740110000000032606225226353015027 0ustar kohlkohl /* $Id: pvmfsetsbuf.m4,v 1.2 1996/10/04 15:27:39 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfsetsbuf) ARGS(`mbuf, oldbuf') int *mbuf, *oldbuf; { *oldbuf = pvm_setsbuf(*mbuf); } ./pvm3/libfpvm/pvmfexit.m40000644007401100740110000000026606225226305014325 0ustar kohlkohl /* $Id: pvmfexit.m4,v 1.2 1996/10/04 15:27:01 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfexit) ARGS(`info') int *info; { *info = pvm_exit(); } ./pvm3/libfpvm/pvmfsetctx.m40000644007401100740110000000034706336125746014700 0ustar kohlkohl /* $Id: pvmfsetctx.m4,v 1.2 1997/05/13 17:59:02 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfsetcontext) ARGS(`new_ctx, old_ctx') int *new_ctx, *old_ctx; { *old_ctx = pvm_setcontext(*new_ctx); } ./pvm3/libfpvm/pvmfmytid.m40000644007401100740110000000026506225226330014477 0ustar kohlkohl /* $Id: pvmfmytid.m4,v 1.2 1996/10/04 15:27:20 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfmytid) ARGS(`tid') int *tid; { *tid = pvm_mytid(); } ./pvm3/libfpvm/pvmfsendsig.m40000644007401100740110000000034706225226347015016 0ustar kohlkohl /* $Id: pvmfsendsig.m4,v 1.2 1996/10/04 15:27:35 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfsendsig) ARGS(`tid, signum, info') int *tid, *signum, *info; { *info = pvm_sendsig(*tid, *signum); } ./pvm3/libfpvm/pvmfjoingrp.m40000644007401100740110000000072206225226322015020 0ustar kohlkohl /* $Id: pvmfjoingrp.m4,v 1.2 1996/10/04 15:27:14 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfjoingroup) ARGS(`STRING_ARG(group), inum') STRING_ARG_DECL(group); int *inum; { char tgroup[MAX_GRP_NAME + 1]; /* * Copy the group name to make sure there's * a NUL at the end. */ if (ftocstr(tgroup, sizeof(tgroup), STRING_PTR(group), STRING_LEN(group))){ *inum = PvmBadParam; return; } *inum = pvm_joingroup(tgroup); } ./pvm3/libfpvm/pvmfgettid.m40000644007401100740110000000073306225226315014634 0ustar kohlkohl /* $Id: pvmfgettid.m4,v 1.2 1996/10/04 15:27:09 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfgettid) ARGS(`STRING_ARG(group), inum, tid') STRING_ARG_DECL(group); int *inum, *tid; { char tgroup[MAX_GRP_NAME + 1]; /* * Copy the group name to make sure there's * a NUL at the end. */ if (ftocstr(tgroup, sizeof(tgroup), STRING_PTR(group), STRING_LEN(group))){ *tid = PvmBadParam; return; } *tid = pvm_gettid(tgroup, *inum); } ./pvm3/libfpvm/pvmfsiblings.m40000644007401100740110000000076607502372403015173 0ustar kohlkohl /* $Id: pvmfsiblings.m4,v 1.3 2002/06/14 13:52:03 pvmsrc Exp $ */ #include #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfsiblings) ARGS(`nsiblings, sibidx, stid') int *nsiblings, *sibidx, *stid; { static int nsib = -1; static int *sibs; if (nsib == -1) nsib = pvm_siblings(&sibs); if ( nsiblings != NULL ) *nsiblings = nsib; if ( sibidx != NULL && stid != NULL ) { if (*sibidx >= 0 && *sibidx< nsib) *stid = sibs[*sibidx]; else *stid = PvmNoTask; } } ./pvm3/libfpvm/pvmfrecvinfo.m40000644007401100740110000000101306320273705015160 0ustar kohlkohl /* $Id: pvmfrecvinfo.m4,v 1.2 1997/04/01 21:01:57 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfrecvinfo) ARGS(`STRING_ARG(name), mbx_index, flags, bufid') STRING_ARG_DECL(name); int *mbx_index, *flags, *bufid; { char tname[MAX_MBOX_NAME + 1]; /* * Copy the mailbox name to make sure there is * a NUL at the end. */ if (ftocstr(tname, sizeof(tname), STRING_PTR(name), STRING_LEN(name))) { *bufid = PvmBadParam; return; } *bufid = pvm_recvinfo(tname, *mbx_index, *flags); } ./pvm3/libfpvm/pvmfprecv.m40000644007401100740110000000052006225226337014471 0ustar kohlkohl /* $Id: pvmfprecv.m4,v 1.2 1996/10/04 15:27:27 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfprecv) ARGS(`tid, msgtag, buf, len, dt, atid, atag, alen, info') int *tid, *msgtag, *len, *dt, *atid, *atag, *alen, *info; char *buf; { *info = pvm_precv(*tid, *msgtag, buf, *len, *dt, atid, atag, alen); } ./pvm3/libfpvm/OS2/0000755007401100740110000000000011141631057012615 5ustar kohlkohl./pvm3/libfpvm/OS2/Makefile0000644007401100740110000000063506401362560014264 0ustar kohlkohl# # $Id: Makefile,v 1.2 1997/08/28 20:54:08 pvmsrc Exp $ # PVMDIR = ../.. SDIR = $(PVMDIR)/libfpvm PVM_ARCH = OS2 CONFFILE = $(PVMDIR)/conf/$(PVM_ARCH).def LIBDIR = $(PVMDIR)/lib/$(PVM_ARCH) # install: default $(LIBDIR) default: make LIBPREFIX="" -f $(CONFFILE) -f $(SDIR)/Makefile.aimk install clean: make LIBPREFIX="" -f $(CONFFILE) -f $(SDIR)/Makefile.aimk clean $(LIBDIR): mkdir $(LIBDIR) ./pvm3/libfpvm/pvmfputinfo.m40000644007401100740110000000101406320273422015026 0ustar kohlkohl /* $Id: pvmfputinfo.m4,v 1.2 1997/04/01 20:58:58 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfputinfo) ARGS(`STRING_ARG(name), bufid, flags, mbx_index') STRING_ARG_DECL(name); int *bufid, *flags, *mbx_index; { char tname[MAX_MBOX_NAME + 1]; /* * Copy the mailbox name to make sure there is * a NUL at the end. */ if (ftocstr(tname, sizeof(tname), STRING_PTR(name), STRING_LEN(name))) { *mbx_index = PvmBadParam; return; } *mbx_index = pvm_putinfo(tname, *bufid, *flags); } ./pvm3/libfpvm/pvmfdelinfo.m40000644007401100740110000000100406320266275014771 0ustar kohlkohl /* $Id: pvmfdelinfo.m4,v 1.1 1997/04/01 20:14:53 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfdelinfo) ARGS(`STRING_ARG(name), mbx_index, flags, info') STRING_ARG_DECL(name); int *mbx_index, *flags, *info; { char tname[MAX_MBOX_NAME + 1]; /* * Copy the mailbox name to make sure there is * a NUL at the end. */ if (ftocstr(tname, sizeof(tname), STRING_PTR(name), STRING_LEN(name))) { *info = PvmBadParam; return; } *info = pvm_delinfo(tname, *mbx_index, *flags); } ./pvm3/libfpvm/pvmftasks.m40000644007401100740110000000227706334142344014506 0ustar kohlkohl /* $Id: pvmftasks.m4,v 1.4 1997/05/07 18:07:32 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" #include "../src/bfunc.h" void FUNCTION(pvmftasks) ARGS(`where, ntaskp, tidp, ptidp, hostp, flagp, STRING_ARG(a_out), infop') int *where, *ntaskp, *tidp, *ptidp, *hostp, *flagp, *infop; STRING_ARG_DECL(a_out); { static struct pvmtaskinfo *tip = 0; static int ntask = 0; static int next = 0; int nt; int cc; /* if user sets ntaskp to -1 then pvmftasks() will be reset */ if ( ntask && ntaskp && (*ntaskp == -1) ) ntask = 0; if ( !ntask ) { if ( (cc = pvm_tasks( *where, &nt, &tip )) < 0 ) { *infop = cc; return; } ntask = nt; next = 0; } if ( next < ntask ) { if ( ntaskp ) *ntaskp = ntask; if ( tidp ) *tidp = tip[ next ].ti_tid; if ( ptidp ) *ptidp = tip[ next ].ti_ptid; if ( hostp ) *hostp = tip[ next ].ti_host; if ( flagp ) *flagp = tip[ next ].ti_flag; if ( STRING_PTR(a_out) ) ctofstr( STRING_PTR(a_out), STRING_LEN(a_out), tip[ next ].ti_a_out ); *infop = 1; next++; } /* cannot return ti_pid without changing interface */ /* users needing this will have to use C */ if ( next == ntask ) ntask = 0; } ./pvm3/libfpvm/pvmfgetinst.m40000644007401100740110000000073706225226311015031 0ustar kohlkohl /* $Id: pvmfgetinst.m4,v 1.2 1996/10/04 15:27:05 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfgetinst) ARGS(`STRING_ARG(group), tid, inum') STRING_ARG_DECL(group); int *inum, *tid; { char tgroup[MAX_GRP_NAME + 1]; /* * Copy the group name to make sure there's * a NUL at the end. */ if (ftocstr(tgroup, sizeof(tgroup), STRING_PTR(group), STRING_LEN(group))){ *inum = PvmBadParam; return; } *inum = pvm_getinst(tgroup, *tid); } ./pvm3/libfpvm/pvmfmkbuf.m40000644007401100740110000000032606225226326014460 0ustar kohlkohl /* $Id: pvmfmkbuf.m4,v 1.2 1996/10/04 15:27:18 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfmkbuf) ARGS(`encoding, mbuf') int *encoding, *mbuf; { *mbuf = pvm_mkbuf(*encoding); } ./pvm3/libfpvm/pvmffrzgrp.m40000644007401100740110000000075406225226307014672 0ustar kohlkohl /* $Id: pvmffrzgrp.m4,v 1.2 1996/10/04 15:27:03 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmffreezegroup) ARGS(`STRING_ARG(group), count, info') STRING_ARG_DECL(group); int *count, *info; { char tgroup[MAX_GRP_NAME + 1]; /* * Copy the group name to make sure there's * a NUL at the end. */ if (ftocstr(tgroup, sizeof(tgroup), STRING_PTR(group), STRING_LEN(group))){ *info = PvmBadParam; return; } *info = pvm_freezegroup(tgroup, *count); } ./pvm3/libfpvm/pvmfstartpvmd.m40000644007401100740110000001043210611774012015371 0ustar kohlkohl /* $Id: pvmfstartpvmd.m4,v 1.3 2007/04/19 23:15:22 pvmsrc Exp $ */ /* *---------------------------------------------------------------------- * Time-stamp: "1995/11/21 13:31:32 thibaud@kether.cgd.ucar.edu" *---------------------------------------------------------------------- */ /* *---------------------------------------------------------------------- * pvmfstartpvmd.m4 * * Interface to Fortran for pvm_start_pvmd() *---------------------------------------------------------------------- */ #include #include "pvm3.h" #include "pvm_consts.h" #include "pvmalloc.h" #ifdef SYSVSTR #include #else #include #endif void FUNCTION(pvmfstartpvmd) ARGS(`STRING_ARG(args), block, info') STRING_ARG_DECL(args); int *block; int *info; { char *nargs; /* args (null terminated) */ int ac = 0; /* # of agruments initialize to 0 */ char **av; /* argument vector */ register char *ch; /* temp char pointer */ register char *beg; /* pointer to begining of word */ register char *end; /* pointer to end of word */ register int len; /* length of word */ register int i; /* loop index */ #if ( DEBUG ) /* printout incoming nargs */ printf( "%d \"%s\"\n", STRING_LEN(args), STRING_PTR(args) ); #endif /* Some Fortran compilers allow for strings of zero length */ if ( STRING_LEN(args) == 0 ) { /* null args */ av = (char **)0; /* make av a null pointer */ goto pvmd; } else { /* something in args */ if ( ( nargs = TALLOC( STRING_LEN(args) + 1, char, "nargs" ) ) == NULL ) { pvmlogerror("pvmfstartpvmd() can't get memory\n"); goto bail; } /* copy args (ftocptr() could have been used for that) */ strncpy( nargs, STRING_PTR(args), STRING_LEN(args) ); nargs[STRING_LEN(args)] = '\0'; /* terminate with null */ } ch = nargs; /* pointer at the begining of nargs */ /* assume a max of 32 args (8 should be OK from pvmd3(3PVM)) */ if ( ( av = TALLOC( 32, char *, "av" ) ) == NULL ) { pvmlogerror("pvmfstartpvmd() can't get memory\n"); PVM_FREE( nargs ); /* avoid memory leeks */ goto bail; } /* at this point nargs contain at least 1 char */ for ( ; ; ) { /* move forward until no space nor tab */ for( ; *ch == ' ' || *ch == '\t'; ch++ ); beg = ch; /* that's the begining of a word */ /* move forward until space, tab or null */ for( ; *ch != ' ' && *ch != '\t' && *ch != '\0'; ch++ ); end = ch; /* that's the end of a word */ len = end - beg; /* length of the word */ /* if nothing else then space, tab or null has been found */ /* then end of nargs is reached (exit point of loop) */ if ( len == 0 ) break; /* allocate memory for word in agument vector */ if ( ( av[ac] = TALLOC( len + 1, char, "av[ac]" ) ) == NULL ) { pvmlogerror("pvmfstartpvmd() can't get memory\n"); PVM_FREE( nargs ); /* avoid memory leeks */ for ( i = 0; i < ac; i++ ) PVM_FREE( av[i] ); goto bail; } strncpy( av[ac], beg, len ); /* copy word to arg vector */ *( av[ac] + len ) = '\0'; /* null terminate word */ ac++; /* increment arg counter */ } #if ( DEBUG ) printf( "ac is %d\n", ac ); #endif if ( ac == 0 ) { /* no args found */ PVM_FREE( av ); /* free allocated memory */ av = (char **)0; /* make av a NULL pointer */ #if ( DEBUG ) } else { /* printout result */ for ( i = 0; i < ac; i++ ) printf( "av[%2d] is \"%s\"\n", i, av[i] ); #endif } PVM_FREE( nargs ); /* free allocated memory */ pvmd: /* hopefully pvm_start_pvmd is freeing allocated mem for av */ *info = pvm_start_pvmd( ac, av, *block ); return; bail: *info = -1; return; } /* *---------------------------------------------------------------------- * RCS identification *---------------------------------------------------------------------- * $Author: pvmsrc $ * $Date: 2007/04/19 23:15:22 $ * $Locker: $ * $Revision: 1.3 $ * $Source: /home/nfs/pvmsrc/.CVS/PVM/pvm3.4/libfpvm/pvmfstartpvmd.m4,v $ * $State: Exp $ *---------------------------------------------------------------------- * For GNU Emacs: *---------------------------------------------------------------------- * Local Variables: * mode: C * abbrev-mode: t * comment-column: 40 * version-control: t * End: *---------------------------------------------------------------------- */ ./pvm3/libfpvm/pvmfgsize.m40000644007401100740110000000071006225226316014471 0ustar kohlkohl /* $Id: pvmfgsize.m4,v 1.2 1996/10/04 15:27:10 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfgsize) ARGS(`STRING_ARG(group), size') STRING_ARG_DECL(group); int *size; { char tgroup[MAX_GRP_NAME + 1]; /* * Copy the group name to make sure there's * a NUL at the end. */ if (ftocstr(tgroup, sizeof(tgroup), STRING_PTR(group), STRING_LEN(group))){ *size = PvmBadParam; return; } *size = pvm_gsize(tgroup); } ./pvm3/libfpvm/pvmfmcast.m40000644007401100740110000000036706225226325014467 0ustar kohlkohl /* $Id: pvmfmcast.m4,v 1.2 1996/10/04 15:27:17 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfmcast) ARGS(`ntid, tids, msgtag, info') int *ntid, *tids, *msgtag, *info; { *info = pvm_mcast(tids, *ntid, *msgtag); } ./pvm3/libfpvm/pvmfgetsbuf.m40000644007401100740110000000027606225226314015014 0ustar kohlkohl /* $Id: pvmfgetsbuf.m4,v 1.2 1996/10/04 15:27:08 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfgetsbuf) ARGS(`mbuf') int *mbuf; { *mbuf = pvm_getsbuf(); } ./pvm3/libfpvm/ftocstr.c0000644007401100740110000000410706427714201014050 0ustar kohlkohl static char rcsid[] = "$Id: ftocstr.c,v 1.3 1997/11/04 21:49:53 pvmsrc Exp $"; /* * PVM version 3.4: Parallel Virtual Machine System * University of Tennessee, Knoxville TN. * Oak Ridge National Laboratory, Oak Ridge TN. * Emory University, Atlanta GA. * Authors: J. J. Dongarra, G. E. Fagg, M. Fischer * G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci, * P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam * (C) 1997 All Rights Reserved * * NOTICE * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted * provided that the above copyright notice appear in all copies and * that both the copyright notice and this permission notice appear in * supporting documentation. * * Neither the Institutions (Emory University, Oak Ridge National * Laboratory, and University of Tennessee) nor the Authors make any * representations about the suitability of this software for any * purpose. This software is provided ``as is'' without express or * implied warranty. * * PVM version 3 was funded in part by the U.S. Department of Energy, * the National Science Foundation and the State of Tennessee. */ #include "../src/bfunc.h" #ifndef min #define min(i,j) ((i)<(j)?(i):(j)) #endif #ifdef SYSVSTR #include #else #include #endif ftocstr(ds, dl, ss, sl) char *ds, *ss; /* dst, src ptrs */ int dl; /* dst max len */ int sl; /* src len */ { char *p; for (p = ss + sl; --p >= ss && *p == ' '; ) ; sl = p - ss + 1; dl--; ds[0] = 0; if (sl > dl) return 1; strncat(ds, ss, min(sl, dl)); return 0; } ctofstr(ds, dl, ss) char *ds; /* dest space */ int dl; /* max dest length */ char *ss; /* src string (0-term) */ { int sl = strlen(ss); if (dl <= sl) BCOPY(ss, ds, dl); else { BCOPY(ss, ds, sl); dl -= sl; ds += sl; while (dl-- > 0) *ds++ = ' '; } return 0; } ./pvm3/libfpvm/pvmftrecv.m40000644007401100740110000000061106225226360014472 0ustar kohlkohl /* $Id: pvmftrecv.m4,v 1.2 1996/10/04 15:27:44 pvmsrc Exp $ */ #include #include #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmftrecv) ARGS(`tid, msgtag, sec, usec, info') int *tid, *msgtag, *sec, *usec, *info; { struct timeval t; t.tv_sec = *sec; t.tv_usec = *usec; *info = pvm_trecv(*tid, *msgtag, (*sec == -1 ? (struct timeval *)0 : &t)); } ./pvm3/libfpvm/pvmfdelmhf.m40000644007401100740110000000031506336125740014612 0ustar kohlkohl /* $Id: pvmfdelmhf.m4,v 1.2 1997/05/13 17:58:56 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfdelmhf) ARGS(`mhid, info') int *mhid, *info; { *info = pvm_delmhf(*mhid); } ./pvm3/libfpvm/pvmfsend.m40000644007401100740110000000033606225226346014310 0ustar kohlkohl /* $Id: pvmfsend.m4,v 1.2 1996/10/04 15:27:34 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfsend) ARGS(`tid, msgtag, info') int *tid, *msgtag, *info; { *info = pvm_send(*tid, *msgtag); } ./pvm3/libfpvm/pvmfnewctx.m40000644007401100740110000000030006336125745014662 0ustar kohlkohl /* $Id: pvmfnewctx.m4,v 1.2 1997/05/13 17:59:01 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfnewcontext) ARGS(`ctx') int *ctx; { *ctx = pvm_newcontext(); } ./pvm3/libfpvm/WIN32/0000755007401100740110000000000011141631057013014 5ustar kohlkohl./pvm3/libfpvm/WIN32/Pvmfscatter.c0000644007401100740110000000204306601533253015461 0ustar kohlkohl /* $Id: Pvmfscatter.c,v 1.2 1998/09/21 20:27:23 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" #ifdef IMA_WIN32_WATCOM #include "watforstr.h" void pvmfscatter (result, data, count, datatype, msgtag, gname_str, rootinst, info) void *result, *data; int *count, *datatype, *msgtag, *rootinst, *info; WatcomFortranStr* gname_str; { char* gname_ptr = gname_str->strP; int gname_len = gname_str->len; #else void __fortran PVMFSCATTER (result, data, count, datatype, msgtag, gname_ptr,gname_len, rootinst, info) void *result, *data; int *count, *datatype, *msgtag, *rootinst, *info; char * gname_ptr; int gname_len; { #endif char tgroup[MAX_GRP_NAME + 1]; /* * Copy the group name to make sure there's a NUL at the end. */ if (ftocstr(tgroup,sizeof(tgroup),gname_ptr,gname_len)) { *info = PvmBadParam; return; } *info = pvm_scatter(result, data, *count, *datatype, *msgtag, tgroup, *rootinst); } ./pvm3/libfpvm/WIN32/Pvmfgetctx.c0000644007401100740110000000044706601533130015312 0ustar kohlkohl /* $Id: Pvmfgetctx.c,v 1.2 1998/09/21 20:26:00 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\src\pvmwin.h" #endif #include "pvm3.h" #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfgetcontext (ctx) #else __fortran PVMFGETCONTEXT (ctx) #endif int *ctx; { *ctx = pvm_getcontext(); } ./pvm3/libfpvm/WIN32/Pvmfgetsbuf.c0000644007401100740110000000051306601533147015455 0ustar kohlkohl /* $Id: Pvmfgetsbuf.c,v 1.2 1998/09/21 20:26:15 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfgetsbuf (mbuf) #else __fortran PVMFGETSBUF (mbuf) #endif int *mbuf; { *mbuf = pvm_getsbuf(); } ./pvm3/libfpvm/WIN32/Pvmffreebuf.c0000644007401100740110000000054206601533122015427 0ustar kohlkohl /* $Id: Pvmffreebuf.c,v 1.2 1998/09/21 20:25:54 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmffreebuf (mbuf, info) #else __fortran PVMFFREEBUF (mbuf, info) #endif int *mbuf, *info; { *info = pvm_freebuf(*mbuf); } ./pvm3/libfpvm/WIN32/watforstr.h0000644007401100740110000000043506354557605015242 0ustar kohlkohl /* $Id: watforstr.h,v 1.1 1997/06/26 21:30:45 pvmsrc Exp $ */ #ifndef WATFORSTR_H #define WATFORSTR_H /* This is the structure the Watcom-Fortran compiler uses to pass strings */ typedef struct WatcomFortranStrDef { char* strP; int len; } WatcomFortranStr; #endif ./pvm3/libfpvm/WIN32/Pvmfunpack.c0000644007401100740110000000227307024215246015301 0ustar kohlkohl /* $Id: Pvmfunpack.c,v 1.3 1999/12/10 15:22:14 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\src\pvmwin.h" #include #endif #include "pvm3.h" #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfunpack (what, vp, cnt, std, info) #else __fortran PVMFUNPACK (what, vp, cnt, std, info) #endif int *what, *cnt, *std, *info; #ifdef __STDC__ void *vp; #else char *vp; #endif { switch( *what ) { case BYTE1: *info = pvm_upkbyte((char*)vp, *cnt, *std); break; case INTEGER2: *info = pvm_upkshort((short*)vp, *cnt, *std); break; case INTEGER4: *info = pvm_upkint((int*)vp, *cnt, *std); break; case INTEGER8: *info = pvm_upklong((long*)vp, *cnt, *std); break; case REAL4: *info = pvm_upkfloat((float*)vp, *cnt, *std); break; case COMPLEX8: *info = pvm_upkcplx((float*)vp, *cnt, *std); break; case REAL8: *info = pvm_upkdouble((double*)vp, *cnt, *std); break; case COMPLEX16: *info = pvm_upkdcplx((double*)vp, *cnt, *std); break; case STRING: *info = pvm_upkbyte((char*)vp, *cnt, *std); break; default: *info = PvmBadParam; break; } } ./pvm3/libfpvm/WIN32/Pvmfgettid.c0000644007401100740110000000144306601533151015274 0ustar kohlkohl /* $Id: Pvmfgettid.c,v 1.2 1998/09/21 20:26:17 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" #ifdef IMA_WIN32_WATCOM #include "watforstr.h" void pvmfgettid (group_str, inum, tid) WatcomFortranStr* group_str; int *inum, *tid; { char* group_ptr = group_str->strP; int group_len = group_str->len; #else void __stdcall PVMFGETTID (group_ptr,group_len, inum, tid) char * group_ptr; int group_len; int *inum, *tid; { #endif char tgroup[MAX_GRP_NAME + 1]; /* * Copy the group name to make sure there's * a NUL at the end. */ if (ftocstr(tgroup, sizeof(tgroup), group_ptr, group_len)){ *tid = PvmBadParam; return; } *tid = pvm_gettid(tgroup, *inum); } ./pvm3/libfpvm/WIN32/Pvmfpsend.c0000644007401100740110000000073706601533241015132 0ustar kohlkohl /* $Id: Pvmfpsend.c,v 1.2 1998/09/21 20:27:13 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfpsend (tid, msgtag, buf,buf_len, len, dt, info) #else __fortran PVMFPSEND (tid, msgtag, buf,buf_len, len, dt, info) #endif int *tid, *msgtag, *len, *dt, *info; char *buf;int buf_len; { *info = pvm_psend(*tid, *msgtag, buf, *len, *dt); } ./pvm3/libfpvm/WIN32/Pvmfspawn.c0000644007401100740110000000255706601533300015147 0ustar kohlkohl /* $Id: Pvmfspawn.c,v 1.2 1998/09/21 20:27:44 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" #ifdef IMA_WIN32_WATCOM #include "watforstr.h" void pvmfspawn (WatcomFortranStr *aout_str, int *flag, WatcomFortranStr *where_str, int *count, int *tids, int *info) { char* aout_ptr = aout_str->strP; int aout_len = aout_str->len; char* where_ptr = where_str->strP; int where_len = where_str->len; #else void __stdcall PVMFSPAWN (char *aout_ptr,int aout_len, int *flag, char *where_ptr,int where_len, int *count, int *tids, int *info) { #endif char taout[MAX_PROC_NAME + 1]; char twhere[MAX_HOST_NAME + 1]; /* * Copy the program and where names to make sure there's * a NUL at the end. */ if (ftocstr(taout, sizeof(taout), aout_ptr, aout_len)) { *info = PvmBadParam; return; } /* * if the where parameter is '*', pass a NULL pointer to * initiate which will allow execution on any machine. */ if (*(where_ptr) == '*') { *info = pvm_spawn(taout, (char**)0, *flag, "", *count, tids); } else { if (ftocstr(twhere, sizeof(twhere), where_ptr, where_len)) { *info = PvmBadParam; return; } *info = pvm_spawn(taout, (char**)0, *flag, twhere, *count, tids); } } ./pvm3/libfpvm/WIN32/Pvmfsiblings.c0000644007401100740110000000115707502372421015632 0ustar kohlkohl /* $Id: Pvmfsiblings.c,v 1.4 2002/06/14 13:52:17 pvmsrc Exp $ */ #include #ifdef WIN32 #include "..\..\src\pvmwin.h" #endif #include "pvm3.h" #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfsiblings (nsiblings, sibidx, stid) #else __fortran PVMFSIBLINGS (nsiblings, sibidx, stid) #endif int *nsiblings, *sibidx, *stid; { static int nsib = -1; static int *sibs; if (nsib == -1) nsib = pvm_siblings(&sibs); if ( nsiblings != NULL ) *nsiblings = nsib; if ( sibidx != NULL && stid != NULL ) { if (*sibidx >= 0 && *sibidx< nsib) *stid = sibs[*sibidx]; else *stid = PvmNoTask; } } ./pvm3/libfpvm/WIN32/Pvmfmstat.c0000644007401100740110000000136706601533211015146 0ustar kohlkohl /* $Id: Pvmfmstat.c,v 1.2 1998/09/21 20:26:49 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" #ifdef IMA_WIN32_WATCOM #include "watforstr.h" void pvmfstat (host_str, mstat) WatcomFortranStr* host_str; int *mstat; { char* host_ptr = host_str->strP; int host_len = host_str->len; #else void __stdcall PVMFMSTAT (host_ptr,host_len, mstat) char * host_ptr; int host_len; int *mstat; { #endif char thost[MAX_HOST_NAME + 1]; /* * Copy the host name to make sure there's * a NUL at the end. */ if (ftocstr(thost, sizeof(thost), host_ptr, host_len)) { *mstat = PvmBadParam; return; } *mstat = pvm_mstat(thost); } ./pvm3/libfpvm/WIN32/Pvmfdelhost.c0000644007401100740110000000155206601533104015455 0ustar kohlkohl /* $Id: Pvmfdelhost.c,v 1.2 1998/09/21 20:25:40 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" #ifdef IMA_WIN32_WATCOM #include "watforstr.h" #endif #ifdef IMA_WIN32_WATCOM void pvmfdelhost (host_str,info) WatcomFortranStr* host_str; int *info; { char* host_ptr = host_str->strP; int host_len = host_str->len; #else void __fortran PVMDELHOST (host_ptr,host_len, info) char * host_ptr; int host_len; int *info; { #endif char thost[MAX_HOST_NAME + 1]; char *ptr = thost; int cc; /* * Copy the host name to make sure there's * a NUL at the end. */ if (ftocstr(thost, sizeof(thost), host_ptr, host_len)) { *info = PvmBadParam; return; } *info = pvm_delhosts(&ptr, 1, &cc); if (*info >= 0) *info = cc; } ./pvm3/libfpvm/WIN32/Pvmflvgrp.c0000644007401100740110000000141206601533165015147 0ustar kohlkohl /* $Id: Pvmflvgrp.c,v 1.2 1998/09/21 20:26:29 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" #ifdef IMA_WIN32_WATCOM #include "watforstr.h" void pvmflvgroup (group_str, info) WatcomFortranStr* group_str; int *info; { char* group_ptr = group_str->strP; int group_len = group_str->len; #else void __stdcall PVMFLVGROUP (group_ptr,group_len, info) char * group_ptr; int group_len; int *info; { #endif char tgroup[MAX_GRP_NAME + 1]; /* * Copy the group name to make sure there's * a NUL at the end. */ if (ftocstr(tgroup, sizeof(tgroup), group_ptr, group_len)){ *info = PvmBadParam; return; } *info = pvm_lvgroup(tgroup); } ./pvm3/libfpvm/WIN32/Pvmfpstat.c0000644007401100740110000000053406601533242015150 0ustar kohlkohl /* $Id: Pvmfpstat.c,v 1.2 1998/09/21 20:27:14 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfpstat (tid, pstat) #else __fortran PVMFPSTAT (tid, pstat) #endif int *tid, *pstat; { *pstat = pvm_pstat(*tid); } ./pvm3/libfpvm/WIN32/Pvmfstartpvmd.c0000644007401100740110000000752406601533301016043 0ustar kohlkohl /* $Id: Pvmfstartpvmd.c,v 1.2 1998/09/21 20:27:45 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\src\pvmwin.h" #endif #include #include "pvm3.h" #include "pvm_consts.h" #include "pvmalloc.h" void #ifdef IMA_WIN32_WATCOM __fortran PVMFSTARTPVMD #else pvmfstartpvmd #endif (args_ptr, block, info, args_len) char * args_ptr; int args_len; int *block; int *info; { char *nargs; /* args (null terminated) */ int ac = 0; /* # of agruments initialize to 0 */ char **av; /* argument vector */ register char *ch; /* temp char pointer */ register char *beg; /* pointer to begining of word */ register char *end; /* pointer to end of word */ register int len; /* length of word */ register int i; /* loop index */ #if ( DEBUG ) /* printout incoming nargs */ printf( "%d \"%s\"\n", args_len, args_ptr ); #endif /* Some Fortran compilers allow for strings of zero length */ if ( args_len == 0 ) { /* null args */ av = (char **)0; /* make av a null pointer */ goto pvmd; } else { /* something in args */ if ( ( nargs = TALLOC( args_len + 1, char, "nargs" ) ) == NULL ) { pvmlogerror("pvmfstartpvmd() can't get memory\n"); goto bail; } /* copy args (ftocptr() could have been used for that) */ strncpy( nargs, args_ptr, args_len ); nargs[args_len] = '\0'; /* terminate with null */ } ch = nargs; /* pointer at the begining of nargs */ /* assume a max of 32 args (8 should be OK from pvmd3(3PVM)) */ if ( ( av = TALLOC( 32, char *, "av" ) ) == NULL ) { pvmlogerror("pvmfstartpvmd() can't get memory\n"); PVM_FREE( nargs ); /* avoid memory leeks */ goto bail; } /* at this point nargs contain at least 1 char */ for ( ; ; ) { /* move forward until no space nor tab */ for( ; *ch == ' ' || *ch == '\t'; ch++ ); beg = ch; /* that's the begining of a word */ /* move forward until space, tab or null */ for( ; *ch != ' ' && *ch != '\t' && *ch != '\0'; ch++ ); end = ch; /* that's the end of a word */ len = end - beg; /* length of the word */ /* if nothing else then space, tab or null has been found */ /* then end of nargs is reached (exit point of loop) */ if ( len == 0 ) break; /* allocate memory for word in agument vector */ if ( ( av[ac] = TALLOC( len + 1, char, "av[ac]" ) ) == NULL ) { pvmlogerror("pvmfstartpvmd() can't get memory\n"); PVM_FREE( nargs ); /* avoid memory leeks */ for ( i = 0; i < ac; i++ ) PVM_FREE( av[i] ); goto bail; } strncpy( av[ac], beg, len ); /* copy word to arg vector */ *( av[ac] + len ) = '\0'; /* null terminate word */ ac++; /* increment arg counter */ } #if ( DEBUG ) printf( "ac is %d\n", ac ); #endif if ( ac == 0 ) { /* no args found */ PVM_FREE( av ); /* free allocated memory */ av = (char **)0; /* make av a NULL pointer */ #if ( DEBUG ) } else { /* printout result */ for ( i = 0; i < ac; i++ ) printf( "av[%2d] is \"%s\"\n", i, av[i] ); #endif } PVM_FREE( nargs ); /* free allocated memory */ pvmd: /* hopefully pvm_start_pvmd is freeing allocated mem for av */ *info = pvm_start_pvmd( ac, av, *block ); return; bail: *info = -1; return; } /* *---------------------------------------------------------------------- * RCS identification *---------------------------------------------------------------------- * $Author: pvmsrc $ * $Date: 1998/09/21 20:27:45 $ * $Locker: $ * $Revision: 1.2 $ * $Source: /home/nfs/pvmsrc/.CVS/PVM/pvm3.4/libfpvm/WIN32/Pvmfstartpvmd.c,v $ * $State: Exp $ *---------------------------------------------------------------------- * For GNU Emacs: *---------------------------------------------------------------------- * Local Variables: * mode: C * abbrev-mode: t * comment-column: 40 * version-control: t * End: *---------------------------------------------------------------------- */ ./pvm3/libfpvm/WIN32/Pvmfnewctx.c0000644007401100740110000000044406601533215015325 0ustar kohlkohl /* $Id: Pvmfnewctx.c,v 1.2 1998/09/21 20:26:53 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\src\pvmwin.h" #endif #include "pvm3.h" #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfnewcontext(ctx) #else __fortran PVMFNEWCONTEXT(ctx) #endif int *ctx; { *ctx = pvm_newcontext(); } ./pvm3/libfpvm/WIN32/Pvmftrecv.c0000644007401100740110000000105006601533314015132 0ustar kohlkohl /* $Id: Pvmftrecv.c,v 1.2 1998/09/21 20:27:56 pvmsrc Exp $ */ #include #ifdef WIN32 #include "..\..\src\pvmwin.h" #include #else #include #endif #include "pvm3.h" #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmftrecv (tid, msgtag, sec, usec, info) #else __fortran PVMFTRECV (tid, msgtag, sec, usec, info) #endif int *tid, *msgtag, *sec, *usec, *info; { struct timeval t; t.tv_sec = *sec; t.tv_usec = *usec; *info = pvm_trecv(*tid, *msgtag, (*sec == -1 ? (struct timeval *)0 : &t)); } ./pvm3/libfpvm/WIN32/Pvmfbufinfo.c0000644007401100740110000000064006601533077015451 0ustar kohlkohl /* $Id: Pvmfbufinfo.c,v 1.2 1998/09/21 20:25:35 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" #ifdef IMA_WIN32_WATCOM void pvmfbufinfo(mid, len, type, tid, info) #else __stdcall PVMFBUFINFO (mid, len, type, tid, info) #endif int *mid, *len, *type, *tid, *info; { *info = pvm_bufinfo(*mid, len, type, tid); } ./pvm3/libfpvm/WIN32/Pvmfdelinfo.c0000644007401100740110000000121206601533106015426 0ustar kohlkohl /* $Id: Pvmfdelinfo.c,v 1.2 1998/09/21 20:25:42 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\src\pvmwin.h" #endif #include "pvm3.h" #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfdelinfo (name_ptr, mbx_index, flags, info, name_len) #else __fortran PVMFDELINFO (name_ptr, mbx_index, flags, info, name_len) #endif char * name_ptr; int name_len; int *mbx_index, *flags, *info; { char tname[MAX_MBOX_NAME + 1]; /* * Copy the mailbox name to make sure there is * a NUL at the end. */ if (ftocstr(tname, sizeof(tname), name_ptr, name_len)) { *info = PvmBadParam; return; } *info = pvm_delinfo(tname, *mbx_index, *flags); } ./pvm3/libfpvm/WIN32/Pvmfperror.c0000644007401100740110000000231106601533225015322 0ustar kohlkohl /* $Id: Pvmfperror.c,v 1.2 1998/09/21 20:27:01 pvmsrc Exp $ */ #include #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" #define MAX(a,b) ((a) > (b) ? (a) : (b)) void #ifdef IMA_WIN32_WATCOM pvmfperror (p_ptr,p_len, info) #else __fortran PVMFPERROR (p_ptr,p_len, info) #endif char * p_ptr; int p_len; int *info; { static char *buf = 0; static int buflen = 0; #ifndef WIN32 char *malloc(); #endif /* * Have to have a NUL at the end of the string, and * the only way to do this portably is to copy the whole string * into a malloc'ed buffer. We keep the buffer around for * future use rather than free'ing it each time we're done. */ if (!buf) buf = malloc(buflen = p_len + 1); else if (p_len + 1 > buflen) { buflen = MAX(p_len + 1, buflen * 2); /* don't use realloc; it might cause old data to be copied */ free(buf); buf = malloc(buflen); } if (!buf) { fprintf(stderr, "pvmfperror PvmNoMem"); *info = PvmNoMem; return; } strncpy(buf, p_ptr, p_len); buf[p_len] = '\0'; *info = pvm_perror(buf); } ./pvm3/libfpvm/WIN32/Pvmfsetsbuf.c0000644007401100740110000000055506601533274015500 0ustar kohlkohl /* $Id: Pvmfsetsbuf.c,v 1.2 1998/09/21 20:27:40 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfsetsbuf (mbuf, oldbuf) #else __fortran PVMFSETSBUF (mbuf, oldbuf) #endif int *mbuf, *oldbuf; { *oldbuf = pvm_setsbuf(*mbuf); } ./pvm3/libfpvm/WIN32/Pvmfsendsig.c0000644007401100740110000000060306601533266015454 0ustar kohlkohl /* $Id: Pvmfsendsig.c,v 1.2 1998/09/21 20:27:34 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfsendsig (tid, signum, info) #else __fortran PVMFSENDSIG (tid, signum, info) #endif int *tid, *signum, *info; { *info = pvm_sendsig(*tid, *signum); } ./pvm3/libfpvm/WIN32/Pvmfrecvinfo.c0000644007401100740110000000122206601533247015630 0ustar kohlkohl /* $Id: Pvmfrecvinfo.c,v 1.2 1998/09/21 20:27:19 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\src\pvmwin.h" #endif #include "pvm3.h" #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfrecvinfo (name_ptr, mbx_index, flags, bufid, name_len) #else __fortran PVMFRECVINFO (name_ptr, mbx_index, flags, bufid, name_len) #endif char * name_ptr; int name_len; int *mbx_index, *flags, *bufid; { char tname[MAX_MBOX_NAME + 1]; /* * Copy the mailbox name to make sure there is * a NUL at the end. */ if (ftocstr(tname, sizeof(tname), name_ptr, name_len)) { *bufid = PvmBadParam; return; } *bufid = pvm_recvinfo(tname, *mbx_index, *flags); } ./pvm3/libfpvm/WIN32/Pvmfbcast.c0000644007401100740110000000145406601533076015120 0ustar kohlkohl /* $Id: Pvmfbcast.c,v 1.2 1998/09/21 20:25:34 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" #ifdef IMA_WIN32_WATCOM #include "watforstr.h" void pvmfbcast (group_str, msgtag, info) WatcomFortranStr* group_str; int *msgtag, *info; { char* group_ptr = group_str->strP; int group_len = group_str->len; #else void __stdcall PVMFBCAST (group_ptr,group_len, msgtag, info) char * group_ptr; int group_len; int *msgtag, *info; { #endif char tgroup[MAX_GRP_NAME + 1]; /* * Copy the group name to make sure there's * a NUL at the end. */ if (ftocstr(tgroup, sizeof(tgroup), group_ptr, group_len)){ *info = PvmBadParam; return; } *info = pvm_bcast(tgroup, *msgtag); } ./pvm3/libfpvm/WIN32/Pvmfpack.c0000644007401100740110000000216407024215246014735 0ustar kohlkohl /* $Id: Pvmfpack.c,v 1.3 1999/12/10 15:22:14 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfpack (what, vp, cnt, std, info) int *what, *cnt, *std, *info; #else __fortran PVMFPACK (what, vp, cnt, std, info) int *what, *cnt, *std, *info; #endif #ifdef __STDC__ void *vp; #else char *vp; #endif { switch( *what ) { case BYTE1: *info = pvm_pkbyte((char*)vp, *cnt, *std); break; case INTEGER2: *info = pvm_pkshort((short*)vp, *cnt, *std); break; case INTEGER4: *info = pvm_pkint((int*)vp, *cnt, *std); break; case INTEGER8: *info = pvm_pklong((long*)vp, *cnt, *std); break; case REAL4: *info = pvm_pkfloat((float*)vp, *cnt, *std); break; case COMPLEX8: *info = pvm_pkcplx((float*)vp, *cnt, *std); break; case REAL8: *info = pvm_pkdouble((double*)vp, *cnt, *std); break; case COMPLEX16: *info = pvm_pkdcplx((double*)vp, *cnt, *std); break; case STRING: *info = pvm_pkbyte((char*)vp, *cnt, *std); break; default: *info = PvmBadParam; break; } } ./pvm3/libfpvm/WIN32/Pvmfmytid.c0000644007401100740110000000047406601533213015144 0ustar kohlkohl /* $Id: Pvmfmytid.c,v 1.2 1998/09/21 20:26:51 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" #ifdef IMA_WIN32_WATCOM void pvmfmytid (tid) #else __fortran PVMFMYTID (tid) #endif int *tid; { *tid = pvm_mytid(); } ./pvm3/libfpvm/WIN32/Pvmfsetrbuf.c0000644007401100740110000000055506601533273015476 0ustar kohlkohl /* $Id: Pvmfsetrbuf.c,v 1.2 1998/09/21 20:27:39 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfsetrbuf (mbuf, oldbuf) #else __fortran PVMFSETRBUF (mbuf, oldbuf) #endif int *mbuf, *oldbuf; { *oldbuf = pvm_setrbuf(*mbuf); } ./pvm3/libfpvm/WIN32/Pvmfprecv.c0000644007401100740110000000105106601533235015131 0ustar kohlkohl /* $Id: Pvmfprecv.c,v 1.2 1998/09/21 20:27:09 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfprecv (tid, msgtag, buf,buf_len, len, dt, atid, atag, alen, info) #else __fortran PVMFPRECV (tid, msgtag, buf,buf_len, len, dt, atid, atag, alen, info) #endif int *tid, *msgtag, *len, *dt, *atid, *atag, *alen, *info; char *buf;int buf_len; { *info = pvm_precv(*tid, *msgtag, buf, *len, *dt, atid, atag, alen); } ./pvm3/libfpvm/WIN32/ftocstr.c0000644007401100740110000000164006354762550014662 0ustar kohlkohl /* $Id: ftocstr.c,v 1.1 1997/06/27 16:08:08 pvmsrc Exp $ */ #include #include #include "../../src/bfunc.h" #ifndef min #define min(i,j) ((i)<(j)?(i):(j)) #endif ftocstr(ds, dl, ss, sl) char *ds, *ss; /* dst, src ptrs */ int dl; /* dst max len */ int sl; /* src len */ { char *p; for (p = ss + sl; --p >= ss && *p == ' '; ) ; sl = p - ss + 1; dl--; ds[0] = 0; if (sl > dl) return 1; strncat(ds, ss, min(sl, dl)); return 0; } ctofstr(ds, dl, ss) char *ds; /* dest space */ int dl; /* max dest length */ char *ss; /* src string (0-term) */ { int sl = strlen(ss); if (dl <= sl) BCOPY(ss, ds, dl); else { if ((ds=malloc(sizeof(char)*sl)) == 0) fprintf(stderr,"malloc in ctofstr failed \n"); memcpy(ds,ss,sl); return 0; dl -= sl; ds += sl; while (dl-- > 0) *ds++ = ' '; } return 0; } ./pvm3/libfpvm/WIN32/Pvmfconfig.c0000644007401100740110000000315307452625054015272 0ustar kohlkohl /* $Id: Pvmfconfig.c,v 1.4 2002/04/03 16:13:32 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" #include "../../src/bfunc.h" void #ifdef IMA_WIN32_WATCOM pvmfconfig(nhostp, narchp, tidp, name_ptr,name_len, arch_ptr,arch_len speedp, infop) int *nhostp, *narchp, *tidp, *speedp, *infop; char * name_ptr; int name_len; char * arch_ptr; int arch_len; #else __fortran PVMFCONFIG (nhostp, narchp, /* rd narchp,arch_len, */ tidp, name_ptr,name_len, /* rd arch_ptr, */ arch_ptr,arch_len, speedp, infop) int *nhostp, *narchp, *tidp, *speedp, *infop; char * name_ptr; int name_len; char * arch_ptr; int arch_len; #endif { static struct pvmhostinfo *hip = 0; static int nhost = 0; static int narch = 0; static int next = 0; int cc; struct pvmhostinfo *hip2; #ifndef WIN32 char *malloc(); #endif /* if user sets nhostp to -1 then pvmfconfig() will be reset */ if (hip && (*nhostp == -1)) { free((char*)hip); hip = 0; } if (!hip) { if ((cc = pvm_config(&nhost, &narch, &hip2)) < 0) { *infop = cc; return; } hip = (struct pvmhostinfo*)malloc(nhost * sizeof(struct pvmhostinfo)); BCOPY((char*)hip2, (char*)hip, nhost * sizeof(struct pvmhostinfo)); next = 0; } if (next < nhost) { *nhostp = nhost; *narchp = narch; *tidp = hip[next].hi_tid; ctofstr(name_ptr, name_len, hip[next].hi_name); ctofstr(arch_ptr, arch_len, hip[next].hi_arch); *speedp = hip[next].hi_speed; *infop = 1; next++; } if (next == nhost) { free((char*)hip); hip = 0; } } ./pvm3/libfpvm/WIN32/Pvmfgetopt.c0000644007401100740110000000053506601533135015321 0ustar kohlkohl /* $Id: Pvmfgetopt.c,v 1.2 1998/09/21 20:26:05 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfgetopt (what, val) #else __fortran PVMFGETOPT (what, val) #endif int *what, *val; { *val = pvm_getopt(*what); } ./pvm3/libfpvm/WIN32/Pvmfparent.c0000644007401100740110000000050306601533223015301 0ustar kohlkohl /* $Id: Pvmfparent.c,v 1.2 1998/09/21 20:26:59 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfparent (tid) #else __fortran PVMFPARENT (tid) #endif int *tid; { *tid = pvm_parent(); } ./pvm3/libfpvm/WIN32/Pvmftasks.c0000644007401100740110000000306106601533303015136 0ustar kohlkohl /* $Id: Pvmftasks.c,v 1.2 1998/09/21 20:27:47 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" #include "../../src/bfunc.h" void #ifdef IMA_WIN32_WATCOM __fortran PVMFTASKS #else pvmftasks #endif (where, ntaskp, tidp, ptidp, hostp, flagp, a_out_ptr,a_out_len, infop) int *where, *ntaskp, *tidp, *ptidp, *hostp, *flagp, *infop; char * a_out_ptr; int a_out_len; { static struct pvmtaskinfo *tip = 0; static int ntask = 0; static int next = 0; int cc; struct pvmtaskinfo *tip2; #ifndef WIN32 char *malloc(); #endif /* if user sets ntaskp to -1 then pvmftasks() will be reset */ if (tip && (*ntaskp == -1)) { free((char*)tip); tip = 0; } if (!tip) { if ((cc = pvm_tasks(*where, &ntask, &tip2)) < 0) { *infop = cc; return; } tip = (struct pvmtaskinfo*)malloc(ntask * sizeof(struct pvmtaskinfo)); BCOPY((char*)tip2, (char*)tip, ntask * sizeof(struct pvmtaskinfo)); next = 0; } if (next < ntask) { *ntaskp = ntask; *tidp = tip[next].ti_tid; *ptidp = tip[next].ti_ptid; *hostp = tip[next].ti_host; *flagp = tip[next].ti_flag; ctofstr(a_out_ptr, a_out_len, tip[next].ti_a_out); *infop = 1; next++; } /* can not return ti_pid without changing interface */ /* users needing this will have to use C */ if (next == ntask) { free((char*)tip); tip = 0; } } ./pvm3/libfpvm/WIN32/Pvmfexit.c0000644007401100740110000000047506601533120014765 0ustar kohlkohl /* $Id: Pvmfexit.c,v 1.2 1998/09/21 20:25:52 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfexit(info) #else __fortran PVMFEXIT (info) #endif int *info; { *info = pvm_exit(); } ./pvm3/libfpvm/WIN32/Pvmfgetrbuf.c0000644007401100740110000000051206601533146015452 0ustar kohlkohl /* $Id: Pvmfgetrbuf.c,v 1.2 1998/09/21 20:26:14 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfgetrbuf (mbuf) #else __fortran PVMFGETRBUF (mbuf) #endif int *mbuf; { *mbuf = pvm_getrbuf(); } ./pvm3/libfpvm/WIN32/Pvmfprobe.c0000644007401100740110000000057306601533237015133 0ustar kohlkohl /* $Id: Pvmfprobe.c,v 1.2 1998/09/21 20:27:11 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfprobe (tid, msgtag, info) #else __fortran PVMFPROBE (tid, msgtag, info) #endif int *tid, *msgtag, *info; { *info = pvm_probe(*tid, *msgtag); } ./pvm3/libfpvm/WIN32/Pvmftidtoh.c0000644007401100740110000000054606601533305015313 0ustar kohlkohl /* $Id: Pvmftidtoh.c,v 1.2 1998/09/21 20:27:49 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmftidtohost (tid,dtid) #else __fortran PVMFTIDTOHOST (tid, dtid) #endif int *dtid, *tid; { *dtid = pvm_tidtohost(*tid); } ./pvm3/libfpvm/WIN32/Pvmfgetinst.c0000644007401100740110000000144606601533134015475 0ustar kohlkohl /* $Id: Pvmfgetinst.c,v 1.2 1998/09/21 20:26:04 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" #ifdef IMA_WIN32_WATCOM #include "watforstr.h" void pvmfgetinst (group_str, tid, inum) WatcomFortranStr* group_str; int *inum, *tid; { char* group_ptr = group_str->strP; int group_len = group_str->len; #else void __stdcall PVMFGETINST (group_ptr,group_len, tid, inum) char * group_ptr; int group_len; int *inum, *tid; { #endif char tgroup[MAX_GRP_NAME + 1]; /* * Copy the group name to make sure there's * a NUL at the end. */ if (ftocstr(tgroup, sizeof(tgroup), group_ptr, group_len)){ *inum = PvmBadParam; return; } *inum = pvm_getinst(tgroup, *tid); } ./pvm3/libfpvm/WIN32/Pvmfmcast.c0000644007401100740110000000062606601533206015126 0ustar kohlkohl /* $Id: Pvmfmcast.c,v 1.2 1998/09/21 20:26:46 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfmcast (ntid, tids, msgtag, info) #else __fortran PVMFMCAST (ntid, tids, msgtag, info) #endif int *ntid, *tids, *msgtag, *info; { *info = pvm_mcast(tids, *ntid, *msgtag); } ./pvm3/libfpvm/WIN32/pvm_consts.h0000644007401100740110000000072707024215246015371 0ustar kohlkohl /* $Id: pvm_consts.h,v 1.2 1999/12/10 15:22:14 pvmsrc Exp $ */ #include #include #define MAX_ARCH_NAME 31 #define MAX_EVENT_NAME 31 #define MAX_HOST_NAME 256 #define MAX_PROC_NAME 256 #define MAX_GRP_NAME 31 #define MAX_HOSTS 256 #define MAX_MBOX_NAME 256 #define STRING 0 #define BYTE1 1 #define INTEGER2 2 #define INTEGER4 3 #define REAL4 4 #define COMPLEX8 5 #define REAL8 6 #define COMPLEX16 7 #define INTEGER8 8 ./pvm3/libfpvm/WIN32/Pvmfcatchout.c0000644007401100740110000000061206601533101015616 0ustar kohlkohl /* $Id: Pvmfcatchout.c,v 1.2 1998/09/21 20:25:37 pvmsrc Exp $ */ #include #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfcatchout (yesno,info) #else __fortran PVMFCATCHOUT (yesno, info) #endif int *yesno, *info; { *info = pvm_catchout(*yesno ? stdout : 0); } ./pvm3/libfpvm/WIN32/Pvmfrecv.c0000644007401100740110000000056606601533246014765 0ustar kohlkohl /* $Id: Pvmfrecv.c,v 1.2 1998/09/21 20:27:18 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfrecv (tid, msgtag, info) #else __fortran PVMFRECV (tid, msgtag, info) #endif int *tid, *msgtag, *info; { *info = pvm_recv(*tid, *msgtag); } ./pvm3/libfpvm/WIN32/Pvmfgather.c0000644007401100740110000000203706601533127015271 0ustar kohlkohl /* $Id: Pvmfgather.c,v 1.2 1998/09/21 20:25:59 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" #ifdef IMA_WIN32_WATCOM #include "watforstr.h" void pvmfgather (result, data, count, datatype, msgtag, gname_str, rootinst, info) void *result, *data; int *count, *datatype, *msgtag, *rootinst, *info; WatcomFortranStr* gname_str; { char* gname_ptr = gname_str->strP; int gname_len = gname_str->len; #else void __stdcall PVMFGATHER (result, data, count, datatype, msgtag, gname_ptr,gname_len, rootinst, info) void *result, *data; int *count, *datatype, *msgtag, *rootinst, *info; char * gname_ptr; int gname_len; { #endif char tgroup[MAX_GRP_NAME + 1]; /* * Copy the group name to make sure there's a NUL at the end. */ if (ftocstr(tgroup,sizeof(tgroup),gname_ptr,gname_len)) { *info = PvmBadParam; return; } *info = pvm_gather(result, data, *count, *datatype, *msgtag, tgroup, *rootinst); } ./pvm3/libfpvm/WIN32/Pvmfsetctx.c0000644007401100740110000000053306601533270015327 0ustar kohlkohl /* $Id: Pvmfsetctx.c,v 1.2 1998/09/21 20:27:36 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\src\pvmwin.h" #endif #include "pvm3.h" #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfsetcontext (new_ctx, old_ctx) #else __fortran PVMFSETCONTEXT (new_ctx, old_ctx) #endif int *new_ctx, *old_ctx; { *old_ctx = pvm_setcontext(*new_ctx); } ./pvm3/libfpvm/WIN32/Pvmfbarrier.c0000644007401100740110000000140706601533074015446 0ustar kohlkohl /* $Id: Pvmfbarrier.c,v 1.2 1998/09/21 20:25:32 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\src\pvmwin.h" #endif #include "pvm3.h" #include "pvm_consts.h" #ifdef IMA_WIN32_WATCOM #include "watforstr.h" void pvmfbarrier (group_str, count, info) WatcomFortranStr* group_str; int *count, *info; { char* group_ptr = group_str->strP; int group_len = group_str->len; #else void __stdcall PVMFBARRIER (group_ptr,group_len, count, info) char * group_ptr; int group_len; int *count, *info; { #endif char tgroup[MAX_GRP_NAME + 1]; /* * Copy the group name to make sure there's * a NUL at the end. */ if (ftocstr(tgroup, sizeof(tgroup), group_ptr, group_len)){ *info = PvmBadParam; return; } *info = pvm_barrier(tgroup, *count); } ./pvm3/libfpvm/WIN32/Pvmfsetopt.c0000644007401100740110000000056706601533271015343 0ustar kohlkohl /* $Id: Pvmfsetopt.c,v 1.2 1998/09/21 20:27:37 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfsetopt (what, val, info) #else __fortran PVMFSETOPT (what, val, info) #endif int *what, *val, *info; { *info = pvm_setopt(*what, *val); } ./pvm3/libfpvm/WIN32/Pvmfaddhost.c0000644007401100740110000000136506601533067015453 0ustar kohlkohl /* $Id: Pvmfaddhost.c,v 1.2 1998/09/21 20:25:27 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\src\pvmwin.h" #endif #include "pvm3.h" #include "pvm_consts.h" #ifdef IMA_WIN32_WATCOM #include "watforstr.h" pvmfaddhost (host_str,info) WatcomFortranStr* host_str; int *info; { char *host_ptr=host_str->strP; int host_len=host_str->len; #else void __fortran PVMFADDHOST (host_ptr, info, host_len) char * host_ptr; int host_len; int *info; { #endif int dtid; char thost[MAX_HOST_NAME + 1]; char *ptr = thost; /* * Copy the host name to make sure there's * a NUL at the end. */ if (ftocstr(thost, sizeof(thost), host_ptr, host_len)) { *info = PvmBadParam; return; } *info = pvm_addhosts(&ptr, 1, &dtid); if (*info >= 0) *info = dtid; } ./pvm3/libfpvm/WIN32/Pvmfsleep.c0000644007401100740110000000047606673254567015155 0ustar kohlkohl /* $Id: Pvmfsleep.c,v 1.1 1999/03/15 19:03:19 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfsleep (secs) #else __fortran PVMFSLEEP (secs) #endif int *secs; { pvmsleep(*secs); } ./pvm3/libfpvm/WIN32/Pvmfhostsync.c0000644007401100740110000000114406601533157015672 0ustar kohlkohl /* $Id: Pvmfhostsync.c,v 1.2 1998/09/21 20:26:23 pvmsrc Exp $ */ #include #ifndef WIN32 #include #include "pvm3.h" #else #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #include #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfhostsync (host, sec, usec, dsec, dusec, info) #else __fortran PVMFHOSTSYNC (host, sec, usec, dsec, dusec, info) #endif int *host, *sec, *usec, *dsec, *dusec, *info; { struct timeval t, dt; *info = pvm_hostsync(*host, &t, &dt); *sec = t.tv_sec; *usec = t.tv_usec; *dsec = dt.tv_sec; *dusec = dt.tv_usec; } ./pvm3/libfpvm/WIN32/Pvmfhalt.c0000644007401100740110000000047706601533155014756 0ustar kohlkohl /* $Id: Pvmfhalt.c,v 1.2 1998/09/21 20:26:21 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfhalt (info) #else __fortran PVMFHALT (info) #endif int *info; { *info = pvm_halt(); } ./pvm3/libfpvm/WIN32/Pvmfnrecv.c0000644007401100740110000000057006601533220015126 0ustar kohlkohl /* $Id: Pvmfnrecv.c,v 1.2 1998/09/21 20:26:56 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfnrecv (tid, msgtag, info) #else __fortran PVMFNRECV (tid, msgtag, info) #endif int *tid, *msgtag, *info; { *info = pvm_nrecv(*tid, *msgtag); } ./pvm3/libfpvm/WIN32/Pvmffrzgrp.c0000644007401100740110000000147206601533125015331 0ustar kohlkohl /* $Id: Pvmffrzgrp.c,v 1.2 1998/09/21 20:25:57 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" #ifdef IMA_WIN32_WATCOM #include "watforstr.h" void pvmffreezegroup (group_str, count, info) WatcomFortranStr* group_str; int *count, *info; { char* group_ptr = group_str->strP; int group_len = group_str->len; #else void __stdcall PVMFFREEZEGROUP (group_ptr,group_len, count, info) char * group_ptr; int group_len; int *count, *info; { #endif char tgroup[MAX_GRP_NAME + 1]; /* * Copy the group name to make sure there's * a NUL at the end. */ if (ftocstr(tgroup, sizeof(tgroup), group_ptr, group_len)){ *info = PvmBadParam; return; } *info = pvm_freezegroup(tgroup, *count); } ./pvm3/libfpvm/WIN32/Pvmfjoingrp.c0000644007401100740110000000130706625343625015476 0ustar kohlkohl /* $Id: Pvmfjoingrp.c,v 1.3 1998/11/20 19:48:37 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\src\pvmwin.h" #endif #include "pvm3.h" #include "pvm_consts.h" #ifdef IMA_WIN32_WATCOM #include "watforstr.h" pvmfjoingroup (group_str, inum) WatcomFortranStr* group_str; int *inum; { char* group_ptr = group_str->strP; int group_len = group_str->len; #else void __fortran PVMFJOINGROUP (group_ptr,group_len, inum) char * group_ptr; int group_len; int *inum; { #endif char tgroup[MAX_GRP_NAME + 1]; /* * Copy the group name to make sure there's * a NUL at the end. */ if (ftocstr(tgroup, sizeof(tgroup), group_ptr, group_len)){ *inum = PvmBadParam; return; } *inum = pvm_joingroup(tgroup); } ./pvm3/libfpvm/WIN32/Pvmfgetinfo.c0000644007401100740110000000356406601533132015454 0ustar kohlkohl /* $Id: Pvmfgetinfo.c,v 1.2 1998/09/21 20:26:02 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\src\pvmwin.h" #endif #include "pvm3.h" #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfgetmboxinfo (pattern_ptr, name_ptr, nclassesp, nentriesp, indexp, ownerp, flagp, infop, pattern_len, name_len) #else __fortran PVMFGETMBOXINFO (pattern_ptr, name_ptr, nclassesp, nentriesp, indexp, ownerp, flagp, infop, pattern_len, name_len) #endif char * pattern_ptr; int pattern_len; char * name_ptr; int name_len; int *nclassesp, *nentriesp, *indexp, *ownerp, *flagp, *infop; { static struct pvmmboxinfo *classes = (struct pvmmboxinfo *) 0; static int nclasses = 0; static int next = 0; char tpattern[MAX_MBOX_NAME + 1]; int nc; int cc; int i; /* if user sets nclassesp to -1 then pvmfgetmboxinfo() will be reset */ if ( nclasses && nclassesp && (*nclassesp == -1) ) nclasses = 0; if ( !nclasses ) { /* * Copy the pattern to make sure there is * a NUL at the end. */ if ( ftocstr( tpattern, sizeof(tpattern), pattern_ptr, pattern_len ) ) { *infop = PvmBadParam; return; } if ( (cc = pvm_getmboxinfo( tpattern, &nc, &classes )) < 0 ) { *infop = cc; return; } nclasses = nc; next = 0; if ( !nclasses ) *infop = PvmNotFound; } if ( next < nclasses ) { if ( name_ptr ) ctofstr( name_ptr, name_len, classes[ next ].mi_name ); if ( nentriesp ) *nentriesp = classes[ next ].mi_nentries; if ( indexp ) { for ( i=0 ; i < classes[ next ].mi_nentries ; i++ ) indexp[i] = classes[ next ].mi_indices[i]; } if ( ownerp ) { for ( i=0 ; i < classes[ next ].mi_nentries ; i++ ) ownerp[i] = classes[ next ].mi_owners[i]; } if ( flagp ) { for ( i=0 ; i < classes[ next ].mi_nentries ; i++ ) flagp[i] = classes[ next ].mi_flags[i]; } } if ( next == nclasses ) nclasses = 0; } ./pvm3/libfpvm/WIN32/Pvmfinitsend.c0000644007401100740110000000054206601533160015630 0ustar kohlkohl /* $Id: Pvmfinitsend.c,v 1.2 1998/09/21 20:26:24 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfinitsend (tid, info) #else __fortran PVMFINITSEND (tid, info) #endif int *tid, *info; { *info = pvm_initsend(*tid); } ./pvm3/libfpvm/WIN32/Pvmfkill.c0000644007401100740110000000052206601533164014750 0ustar kohlkohl /* $Id: Pvmfkill.c,v 1.2 1998/09/21 20:26:28 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfkill (tid, info) #else __fortran PVMFKILL (tid, info) #endif int *tid, *info; { *info = pvm_kill(*tid); } ./pvm3/libfpvm/WIN32/Pvmfsend.c0000644007401100740110000000056706601533255014760 0ustar kohlkohl /* $Id: Pvmfsend.c,v 1.2 1998/09/21 20:27:25 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfsend (tid, msgtag, info) #else __fortran PVMFSEND (tid, msgtag, info) #endif int *tid, *msgtag, *info; { *info = pvm_send(*tid, *msgtag); } ./pvm3/libfpvm/WIN32/Pvmfdelmhf.c0000644007401100740110000000046706601533117015262 0ustar kohlkohl /* $Id: Pvmfdelmhf.c,v 1.2 1998/09/21 20:25:51 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\src\pvmwin.h" #endif #include "pvm3.h" #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfdelmhf (mhid, info) #else __fortran PVMFDELMHF (mhid, info) #endif int *mhid, *info; { *info = pvm_delmhf(*mhid); } ./pvm3/libfpvm/WIN32/Pvmfreduce.c0000644007401100740110000000440006673277456015305 0ustar kohlkohl /* $Id: Pvmfreduce.c,v 1.3 1999/03/15 21:44:14 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" #ifdef IMA_WIN32_WATCOM #include "watforstr.h" void pvmfreduce (func, data,count, datatype, msgtag, gname_str, rootinst, info) void (*func)(); void *data; int *count, *datatype, *msgtag, *rootinst, *info; WatcomFortranStr* gname_str; { char* gname_ptr = gname_str->strP; int gname_len = gname_str->len; #else void __stdcall PVMFREDUCE (func, data,count, datatype, msgtag, gname_ptr,gname_len, rootinst, info) #ifdef UXPM void (**func)(); /* correction for Fujitsu FORTRAN77 EX */ #else void (*func)(); #endif void *data; int *count, *datatype, *msgtag, *rootinst, *info; char * gname_ptr; int gname_len; { #endif char tgroup[MAX_GRP_NAME + 1]; /* * Copy the group name to make sure there's a NUL at the end. */ if (ftocstr(tgroup, sizeof(tgroup), gname_ptr, gname_len)){ *info = PvmBadParam; return; } #ifdef UXPM *info = pvm_reduce(*func, data, *count, *datatype, *msgtag, tgroup, *rootinst); #else *info = pvm_reduce(func, data, *count, *datatype, *msgtag, tgroup, *rootinst); #endif } /* various reduction functions are defined here */ void #ifdef IMA_WIN32_WATCOM pvmmax (datatype, data, work, count, info) #else __fortran PVMMAX (datatype, data, work, count, info) #endif int *datatype; void *data, *work; int *count, *info; { PvmMax(datatype, data, work, count, info); } void #ifdef IMA_WIN32_WATCOM pvmmin (datatype, data, work, count, info) #else __fortran PVMMIN (datatype, data, work, count, info) #endif int *datatype; void *data, *work; int *count, *info; { PvmMin(datatype, data, work, count, info); } void #ifdef IMA_WIN32_WATCOM pvmsum (datatype, data, work, count, info) #else __fortran PVMSUM (datatype, data, work, count, info) #endif int *datatype; void *data, *work; int *count, *info; { PvmSum(datatype, data, work, count, info); } void #ifdef IMA_WIN32_WATCOM pvmproduct (datatype, data, work, count, info) #else __fortran PVMPRODUCT (datatype, data, work, count, info) #endif int *datatype; void *data, *work; int *count, *info; { PvmProduct(datatype, data, work, count, info); } ./pvm3/libfpvm/WIN32/Pvmfarchcode.c0000644007401100740110000000110206601533072015556 0ustar kohlkohl /* $Id: Pvmfarchcode.c,v 1.2 1998/09/21 20:25:30 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\src\pvmwin.h" #endif #include "pvm3.h" #include "pvm_consts.h" #ifdef IMA_WIN32_WATCOM void pvmfarchcode (arch_ptr, code, arch_len) #else void __fortran PVMFARCHCODE (arch_ptr, code, arch_len) #endif char * arch_ptr; int arch_len; int *code; { char tarch[MAX_HOST_NAME + 1]; /* * Copy the arch name to make sure there's * a NUL at the end. */ if (ftocstr(tarch, sizeof(tarch), arch_ptr, arch_len)) { *code = PvmBadParam; return; } *code = pvm_archcode(tarch); } ./pvm3/libfpvm/WIN32/Pvmfmkbuf.c0000644007401100740110000000055206601533207015122 0ustar kohlkohl /* $Id: Pvmfmkbuf.c,v 1.2 1998/09/21 20:26:47 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfmkbuf (encoding, mbuf) #else __fortran PVMFMKBUF (encoding, mbuf) #endif int *encoding, *mbuf; { *mbuf = pvm_mkbuf(*encoding); } ./pvm3/libfpvm/WIN32/Pvmfaddmhf.c0000644007401100740110000000061306601533071015236 0ustar kohlkohl /* $Id: Pvmfaddmhf.c,v 1.2 1998/09/21 20:25:29 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\src\pvmwin.h" #endif #include "pvm3.h" #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfaddmhf (src, tag, ctx, mid, foo, info) #else __fortran PVMFADDMHF (src, tag, ctx, mid, foo, info) #endif int (*foo)(); int *src, *tag, *ctx, *mid, *info; { *info = pvm_addmhf(*src, *tag, *ctx, foo); } ./pvm3/libfpvm/WIN32/Pvmfnotify.c0000644007401100740110000000067006601533216015327 0ustar kohlkohl /* $Id: Pvmfnotify.c,v 1.2 1998/09/21 20:26:54 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfnotify (about, msgtag, ntid, tids, info) #else __fortran PVMFNOTIFY (about, msgtag, ntid, tids, info) #endif int *about, *ntid, *tids, *msgtag, *info; { *info = pvm_notify(*about, *msgtag, *ntid, tids); } ./pvm3/libfpvm/WIN32/Pvmffreectx.c0000644007401100740110000000050006601533124015445 0ustar kohlkohl /* $Id: Pvmffreectx.c,v 1.2 1998/09/21 20:25:56 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\src\pvmwin.h" #endif #include "pvm3.h" #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmffreecontext (ctx,info) #else __fortran PVMFFREECONTEXT (ctx, info) #endif int *ctx, *info; { *info = pvm_setcontext(*ctx); } ./pvm3/libfpvm/WIN32/Pvmfgsize.c0000644007401100740110000000140106601533153015131 0ustar kohlkohl /* $Id: Pvmfgsize.c,v 1.2 1998/09/21 20:26:19 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\include\pvm3.h" #include "..\..\src\pvmwin.h" #else #include "pvm3.h" #endif #include "pvm_consts.h" #ifdef IMA_WIN32_WATCOM #include "watforstr.h" void pvmfgsize (group_str, size) WatcomFortranStr* group_str; int *size; { char* group_ptr = group_str->strP; int group_len = group_str->len; #else void __stdcall PVMFGSIZE (group_ptr,group_len, size) char * group_ptr; int group_len; int *size; { #endif char tgroup[MAX_GRP_NAME + 1]; /* * Copy the group name to make sure there's * a NUL at the end. */ if (ftocstr(tgroup, sizeof(tgroup), group_ptr, group_len)){ *size = PvmBadParam; return; } *size = pvm_gsize(tgroup); } ./pvm3/libfpvm/WIN32/Pvmfputinfo.c0000644007401100740110000000122006601533244015474 0ustar kohlkohl /* $Id: Pvmfputinfo.c,v 1.2 1998/09/21 20:27:16 pvmsrc Exp $ */ #ifdef WIN32 #include "..\..\src\pvmwin.h" #endif #include "pvm3.h" #include "pvm_consts.h" void #ifdef IMA_WIN32_WATCOM pvmfputinfo (name_ptr, bufid, flags, mbx_index, name_len) #else __fortran PVMFPUTINFO(name_ptr, bufid, flags, mbx_index, name_len) #endif char * name_ptr; int name_len; int *bufid, *flags, *mbx_index; { char tname[MAX_MBOX_NAME + 1]; /* * Copy the mailbox name to make sure there is * a NUL at the end. */ if (ftocstr(tname, sizeof(tname), name_ptr, name_len)) { *mbx_index = PvmBadParam; return; } *mbx_index = pvm_putinfo(tname, *bufid, *flags); } ./pvm3/libfpvm/pvmfbarrier.m40000644007401100740110000000074506225226277015014 0ustar kohlkohl /* $Id: pvmfbarrier.m4,v 1.2 1996/10/04 15:26:55 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfbarrier) ARGS(`STRING_ARG(group), count, info') STRING_ARG_DECL(group); int *count, *info; { char tgroup[MAX_GRP_NAME + 1]; /* * Copy the group name to make sure there's * a NUL at the end. */ if (ftocstr(tgroup, sizeof(tgroup), STRING_PTR(group), STRING_LEN(group))){ *info = PvmBadParam; return; } *info = pvm_barrier(tgroup, *count); } ./pvm3/libfpvm/pvmfaddhost.m40000644007401100740110000000102206225226275014777 0ustar kohlkohl /* $Id: pvmfaddhost.m4,v 1.2 1996/10/04 15:26:53 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfaddhost) ARGS(`STRING_ARG(host), info') STRING_ARG_DECL(host); int *info; { int dtid; char thost[MAX_HOST_NAME + 1]; char *ptr = thost; /* * Copy the host name to make sure there's * a NUL at the end. */ if (ftocstr(thost, sizeof(thost), STRING_PTR(host), STRING_LEN(host))) { *info = PvmBadParam; return; } *info = pvm_addhosts(&ptr, 1, &dtid); if (*info >= 0) *info = dtid; } ./pvm3/libfpvm/pvm_consts.h0000644007401100740110000000327007024215211014553 0ustar kohlkohl /* $Id: pvm_consts.h,v 1.4 1999/12/10 15:21:45 pvmsrc Exp $ */ /* * PVM version 3.4: Parallel Virtual Machine System * University of Tennessee, Knoxville TN. * Oak Ridge National Laboratory, Oak Ridge TN. * Emory University, Atlanta GA. * Authors: J. J. Dongarra, G. E. Fagg, M. Fischer * G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci, * P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam * (C) 1997 All Rights Reserved * * NOTICE * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted * provided that the above copyright notice appear in all copies and * that both the copyright notice and this permission notice appear in * supporting documentation. * * Neither the Institutions (Emory University, Oak Ridge National * Laboratory, and University of Tennessee) nor the Authors make any * representations about the suitability of this software for any * purpose. This software is provided ``as is'' without express or * implied warranty. * * PVM version 3 was funded in part by the U.S. Department of Energy, * the National Science Foundation and the State of Tennessee. */ #include #include #define MAX_ARCH_NAME 31 #define MAX_EVENT_NAME 31 #define MAX_HOST_NAME 256 #define MAX_PROC_NAME 256 #define MAX_GRP_NAME 31 #define MAX_HOSTS 256 #define MAX_MBOX_NAME 256 #define STRING 0 #define BYTE1 1 #define INTEGER2 2 #define INTEGER4 3 #define REAL4 4 #define COMPLEX8 5 #define REAL8 6 #define COMPLEX16 7 #define INTEGER8 8 ./pvm3/libfpvm/pvmfpstat.m40000644007401100740110000000031206225226342014500 0ustar kohlkohl /* $Id: pvmfpstat.m4,v 1.2 1996/10/04 15:27:30 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfpstat) ARGS(`tid, pstat') int *tid, *pstat; { *pstat = pvm_pstat(*tid); } ./pvm3/libfpvm/pvmfbcast.m40000644007401100740110000000074206225226300014442 0ustar kohlkohl /* $Id: pvmfbcast.m4,v 1.2 1996/10/04 15:26:56 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfbcast) ARGS(`STRING_ARG(group), msgtag, info') STRING_ARG_DECL(group); int *msgtag, *info; { char tgroup[MAX_GRP_NAME + 1]; /* * Copy the group name to make sure there's * a NUL at the end. */ if (ftocstr(tgroup, sizeof(tgroup), STRING_PTR(group), STRING_LEN(group))){ *info = PvmBadParam; return; } *info = pvm_bcast(tgroup, *msgtag); } ./pvm3/libfpvm/pvmfgather.m40000644007401100740110000000122006225226310014611 0ustar kohlkohl /* $Id: pvmfgather.m4,v 1.2 1996/10/04 15:27:04 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfgather) ARGS(`result, data, count, datatype, msgtag, STRING_ARG(gname), rootinst, info') void *result, *data; int *count, *datatype, *msgtag, *rootinst, *info; STRING_ARG_DECL(gname); { char tgroup[MAX_GRP_NAME + 1]; /* * Copy the group name to make sure there's a NUL at the end. */ if (ftocstr(tgroup,sizeof(tgroup),STRING_PTR(gname),STRING_LEN(gname))) { *info = PvmBadParam; return; } *info = pvm_gather(result, data, *count, *datatype, *msgtag, tgroup, *rootinst); } ./pvm3/libfpvm/pvmfinitsend.m40000644007401100740110000000032006225226321015156 0ustar kohlkohl /* $Id: pvmfinitsend.m4,v 1.2 1996/10/04 15:27:13 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfinitsend) ARGS(`tid, info') int *tid, *info; { *info = pvm_initsend(*tid); } ./pvm3/libfpvm/pvmfscatter.m40000644007401100740110000000122406225226345015020 0ustar kohlkohl /* $Id: pvmfscatter.m4,v 1.2 1996/10/04 15:27:33 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfscatter) ARGS(`result, data, count, datatype, msgtag, STRING_ARG(gname), rootinst, info') void *result, *data; int *count, *datatype, *msgtag, *rootinst, *info; STRING_ARG_DECL(gname); { char tgroup[MAX_GRP_NAME + 1]; /* * Copy the group name to make sure there's a NUL at the end. */ if (ftocstr(tgroup,sizeof(tgroup),STRING_PTR(gname),STRING_LEN(gname))) { *info = PvmBadParam; return; } *info = pvm_scatter(result, data, *count, *datatype, *msgtag, tgroup, *rootinst); } ./pvm3/libfpvm/pvmfsetopt.m40000644007401100740110000000033606225226351014671 0ustar kohlkohl /* $Id: pvmfsetopt.m4,v 1.2 1996/10/04 15:27:37 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfsetopt) ARGS(`what, val, info') int *what, *val, *info; { *info = pvm_setopt(*what, *val); } ./pvm3/libfpvm/pvmffreebuf.m40000644007401100740110000000032006225226306014762 0ustar kohlkohl /* $Id: pvmffreebuf.m4,v 1.2 1996/10/04 15:27:02 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmffreebuf) ARGS(`mbuf, info') int *mbuf, *info; { *info = pvm_freebuf(*mbuf); } ./pvm3/libfpvm/pvmfcatchout.m40000644007401100740110000000036706225226302015165 0ustar kohlkohl /* $Id: pvmfcatchout.m4,v 1.2 1996/10/04 15:26:58 pvmsrc Exp $ */ #include #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfcatchout) ARGS(`yesno, info') int *yesno, *info; { *info = pvm_catchout(*yesno ? stdout : 0); } ./pvm3/libfpvm/Makefile.mak0000644007401100740110000003627506673254751014456 0ustar kohlkohl# # $Id: Makefile.mak,v 1.6 1999/03/15 19:05:13 pvmsrc Exp $ # #*************************************************************# #** **# #** Nmake file for libfpvm.lib **# #** libfpvm.lib **# #** **# #** **# #*************************************************************# !IF "$(OS)" == "Windows_NT" NULL= !ELSE NULL=nul !ENDIF !include $(PVM_ROOT)\conf\$(PVM_ARCH).def # PVM_ROOT is set during installation in WIN32.def ! SDIR = $(PVM_ROOT)\libfpvm\win32 LOBS = $(PVM_ARCH)\pvmfaddhost.obj \ $(PVM_ARCH)\pvmfaddmhf.obj \ $(PVM_ARCH)\pvmfarchcode.obj \ $(PVM_ARCH)\pvmfbarrier.obj \ $(PVM_ARCH)\pvmfbcast.obj \ $(PVM_ARCH)\pvmfbufinfo.obj \ $(PVM_ARCH)\pvmfcatchout.obj \ $(PVM_ARCH)\pvmfconfig.obj \ $(PVM_ARCH)\pvmfdelhost.obj \ $(PVM_ARCH)\pvmfdelinfo.obj \ $(PVM_ARCH)\pvmfdelmhf.obj \ $(PVM_ARCH)\pvmfexit.obj \ $(PVM_ARCH)\pvmffreebuf.obj \ $(PVM_ARCH)\pvmffreectx.obj \ $(PVM_ARCH)\pvmffrzgrp.obj \ $(PVM_ARCH)\pvmfgather.obj \ $(PVM_ARCH)\pvmfgetctx.obj \ $(PVM_ARCH)\pvmfgetinfo.obj \ $(PVM_ARCH)\pvmfgetinst.obj \ $(PVM_ARCH)\pvmfgetopt.obj \ $(PVM_ARCH)\pvmfgetrbuf.obj \ $(PVM_ARCH)\pvmfgetsbuf.obj \ $(PVM_ARCH)\pvmfgettid.obj \ $(PVM_ARCH)\pvmfgsize.obj \ $(PVM_ARCH)\pvmfhalt.obj \ $(PVM_ARCH)\pvmfhostsync.obj \ $(PVM_ARCH)\pvmfinitsend.obj \ $(PVM_ARCH)\pvmfjoingrp.obj \ $(PVM_ARCH)\pvmfkill.obj \ $(PVM_ARCH)\pvmflvgrp.obj \ $(PVM_ARCH)\pvmfmcast.obj \ $(PVM_ARCH)\pvmfmkbuf.obj \ $(PVM_ARCH)\pvmfmstat.obj \ $(PVM_ARCH)\pvmfmytid.obj \ $(PVM_ARCH)\pvmfnewctx.obj \ $(PVM_ARCH)\pvmfnotify.obj \ $(PVM_ARCH)\pvmfnrecv.obj \ $(PVM_ARCH)\pvmfpack.obj \ $(PVM_ARCH)\pvmfparent.obj \ $(PVM_ARCH)\pvmfperror.obj \ $(PVM_ARCH)\pvmfprecv.obj \ $(PVM_ARCH)\pvmfprobe.obj \ $(PVM_ARCH)\pvmfpsend.obj \ $(PVM_ARCH)\pvmfpstat.obj \ $(PVM_ARCH)\pvmfputinfo.obj \ $(PVM_ARCH)\pvmfrecv.obj \ $(PVM_ARCH)\pvmfrecvinfo.obj \ $(PVM_ARCH)\pvmfreduce.obj \ $(PVM_ARCH)\pvmfscatter.obj \ $(PVM_ARCH)\pvmfsend.obj \ $(PVM_ARCH)\pvmfsendsig.obj \ $(PVM_ARCH)\pvmfsetctx.obj \ $(PVM_ARCH)\pvmfsetopt.obj \ $(PVM_ARCH)\pvmfsetrbuf.obj \ $(PVM_ARCH)\pvmfsetsbuf.obj \ $(PVM_ARCH)\pvmfsiblings.obj \ $(PVM_ARCH)\pvmfsleep.obj \ $(PVM_ARCH)\pvmfspawn.obj \ $(PVM_ARCH)\pvmfstartpvmd.obj \ $(PVM_ARCH)\pvmftasks.obj \ $(PVM_ARCH)\pvmftidtoh.obj \ $(PVM_ARCH)\pvmftrecv.obj \ $(PVM_ARCH)\pvmfunpack.obj \ all: libfpvm3.dll libfpvm3.lib libfpvm3.lib: $(LOBS) $(PVM_ARCH)\ftocstr.obj $(linklib) $(libspec) $(conflags) \ $(OUTBIN)$(PVM_ROOT)\libfpvm\$(PVM_ARCH)\libfpvm3.lib \ $(LOBS) $(PVM_ARCH)\ftocstr.obj copy $(PVM_ARCH)\libfpvm3.lib $(PVM_ROOT)\lib\$(PVM_ARCH) libfpvm3.dll: $(LOBS) $(PVM_ARCH)\ftocstr.obj $(linkdll) $(dllspec) $(conflags) \ $(OUTBIN)$(PVM_ROOT)\libfpvm\$(PVM_ARCH)\libfpvm3.dll \ $(LOBS) $(PVM_ARCH)\ftocstr.obj \ $(PVM_CLIBDIR)\oldnames.lib \ $(PVM_CLIBDIR)\kernel32.lib \ $(PVM_CLIBDIR)\libcpmtd.lib \ $(PVM_CLIBDIR)\wsock32.lib \ $(PVM_CLIBDIR)\libc.lib \ $(PVM_CLIBDIR)\gdi32.lib $(PVM_CLIBDIR)\winspool.lib \ $(PVM_CLIBDIR)\comdlg32.lib \ $(PVM_CLIBDIR)\advapi32.lib \ $(PVM_CLIBDIR)\shell32.lib \ $(PVM_CLIBDIR)\ole32.lib \ $(PVM_CLIBDIR)\oleaut32.lib \ $(PVM_CLIBDIR)\uuid.lib \ $(PVM_CLIBDIR)\oldnames.lib \ ..\lib\WIN32\libpvm3.lib \ ..\lib\WIN32\libgpvm3.lib \ /DEBUG /nodefaultlib:"LIBCMTD.LIB" copy $(PVM_ARCH)\libfpvm3.dll $(PVM_ROOT)\lib\$(PVM_ARCH) $(PVM_ARCH)\ftocstr.obj: $(SDIR)\ftocstr.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\ftocstr.obj $(SDIR)\ftocstr.c $(PVM_ARCH)\pvmfaddhost.obj: $(SDIR)\pvmfaddhost.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfaddhost.obj $(SDIR)\pvmfaddhost.c $(PVM_ARCH)\pvmfaddmhf.obj: $(SDIR)\pvmfaddmhf.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfaddmhf.obj $(SDIR)\pvmfaddmhf.c $(PVM_ARCH)\pvmfarchcode.obj: $(SDIR)\pvmfarchcode.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfarchcode.obj $(SDIR)\pvmfarchcode.c $(PVM_ARCH)\pvmfbarrier.obj: $(SDIR)\pvmfbarrier.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfbarrier.obj $(SDIR)\pvmfbarrier.c $(PVM_ARCH)\pvmfbcast.obj: $(SDIR)\pvmfbcast.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfbcast.obj $(SDIR)\pvmfbcast.c $(PVM_ARCH)\pvmfbufinfo.obj: $(SDIR)\pvmfbufinfo.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfbufinfo.obj $(SDIR)\pvmfbufinfo.c $(PVM_ARCH)\pvmfcatchout.obj: $(SDIR)\pvmfcatchout.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfcatchout.obj $(SDIR)\pvmfcatchout.c $(PVM_ARCH)\pvmfconfig.obj: $(SDIR)\pvmfconfig.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfconfig.obj $(SDIR)\pvmfconfig.c $(PVM_ARCH)\pvmfdelhost.obj: $(SDIR)\pvmfdelhost.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfdelhost.obj $(SDIR)\pvmfdelhost.c $(PVM_ARCH)\pvmfdelinfo.obj: $(SDIR)\pvmfdelinfo.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfdelinfo.obj $(SDIR)\pvmfdelinfo.c $(PVM_ARCH)\pvmfdelmhf.obj: $(SDIR)\pvmfdelmhf.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfdelmhf.obj $(SDIR)\pvmfdelmhf.c $(PVM_ARCH)\pvmfexit.obj: $(SDIR)\pvmfexit.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfexit.obj $(SDIR)\pvmfexit.c $(PVM_ARCH)\pvmffreebuf.obj: $(SDIR)\pvmffreebuf.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmffreebuf.obj $(SDIR)\pvmffreebuf.c $(PVM_ARCH)\pvmffreectx.obj: $(SDIR)\pvmffreectx.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmffreectx.obj $(SDIR)\pvmffreectx.c $(PVM_ARCH)\pvmffrzgrp.obj: $(SDIR)\pvmffrzgrp.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmffrzgrp.obj $(SDIR)\pvmffrzgrp.c $(PVM_ARCH)\pvmfgather.obj: $(SDIR)\pvmfgather.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfgather.obj $(SDIR)\pvmfgather.c $(PVM_ARCH)\pvmfgetctx.obj: $(SDIR)\pvmfgetctx.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfgetctx.obj $(SDIR)\pvmfgetctx.c $(PVM_ARCH)\pvmfgetinfo.obj: $(SDIR)\pvmfgetinfo.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfgetinfo.obj $(SDIR)\pvmfgetinfo.c $(PVM_ARCH)\pvmfgetinst.obj: $(SDIR)\pvmfgetinst.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfgetinst.obj $(SDIR)\pvmfgetinst.c $(PVM_ARCH)\pvmfgetopt.obj: $(SDIR)\pvmfgetopt.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfgetopt.obj $(SDIR)\pvmfgetopt.c $(PVM_ARCH)\pvmfgetrbuf.obj: $(SDIR)\pvmfgetrbuf.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfgetrbuf.obj $(SDIR)\pvmfgetrbuf.c $(PVM_ARCH)\pvmfgetsbuf.obj: $(SDIR)\pvmfgetsbuf.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfgetsbuf.obj $(SDIR)\pvmfgetsbuf.c $(PVM_ARCH)\pvmfgettid.obj: $(SDIR)\pvmfgettid.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfgettid.obj $(SDIR)\pvmfgettid.c $(PVM_ARCH)\pvmfgsize.obj: $(SDIR)\pvmfgsize.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfgsize.obj $(SDIR)\pvmfgsize.c $(PVM_ARCH)\pvmfhalt.obj: $(SDIR)\pvmfhalt.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfhalt.obj $(SDIR)\pvmfhalt.c $(PVM_ARCH)\pvmfhostsync.obj: $(SDIR)\pvmfhostsync.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfhostsync.obj $(SDIR)\pvmfhostsync.c $(PVM_ARCH)\pvmfinitsend.obj: $(SDIR)\pvmfinitsend.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfinitsend.obj $(SDIR)\pvmfinitsend.c $(PVM_ARCH)\pvmfjoingrp.obj: $(SDIR)\pvmfjoingrp.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfjoingrp.obj $(SDIR)\pvmfjoingrp.c $(PVM_ARCH)\pvmfkill.obj: $(SDIR)\pvmfkill.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfkill.obj $(SDIR)\pvmfkill.c $(PVM_ARCH)\pvmflvgrp.obj: $(SDIR)\pvmflvgrp.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmflvgrp.obj $(SDIR)\pvmflvgrp.c $(PVM_ARCH)\pvmfmcast.obj: $(SDIR)\pvmfmcast.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfmcast.obj $(SDIR)\pvmfmcast.c $(PVM_ARCH)\pvmfmkbuf.obj: $(SDIR)\pvmfmkbuf.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfmkbuf.obj $(SDIR)\pvmfmkbuf.c $(PVM_ARCH)\pvmfmstat.obj: $(SDIR)\pvmfmstat.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfmstat.obj $(SDIR)\pvmfmstat.c $(PVM_ARCH)\pvmfmytid.obj: $(SDIR)\pvmfmytid.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfmytid.obj $(SDIR)\pvmfmytid.c $(PVM_ARCH)\pvmfnewctx.obj: $(SDIR)\pvmfnewctx.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfnewctx.obj $(SDIR)\pvmfnewctx.c $(PVM_ARCH)\pvmfnotify.obj: $(SDIR)\pvmfnotify.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfnotify.obj $(SDIR)\pvmfnotify.c $(PVM_ARCH)\pvmfnrecv.obj: $(SDIR)\pvmfnrecv.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfnrecv.obj $(SDIR)\pvmfnrecv.c $(PVM_ARCH)\pvmfpack.obj: $(SDIR)\pvmfpack.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfpack.obj $(SDIR)\pvmfpack.c $(PVM_ARCH)\pvmfparent.obj: $(SDIR)\pvmfparent.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfparent.obj $(SDIR)\pvmfparent.c $(PVM_ARCH)\pvmfperror.obj: $(SDIR)\pvmfperror.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfperror.obj $(SDIR)\pvmfperror.c $(PVM_ARCH)\pvmfprecv.obj: $(SDIR)\pvmfprecv.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfprecv.obj $(SDIR)\pvmfprecv.c $(PVM_ARCH)\pvmfprobe.obj: $(SDIR)\pvmfprobe.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfprobe.obj $(SDIR)\pvmfprobe.c $(PVM_ARCH)\pvmfpsend.obj: $(SDIR)\pvmfpsend.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfpsend.obj $(SDIR)\pvmfpsend.c $(PVM_ARCH)\pvmfpstat.obj: $(SDIR)\pvmfpstat.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfpstat.obj $(SDIR)\pvmfpstat.c $(PVM_ARCH)\pvmfputinfo.obj: $(SDIR)\pvmfputinfo.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfputinfo.obj $(SDIR)\pvmfputinfo.c $(PVM_ARCH)\pvmftrecv.obj: $(SDIR)\pvmftrecv.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmftrecv.obj $(SDIR)\pvmftrecv.c $(PVM_ARCH)\pvmfrecvinfo.obj: $(SDIR)\pvmfrecvinfo.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfrecvinfo.obj $(SDIR)\pvmfrecvinfo.c $(PVM_ARCH)\pvmfreduce.obj: $(SDIR)\pvmfreduce.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfreduce.obj $(SDIR)\pvmfreduce.c $(PVM_ARCH)\pvmfscatter.obj: $(SDIR)\pvmfscatter.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfscatter.obj $(SDIR)\pvmfscatter.c $(PVM_ARCH)\pvmfsend.obj: $(SDIR)\pvmfsend.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfsend.obj $(SDIR)\pvmfsend.c $(PVM_ARCH)\pvmfsendsig.obj: $(SDIR)\pvmfsendsig.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfsendsig.obj $(SDIR)\pvmfsendsig.c $(PVM_ARCH)\pvmfsetctx.obj: $(SDIR)\pvmfsetctx.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfsetctx.obj $(SDIR)\pvmfsetctx.c $(PVM_ARCH)\pvmfsetopt.obj: $(SDIR)\pvmfsetopt.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfsetopt.obj $(SDIR)\pvmfsetopt.c $(PVM_ARCH)\pvmfsetrbuf.obj: $(SDIR)\pvmfsetrbuf.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfsetrbuf.obj $(SDIR)\pvmfsetrbuf.c $(PVM_ARCH)\pvmfsetsbuf.obj: $(SDIR)\pvmfsetsbuf.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfsetsbuf.obj $(SDIR)\pvmfsetsbuf.c $(PVM_ARCH)\pvmfsiblings.obj: $(SDIR)\pvmfsiblings.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfsiblings.obj $(SDIR)\pvmfsiblings.c $(PVM_ARCH)\pvmfsleep.obj: $(SDIR)\pvmfsleep.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfsleep.obj $(SDIR)\pvmfsleep.c $(PVM_ARCH)\pvmfspawn.obj: $(SDIR)\pvmfspawn.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfspawn.obj $(SDIR)\pvmfspawn.c $(PVM_ARCH)\pvmfstartpvmd.obj: $(SDIR)\pvmfstartpvmd.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfstartpvmd.obj $(SDIR)\pvmfstartpvmd.c $(PVM_ARCH)\pvmftasks.obj: $(SDIR)\pvmftasks.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmftasks.obj $(SDIR)\pvmftasks.c $(PVM_ARCH)\pvmftidtoh.obj: $(SDIR)\pvmftidtoh.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmftidtoh.obj $(SDIR)\pvmftidtoh.c $(PVM_ARCH)\pvmfrecv.obj: $(SDIR)\pvmfrecv.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfrecv.obj $(SDIR)\pvmfrecv.c $(PVM_ARCH)\pvmfunpack.obj: $(SDIR)\pvmfunpack.c $(cc) $(cdebug) $(cflags) $(cvars) \ $(OUT)$(PVM_ARCH)\pvmfunpack.obj $(SDIR)\pvmfunpack.c # Clean up everything but the .EXEs clean: cd WIN32 -del *.obj -del *.pdb -del lib*.* ./pvm3/libfpvm/pvmfsetrbuf.m40000644007401100740110000000032606225226352015025 0ustar kohlkohl /* $Id: pvmfsetrbuf.m4,v 1.2 1996/10/04 15:27:38 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfsetrbuf) ARGS(`mbuf, oldbuf') int *mbuf, *oldbuf; { *oldbuf = pvm_setrbuf(*mbuf); } ./pvm3/libfpvm/pvmfreduce.m40000644007401100740110000000317306365413400014622 0ustar kohlkohl /* $Id: pvmfreduce.m4,v 1.4 1997/07/23 14:36:48 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfreduce) ARGS(`func, data,count, datatype, msgtag, STRING_ARG(gname), rootinst, info') #if defined(IMA_UXPM) || defined(IMA_UXPV) void (**func)(); /* correction for Fujitsu FORTRAN77 EX */ #else void (*func)(); #endif void *data; int *count, *datatype, *msgtag, *rootinst, *info; STRING_ARG_DECL(gname); { char tgroup[MAX_GRP_NAME + 1]; /* * Copy the group name to make sure there's a NUL at the end. */ if (ftocstr(tgroup, sizeof(tgroup), STRING_PTR(gname), STRING_LEN(gname))){ *info = PvmBadParam; return; } #if defined(IMA_UXPM) || defined(IMA_UXPV) *info = pvm_reduce(*func, data, *count, *datatype, *msgtag, tgroup, *rootinst); #else *info = pvm_reduce(func, data, *count, *datatype, *msgtag, tgroup, *rootinst); #endif } /* various reduction functions are defined here */ void FUNCTION(pvmmax) ARGS(`datatype, data, work, count, info') int *datatype; void *data, *work; int *count, *info; { PvmMax(datatype, data, work, count, info); } void FUNCTION(pvmmin) ARGS(`datatype, data, work, count, info') int *datatype; void *data, *work; int *count, *info; { PvmMin(datatype, data, work, count, info); } void FUNCTION(pvmsum) ARGS(`datatype, data, work, count, info') int *datatype; void *data, *work; int *count, *info; { PvmSum(datatype, data, work, count, info); } void FUNCTION(pvmproduct) ARGS(`datatype, data, work, count, info') int *datatype; void *data, *work; int *count, *info; { PvmProduct(datatype, data, work, count, info); } ./pvm3/libfpvm/pvmfparent.m40000644007401100740110000000027006225226335014643 0ustar kohlkohl /* $Id: pvmfparent.m4,v 1.2 1996/10/04 15:27:25 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfparent) ARGS(`tid') int *tid; { *tid = pvm_parent(); } ./pvm3/libfpvm/pvmffreectx.m40000644007401100740110000000032406336125742015015 0ustar kohlkohl /* $Id: pvmffreectx.m4,v 1.2 1997/05/13 17:58:58 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmffreecontext) ARGS(`ctx, info') int *ctx, *info; { *info = pvm_setcontext(*ctx); } ./pvm3/libfpvm/Makefile.aimk0000644007401100740110000004062106673254747014622 0ustar kohlkohl# # $Id: Makefile.aimk,v 1.19 1999/03/15 19:05:11 pvmsrc Exp $ # # # Generic Makefile body to be concatenated to config header. # SHELL = /bin/sh PVMDIR = ../.. SDIR = $(PVMDIR)/libfpvm CFLAGS = $(CFLOPTS) -c -DIMA_$(PVM_ARCH) \ -I$(SDIR) -I$(PVMDIR)/include -I$(PVMDIR)/src \ $(CDEBUGFLAGS) $(ARCHCFLAGS) RM = rm -f M4 = m4 M4FILE = $(PVMDIR)/conf/$(PVM_ARCH).m4 PVMLDIR = $(PVMDIR)/lib/$(PVM_ARCH) RWBSPECIAL = |sed '/^.include \"pvm3.h\"/d' \ |sed '/^.include \"pvm_consts.h\"/d' M4A = `case x$(NEEDF2M4) in xt) echo "$(M4) -DUSCORYES $(M4FILE)";; x) echo "$(M4) $(M4FILE)";; esac` M4B1 = case x$(NEEDF2M4) in xt) $(M4) $(M4FILE) M4B2 = ;; esac PVMHEADERS = $(PVMDIR)/include/pvm3.h \ $(SDIR)/pvm_consts.h PVMALLOCH = $(PVMDIR)/src/pvmalloc.h PVMBFUNCH = $(PVMDIR)/src/bfunc.h PVMBFHEADERS = $(PVMHEADERS) $(PVMBFUNCH) LIBPREFIX = lib LIBFPVM = $(LIBPREFIX)fpvm3.a LOBS = pvmfaddhost.o \ pvmfaddmhf.o \ pvmfarchcode.o \ pvmfbarrier.o \ pvmfbcast.o \ pvmfbufinfo.o \ pvmfcatchout.o \ pvmfconfig.o \ pvmfdelhost.o \ pvmfdelinfo.o \ pvmfdelmhf.o \ pvmfexit.o \ pvmffreebuf.o \ pvmffreectx.o \ pvmffrzgrp.o \ pvmfgather.o \ pvmfgetctx.o \ pvmfgetinfo.o \ pvmfgetinst.o \ pvmfgetopt.o \ pvmfgetrbuf.o \ pvmfgetsbuf.o \ pvmfgettid.o \ pvmfgsize.o \ pvmfhalt.o \ pvmfhostsync.o \ pvmfinitsend.o \ pvmfjoingrp.o \ pvmfkill.o \ pvmflvgrp.o \ pvmfmcast.o \ pvmfmkbuf.o \ pvmfmstat.o \ pvmfmytid.o \ pvmfnewctx.o \ pvmfnotify.o \ pvmfnrecv.o \ pvmfpack.o \ pvmfparent.o \ pvmfperror.o \ pvmfprecv.o \ pvmfprobe.o \ pvmfpsend.o \ pvmfpstat.o \ pvmfputinfo.o \ pvmfrecv.o \ pvmfrecvinfo.o \ pvmfreduce.o \ pvmfscatter.o \ pvmfsend.o \ pvmfsendsig.o \ pvmfsetctx.o \ pvmfsetopt.o \ pvmfsetrbuf.o \ pvmfsetsbuf.o \ pvmfsiblings.o \ pvmfsleep.o \ pvmfspawn.o \ pvmfstartpvmd.o \ pvmftasks.o \ pvmftidtoh.o \ pvmftrecv.o \ pvmfunpack.o default: $(LIBFPVM) install: $(PVMLDIR) $(PVMLDIR)/$(LIBFPVM) $(PVMLDIR): - mkdir $(PVMLDIR) $(PVMLDIR)/$(LIBFPVM): $(LIBFPVM) cp $(LIBFPVM) $(PVMLDIR) $(LIBFPVM): $(LOBS) ftocstr.o $(AR) cr $(LIBFPVM) $? case x$(HASRANLIB) in xt ) echo ranlib; ranlib $(LIBFPVM) ;; esac clean: rm -f $(LOBS) ftocstr.o $(LIBFPVM) tidy: rm -f $(LOBS) ftocstr.o: $(SDIR)/ftocstr.c $(PVMBFUNCH) $(CC) $(CFLAGS) $(SDIR)/ftocstr.c pvmfaddhost.o: $(SDIR)/pvmfaddhost.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfaddhost.m4 > pvmfaddhost.c $(M4B1) $(SDIR)/pvmfaddhost.m4 $(RWBSPECIAL) >> pvmfaddhost.c $(M4B2) $(CC) $(CFLAGS) pvmfaddhost.c $(RM) pvmfaddhost.c pvmfaddmhf.o: $(SDIR)/pvmfaddmhf.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfaddmhf.m4 > pvmfaddmhf.c $(M4B1) $(SDIR)/pvmfaddmhf.m4 $(RWBSPECIAL) >> pvmfaddmhf.c $(M4B2) $(CC) $(CFLAGS) pvmfaddmhf.c $(RM) pvmfaddmhf.c pvmfarchcode.o: $(SDIR)/pvmfarchcode.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfarchcode.m4 > pvmfarchcode.c $(M4B1) $(SDIR)/pvmfarchcode.m4 $(RWBSPECIAL) >> pvmfarchcode.c $(M4B2) $(CC) $(CFLAGS) pvmfarchcode.c $(RM) pvmfarchcode.c pvmfbarrier.o: $(SDIR)/pvmfbarrier.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfbarrier.m4 > pvmfbarrier.c $(M4B1) $(SDIR)/pvmfbarrier.m4 $(RWBSPECIAL) >> pvmfbarrier.c $(M4B2) $(CC) $(CFLAGS) pvmfbarrier.c $(RM) pvmfbarrier.c pvmfbcast.o: $(SDIR)/pvmfbcast.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfbcast.m4 > pvmfbcast.c $(M4B1) $(SDIR)/pvmfbcast.m4 $(RWBSPECIAL) >> pvmfbcast.c $(M4B2) $(CC) $(CFLAGS) pvmfbcast.c $(RM) pvmfbcast.c pvmfbufinfo.o: $(SDIR)/pvmfbufinfo.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfbufinfo.m4 > pvmfbufinfo.c $(M4B1) $(SDIR)/pvmfbufinfo.m4 $(RWBSPECIAL) >> pvmfbufinfo.c $(M4B2) $(CC) $(CFLAGS) pvmfbufinfo.c $(RM) pvmfbufinfo.c pvmfcatchout.o: $(SDIR)/pvmfcatchout.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfcatchout.m4 > pvmfcatchout.c $(M4B1) $(SDIR)/pvmfcatchout.m4 $(RWBSPECIAL) >> pvmfcatchout.c $(M4B2) $(CC) $(CFLAGS) pvmfcatchout.c $(RM) pvmfcatchout.c pvmfconfig.o: $(SDIR)/pvmfconfig.m4 $(M4FILE) $(PVMBFHEADERS) $(M4A) $(SDIR)/pvmfconfig.m4 > pvmfconfig.c $(M4B1) $(SDIR)/pvmfconfig.m4 $(RWBSPECIAL) >> pvmfconfig.c $(M4B2) $(CC) $(CFLAGS) pvmfconfig.c $(RM) pvmfconfig.c pvmfdelhost.o: $(SDIR)/pvmfdelhost.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfdelhost.m4 > pvmfdelhost.c $(M4B1) $(SDIR)/pvmfdelhost.m4 $(RWBSPECIAL) >> pvmfdelhost.c $(M4B2) $(CC) $(CFLAGS) pvmfdelhost.c $(RM) pvmfdelhost.c pvmfdelinfo.o: $(SDIR)/pvmfdelinfo.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfdelinfo.m4 > pvmfdelinfo.c $(M4B1) $(SDIR)/pvmfdelinfo.m4 $(RWBSPECIAL) >> pvmfdelinfo.c $(M4B2) $(CC) $(CFLAGS) pvmfdelinfo.c $(RM) pvmfdelinfo.c pvmfdelmhf.o: $(SDIR)/pvmfdelmhf.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfdelmhf.m4 > pvmfdelmhf.c $(M4B1) $(SDIR)/pvmfdelmhf.m4 $(RWBSPECIAL) >> pvmfdelmhf.c $(M4B2) $(CC) $(CFLAGS) pvmfdelmhf.c $(RM) pvmfdelmhf.c pvmfexit.o: $(SDIR)/pvmfexit.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfexit.m4 > pvmfexit.c $(M4B1) $(SDIR)/pvmfexit.m4 $(RWBSPECIAL) >> pvmfexit.c $(M4B2) $(CC) $(CFLAGS) pvmfexit.c $(RM) pvmfexit.c pvmffreebuf.o: $(SDIR)/pvmffreebuf.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmffreebuf.m4 > pvmffreebuf.c $(M4B1) $(SDIR)/pvmffreebuf.m4 $(RWBSPECIAL) >> pvmffreebuf.c $(M4B2) $(CC) $(CFLAGS) pvmffreebuf.c $(RM) pvmffreebuf.c pvmffreectx.o: $(SDIR)/pvmffreectx.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmffreectx.m4 > pvmffreectx.c $(M4B1) $(SDIR)/pvmffreectx.m4 $(RWBSPECIAL) >> pvmffreectx.c $(M4B2) $(CC) $(CFLAGS) pvmffreectx.c $(RM) pvmffreectx.c pvmffrzgrp.o: $(SDIR)/pvmffrzgrp.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmffrzgrp.m4 > pvmffrzgrp.c $(M4B1) $(SDIR)/pvmffrzgrp.m4 $(RWBSPECIAL) >> pvmffrzgrp.c $(M4B2) $(CC) $(CFLAGS) pvmffrzgrp.c $(RM) pvmffrzgrp.c pvmfgather.o: $(SDIR)/pvmfgather.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfgather.m4 > pvmfgather.c $(M4B1) $(SDIR)/pvmfgather.m4 $(RWBSPECIAL) >> pvmfgather.c $(M4B2) $(CC) $(CFLAGS) pvmfgather.c $(RM) pvmfgather.c pvmfgetctx.o: $(SDIR)/pvmfgetctx.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfgetctx.m4 > pvmfgetctx.c $(M4B1) $(SDIR)/pvmfgetctx.m4 $(RWBSPECIAL) >> pvmfgetctx.c $(M4B2) $(CC) $(CFLAGS) pvmfgetctx.c $(RM) pvmfgetctx.c pvmfgetinfo.o: $(SDIR)/pvmfgetinfo.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfgetinfo.m4 > pvmfgetinfo.c $(M4B1) $(SDIR)/pvmfgetinfo.m4 $(RWBSPECIAL) >> pvmfgetinfo.c $(M4B2) $(CC) $(CFLAGS) pvmfgetinfo.c $(RM) pvmfgetinfo.c pvmfgetinst.o: $(SDIR)/pvmfgetinst.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfgetinst.m4 > pvmfgetinst.c $(M4B1) $(SDIR)/pvmfgetinst.m4 $(RWBSPECIAL) >> pvmfgetinst.c $(M4B2) $(CC) $(CFLAGS) pvmfgetinst.c $(RM) pvmfgetinst.c pvmfgetopt.o: $(SDIR)/pvmfgetopt.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfgetopt.m4 > pvmfgetopt.c $(M4B1) $(SDIR)/pvmfgetopt.m4 $(RWBSPECIAL) >> pvmfgetopt.c $(M4B2) $(CC) $(CFLAGS) pvmfgetopt.c $(RM) pvmfgetopt.c pvmfgetrbuf.o: $(SDIR)/pvmfgetrbuf.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfgetrbuf.m4 > pvmfgetrbuf.c $(M4B1) $(SDIR)/pvmfgetrbuf.m4 $(RWBSPECIAL) >> pvmfgetrbuf.c $(M4B2) $(CC) $(CFLAGS) pvmfgetrbuf.c $(RM) pvmfgetrbuf.c pvmfgetsbuf.o: $(SDIR)/pvmfgetsbuf.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfgetsbuf.m4 > pvmfgetsbuf.c $(M4B1) $(SDIR)/pvmfgetsbuf.m4 $(RWBSPECIAL) >> pvmfgetsbuf.c $(M4B2) $(CC) $(CFLAGS) pvmfgetsbuf.c $(RM) pvmfgetsbuf.c pvmfgettid.o: $(SDIR)/pvmfgettid.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfgettid.m4 > pvmfgettid.c $(M4B1) $(SDIR)/pvmfgettid.m4 $(RWBSPECIAL) >> pvmfgettid.c $(M4B2) $(CC) $(CFLAGS) pvmfgettid.c $(RM) pvmfgettid.c pvmfgsize.o: $(SDIR)/pvmfgsize.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfgsize.m4 > pvmfgsize.c $(M4B1) $(SDIR)/pvmfgsize.m4 $(RWBSPECIAL) >> pvmfgsize.c $(M4B2) $(CC) $(CFLAGS) pvmfgsize.c $(RM) pvmfgsize.c pvmfhalt.o: $(SDIR)/pvmfhalt.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfhalt.m4 > pvmfhalt.c $(M4B1) $(SDIR)/pvmfhalt.m4 $(RWBSPECIAL) >> pvmfhalt.c $(M4B2) $(CC) $(CFLAGS) pvmfhalt.c $(RM) pvmfhalt.c pvmfhostsync.o: $(SDIR)/pvmfhostsync.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfhostsync.m4 > pvmfhostsync.c $(M4B1) $(SDIR)/pvmfhostsync.m4 $(RWBSPECIAL) >> pvmfhostsync.c $(M4B2) $(CC) $(CFLAGS) pvmfhostsync.c $(RM) pvmfhostsync.c pvmfinitsend.o: $(SDIR)/pvmfinitsend.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfinitsend.m4 > pvmfinitsend.c $(M4B1) $(SDIR)/pvmfinitsend.m4 $(RWBSPECIAL) >> pvmfinitsend.c $(M4B2) $(CC) $(CFLAGS) pvmfinitsend.c $(RM) pvmfinitsend.c pvmfjoingrp.o: $(SDIR)/pvmfjoingrp.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfjoingrp.m4 > pvmfjoingrp.c $(M4B1) $(SDIR)/pvmfjoingrp.m4 $(RWBSPECIAL) >> pvmfjoingrp.c $(M4B2) $(CC) $(CFLAGS) pvmfjoingrp.c $(RM) pvmfjoingrp.c pvmfkill.o: $(SDIR)/pvmfkill.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfkill.m4 > pvmfkill.c $(M4B1) $(SDIR)/pvmfkill.m4 $(RWBSPECIAL) >> pvmfkill.c $(M4B2) $(CC) $(CFLAGS) pvmfkill.c $(RM) pvmfkill.c pvmflvgrp.o: $(SDIR)/pvmflvgrp.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmflvgrp.m4 > pvmflvgrp.c $(M4B1) $(SDIR)/pvmflvgrp.m4 $(RWBSPECIAL) >> pvmflvgrp.c $(M4B2) $(CC) $(CFLAGS) pvmflvgrp.c $(RM) pvmflvgrp.c pvmfmcast.o: $(SDIR)/pvmfmcast.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfmcast.m4 > pvmfmcast.c $(M4B1) $(SDIR)/pvmfmcast.m4 $(RWBSPECIAL) >> pvmfmcast.c $(M4B2) $(CC) $(CFLAGS) pvmfmcast.c $(RM) pvmfmcast.c pvmfmkbuf.o: $(SDIR)/pvmfmkbuf.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfmkbuf.m4 > pvmfmkbuf.c $(M4B1) $(SDIR)/pvmfmkbuf.m4 $(RWBSPECIAL) >> pvmfmkbuf.c $(M4B2) $(CC) $(CFLAGS) pvmfmkbuf.c $(RM) pvmfmkbuf.c pvmfmstat.o: $(SDIR)/pvmfmstat.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfmstat.m4 > pvmfmstat.c $(M4B1) $(SDIR)/pvmfmstat.m4 $(RWBSPECIAL) >> pvmfmstat.c $(M4B2) $(CC) $(CFLAGS) pvmfmstat.c $(RM) pvmfmstat.c pvmfmytid.o: $(SDIR)/pvmfmytid.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfmytid.m4 > pvmfmytid.c $(M4B1) $(SDIR)/pvmfmytid.m4 $(RWBSPECIAL) >> pvmfmytid.c $(M4B2) $(CC) $(CFLAGS) pvmfmytid.c $(RM) pvmfmytid.c pvmfnewctx.o: $(SDIR)/pvmfnewctx.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfnewctx.m4 > pvmfnewctx.c $(M4B1) $(SDIR)/pvmfnewctx.m4 $(RWBSPECIAL) >> pvmfnewctx.c $(M4B2) $(CC) $(CFLAGS) pvmfnewctx.c $(RM) pvmfnewctx.c pvmfnotify.o: $(SDIR)/pvmfnotify.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfnotify.m4 > pvmfnotify.c $(M4B1) $(SDIR)/pvmfnotify.m4 $(RWBSPECIAL) >> pvmfnotify.c $(M4B2) $(CC) $(CFLAGS) pvmfnotify.c $(RM) pvmfnotify.c pvmfnrecv.o: $(SDIR)/pvmfnrecv.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfnrecv.m4 > pvmfnrecv.c $(M4B1) $(SDIR)/pvmfnrecv.m4 $(RWBSPECIAL) >> pvmfnrecv.c $(M4B2) $(CC) $(CFLAGS) pvmfnrecv.c $(RM) pvmfnrecv.c pvmfpack.o: $(SDIR)/pvmfpack.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfpack.m4 > pvmfpack.c $(M4B1) $(SDIR)/pvmfpack.m4 $(RWBSPECIAL) >> pvmfpack.c $(M4B2) $(CC) $(CFLAGS) pvmfpack.c $(RM) pvmfpack.c pvmfparent.o: $(SDIR)/pvmfparent.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfparent.m4 > pvmfparent.c $(M4B1) $(SDIR)/pvmfparent.m4 $(RWBSPECIAL) >> pvmfparent.c $(M4B2) $(CC) $(CFLAGS) pvmfparent.c $(RM) pvmfparent.c pvmfperror.o: $(SDIR)/pvmfperror.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfperror.m4 > pvmfperror.c $(M4B1) $(SDIR)/pvmfperror.m4 $(RWBSPECIAL) >> pvmfperror.c $(M4B2) $(CC) $(CFLAGS) pvmfperror.c $(RM) pvmfperror.c pvmfprecv.o: $(SDIR)/pvmfprecv.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfprecv.m4 > pvmfprecv.c $(M4B1) $(SDIR)/pvmfprecv.m4 $(RWBSPECIAL) >> pvmfprecv.c $(M4B2) $(CC) $(CFLAGS) pvmfprecv.c $(RM) pvmfprecv.c pvmfprobe.o: $(SDIR)/pvmfprobe.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfprobe.m4 > pvmfprobe.c $(M4B1) $(SDIR)/pvmfprobe.m4 $(RWBSPECIAL) >> pvmfprobe.c $(M4B2) $(CC) $(CFLAGS) pvmfprobe.c $(RM) pvmfprobe.c pvmfpsend.o: $(SDIR)/pvmfpsend.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfpsend.m4 > pvmfpsend.c $(M4B1) $(SDIR)/pvmfpsend.m4 $(RWBSPECIAL) >> pvmfpsend.c $(M4B2) $(CC) $(CFLAGS) pvmfpsend.c $(RM) pvmfpsend.c pvmfpstat.o: $(SDIR)/pvmfpstat.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfpstat.m4 > pvmfpstat.c $(M4B1) $(SDIR)/pvmfpstat.m4 $(RWBSPECIAL) >> pvmfpstat.c $(M4B2) $(CC) $(CFLAGS) pvmfpstat.c $(RM) pvmfpstat.c pvmfputinfo.o: $(SDIR)/pvmfputinfo.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfputinfo.m4 > pvmfputinfo.c $(M4B1) $(SDIR)/pvmfputinfo.m4 $(RWBSPECIAL) >> pvmfputinfo.c $(M4B2) $(CC) $(CFLAGS) pvmfputinfo.c $(RM) pvmfputinfo.c pvmfrecv.o: $(SDIR)/pvmfrecv.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfrecv.m4 > pvmfrecv.c $(M4B1) $(SDIR)/pvmfrecv.m4 $(RWBSPECIAL) >> pvmfrecv.c $(M4B2) $(CC) $(CFLAGS) pvmfrecv.c $(RM) pvmfrecv.c pvmfrecvinfo.o: $(SDIR)/pvmfrecvinfo.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfrecvinfo.m4 > pvmfrecvinfo.c $(M4B1) $(SDIR)/pvmfrecvinfo.m4 $(RWBSPECIAL) >> pvmfrecvinfo.c $(M4B2) $(CC) $(CFLAGS) pvmfrecvinfo.c $(RM) pvmfrecvinfo.c pvmfreduce.o: $(SDIR)/pvmfreduce.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfreduce.m4 > pvmfreduce.c $(M4B1) $(SDIR)/pvmfreduce.m4 $(RWBSPECIAL) >> pvmfreduce.c $(M4B2) $(CC) $(CFLAGS) pvmfreduce.c $(RM) pvmfreduce.c pvmfscatter.o: $(SDIR)/pvmfscatter.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfscatter.m4 > pvmfscatter.c $(M4B1) $(SDIR)/pvmfscatter.m4 $(RWBSPECIAL) >> pvmfscatter.c $(M4B2) $(CC) $(CFLAGS) pvmfscatter.c $(RM) pvmfscatter.c pvmfsend.o: $(SDIR)/pvmfsend.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfsend.m4 > pvmfsend.c $(M4B1) $(SDIR)/pvmfsend.m4 $(RWBSPECIAL) >> pvmfsend.c $(M4B2) $(CC) $(CFLAGS) pvmfsend.c $(RM) pvmfsend.c pvmfsendsig.o: $(SDIR)/pvmfsendsig.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfsendsig.m4 > pvmfsendsig.c $(M4B1) $(SDIR)/pvmfsendsig.m4 $(RWBSPECIAL) >> pvmfsendsig.c $(M4B2) $(CC) $(CFLAGS) pvmfsendsig.c $(RM) pvmfsendsig.c pvmfsetctx.o: $(SDIR)/pvmfsetctx.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfsetctx.m4 > pvmfsetctx.c $(M4B1) $(SDIR)/pvmfsetctx.m4 $(RWBSPECIAL) >> pvmfsetctx.c $(M4B2) $(CC) $(CFLAGS) pvmfsetctx.c $(RM) pvmfsetctx.c pvmfsetopt.o: $(SDIR)/pvmfsetopt.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfsetopt.m4 > pvmfsetopt.c $(M4B1) $(SDIR)/pvmfsetopt.m4 $(RWBSPECIAL) >> pvmfsetopt.c $(M4B2) $(CC) $(CFLAGS) pvmfsetopt.c $(RM) pvmfsetopt.c pvmfsetrbuf.o: $(SDIR)/pvmfsetrbuf.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfsetrbuf.m4 > pvmfsetrbuf.c $(M4B1) $(SDIR)/pvmfsetrbuf.m4 $(RWBSPECIAL) >> pvmfsetrbuf.c $(M4B2) $(CC) $(CFLAGS) pvmfsetrbuf.c $(RM) pvmfsetrbuf.c pvmfsetsbuf.o: $(SDIR)/pvmfsetsbuf.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfsetsbuf.m4 > pvmfsetsbuf.c $(M4B1) $(SDIR)/pvmfsetsbuf.m4 $(RWBSPECIAL) >> pvmfsetsbuf.c $(M4B2) $(CC) $(CFLAGS) pvmfsetsbuf.c $(RM) pvmfsetsbuf.c pvmfsiblings.o: $(SDIR)/pvmfsiblings.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfsiblings.m4 > pvmfsiblings.c $(M4B1) $(SDIR)/pvmfsiblings.m4 $(RWBSPECIAL) >> pvmfsiblings.c $(M4B2) $(CC) $(CFLAGS) pvmfsiblings.c $(RM) pvmfsiblings.c pvmfsleep.o: $(SDIR)/pvmfsleep.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfsleep.m4 > pvmfsleep.c $(M4B1) $(SDIR)/pvmfsleep.m4 $(RWBSPECIAL) >> pvmfsleep.c $(M4B2) $(CC) $(CFLAGS) pvmfsleep.c $(RM) pvmfsleep.c pvmfspawn.o: $(SDIR)/pvmfspawn.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfspawn.m4 > pvmfspawn.c $(M4B1) $(SDIR)/pvmfspawn.m4 $(RWBSPECIAL) >> pvmfspawn.c $(M4B2) $(CC) $(CFLAGS) pvmfspawn.c $(RM) pvmfspawn.c pvmfstartpvmd.o: $(SDIR)/pvmfstartpvmd.m4 $(M4FILE) $(PVMHEADERS) $(PVMALLOCH) $(M4A) $(SDIR)/pvmfstartpvmd.m4 > pvmfstartpvmd.c $(M4B1) $(SDIR)/pvmfstartpvmd.m4 $(RWBSPECIAL) >> pvmfstartpvmd.c $(M4B2) $(CC) $(CFLAGS) pvmfstartpvmd.c $(RM) pvmfstartpvmd.c pvmftasks.o: $(SDIR)/pvmftasks.m4 $(M4FILE) $(PVMBFHEADERS) $(M4A) $(SDIR)/pvmftasks.m4 > pvmftasks.c $(M4B1) $(SDIR)/pvmftasks.m4 $(RWBSPECIAL) >> pvmftasks.c $(M4B2) $(CC) $(CFLAGS) pvmftasks.c $(RM) pvmftasks.c pvmftidtoh.o: $(SDIR)/pvmftidtoh.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmftidtoh.m4 > pvmftidtoh.c $(M4B1) $(SDIR)/pvmftidtoh.m4 $(RWBSPECIAL) >> pvmftidtoh.c $(M4B2) $(CC) $(CFLAGS) pvmftidtoh.c $(RM) pvmftidtoh.c pvmftrecv.o: $(SDIR)/pvmftrecv.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmftrecv.m4 > pvmftrecv.c $(M4B1) $(SDIR)/pvmftrecv.m4 $(RWBSPECIAL) >> pvmftrecv.c $(M4B2) $(CC) $(CFLAGS) pvmftrecv.c $(RM) pvmftrecv.c pvmfunpack.o: $(SDIR)/pvmfunpack.m4 $(M4FILE) $(PVMHEADERS) $(M4A) $(SDIR)/pvmfunpack.m4 > pvmfunpack.c $(M4B1) $(SDIR)/pvmfunpack.m4 $(RWBSPECIAL) >> pvmfunpack.c $(M4B2) $(CC) $(CFLAGS) pvmfunpack.c $(RM) pvmfunpack.c ./pvm3/libfpvm/pvmfarchcode.m40000644007401100740110000000071206225226276015127 0ustar kohlkohl /* $Id: pvmfarchcode.m4,v 1.2 1996/10/04 15:26:54 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfarchcode) ARGS(`STRING_ARG(arch), code') STRING_ARG_DECL(arch); int *code; { char tarch[MAX_HOST_NAME + 1]; /* * Copy the arch name to make sure there's * a NUL at the end. */ if (ftocstr(tarch, sizeof(tarch), STRING_PTR(arch), STRING_LEN(arch))) { *code = PvmBadParam; return; } *code = pvm_archcode(tarch); } ./pvm3/libfpvm/pvmfmstat.m40000644007401100740110000000070506225226327014506 0ustar kohlkohl /* $Id: pvmfmstat.m4,v 1.2 1996/10/04 15:27:19 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfmstat) ARGS(`STRING_ARG(host), mstat') STRING_ARG_DECL(host); int *mstat; { char thost[MAX_HOST_NAME + 1]; /* * Copy the host name to make sure there's * a NUL at the end. */ if (ftocstr(thost, sizeof(thost), STRING_PTR(host), STRING_LEN(host))) { *mstat = PvmBadParam; return; } *mstat = pvm_mstat(thost); } ./pvm3/libfpvm/pvmfprobe.m40000644007401100740110000000034106225226340014454 0ustar kohlkohl /* $Id: pvmfprobe.m4,v 1.2 1996/10/04 15:27:28 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfprobe) ARGS(`tid, msgtag, info') int *tid, *msgtag, *info; { *info = pvm_probe(*tid, *msgtag); } ./pvm3/libfpvm/pvmfhalt.m40000644007401100740110000000026606225226317014307 0ustar kohlkohl /* $Id: pvmfhalt.m4,v 1.2 1996/10/04 15:27:11 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfhalt) ARGS(`info') int *info; { *info = pvm_halt(); } ./pvm3/libfpvm/pvmfrecv.m40000644007401100740110000000033606225226343014313 0ustar kohlkohl /* $Id: pvmfrecv.m4,v 1.2 1996/10/04 15:27:31 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfrecv) ARGS(`tid, msgtag, info') int *tid, *msgtag, *info; { *info = pvm_recv(*tid, *msgtag); } ./pvm3/libfpvm/pvmftidtoh.m40000644007401100740110000000032306225226357014650 0ustar kohlkohl /* $Id: pvmftidtoh.m4,v 1.2 1996/10/04 15:27:43 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmftidtohost) ARGS(`tid, dtid') int *dtid, *tid; { *dtid = pvm_tidtohost(*tid); } ./pvm3/libfpvm/pvmfnrecv.m40000644007401100740110000000034106225226333014464 0ustar kohlkohl /* $Id: pvmfnrecv.m4,v 1.2 1996/10/04 15:27:23 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfnrecv) ARGS(`tid, msgtag, info') int *tid, *msgtag, *info; { *info = pvm_nrecv(*tid, *msgtag); } ./pvm3/libfpvm/pvmflvgrp.m40000644007401100740110000000071406225226324014505 0ustar kohlkohl /* $Id: pvmflvgrp.m4,v 1.2 1996/10/04 15:27:16 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmflvgroup) ARGS(`STRING_ARG(group), info') STRING_ARG_DECL(group); int *info; { char tgroup[MAX_GRP_NAME + 1]; /* * Copy the group name to make sure there's * a NUL at the end. */ if (ftocstr(tgroup, sizeof(tgroup), STRING_PTR(group), STRING_LEN(group))){ *info = PvmBadParam; return; } *info = pvm_lvgroup(tgroup); } ./pvm3/libfpvm/pvmfgetinfo.m40000644007401100740110000000326006334353010014777 0ustar kohlkohl /* $Id: pvmfgetinfo.m4,v 1.4 1997/05/08 13:32:56 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfgetmboxinfo) ARGS(`STRING_ARG(pattern), STRING_ARG(name), nclassesp, nentriesp, indexp, ownerp, flagp, infop') STRING_ARG_DECL(pattern); STRING_ARG_DECL(name); int *nclassesp, *nentriesp, *indexp, *ownerp, *flagp, *infop; { static struct pvmmboxinfo *classes = (struct pvmmboxinfo *) 0; static int nclasses = 0; static int next = 0; char tpattern[MAX_MBOX_NAME + 1]; int nc; int cc; int i; /* if user sets nclassesp to -1 then pvmfgetmboxinfo() will be reset */ if ( nclasses && nclassesp && (*nclassesp == -1) ) nclasses = 0; if ( !nclasses ) { /* * Copy the pattern to make sure there is * a NUL at the end. */ if ( ftocstr( tpattern, sizeof(tpattern), STRING_PTR(pattern), STRING_LEN(pattern) ) ) { *infop = PvmBadParam; return; } if ( (cc = pvm_getmboxinfo( tpattern, &nc, &classes )) < 0 ) { *infop = cc; return; } nclasses = nc; next = 0; if ( !nclasses ) *infop = PvmNotFound; } if ( next < nclasses ) { if ( STRING_PTR(name) ) ctofstr( STRING_PTR(name), STRING_LEN(name), classes[ next ].mi_name ); if ( nentriesp ) *nentriesp = classes[ next ].mi_nentries; if ( indexp ) { for ( i=0 ; i < classes[ next ].mi_nentries ; i++ ) indexp[i] = classes[ next ].mi_indices[i]; } if ( ownerp ) { for ( i=0 ; i < classes[ next ].mi_nentries ; i++ ) ownerp[i] = classes[ next ].mi_owners[i]; } if ( flagp ) { for ( i=0 ; i < classes[ next ].mi_nentries ; i++ ) flagp[i] = classes[ next ].mi_flags[i]; } } if ( next == nclasses ) nclasses = 0; } ./pvm3/libfpvm/pvmfpsend.m40000644007401100740110000000042706225226341014464 0ustar kohlkohl /* $Id: pvmfpsend.m4,v 1.2 1996/10/04 15:27:29 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfpsend) ARGS(`tid, msgtag, buf, len, dt, info') int *tid, *msgtag, *len, *dt, *info; char *buf; { *info = pvm_psend(*tid, *msgtag, buf, *len, *dt); } ./pvm3/libfpvm/pvmfbufinfo.m40000644007401100740110000000040006225226301014766 0ustar kohlkohl /* $Id: pvmfbufinfo.m4,v 1.2 1996/10/04 15:26:57 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfbufinfo) ARGS(`mid, len, type, tid, info') int *mid, *len, *type, *tid, *info; { *info = pvm_bufinfo(*mid, len, type, tid); } ./pvm3/libfpvm/pvmfpack.m40000644007401100740110000000167107024215212014264 0ustar kohlkohl /* $Id: pvmfpack.m4,v 1.3 1999/12/10 15:21:46 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfpack) ARGS(`what, vp, cnt, std, info') int *what, *cnt, *std, *info; #ifdef __STDC__ void *vp; #else char *vp; #endif { switch( *what ) { case BYTE1: *info = pvm_pkbyte((char*)vp, *cnt, *std); break; case INTEGER2: *info = pvm_pkshort((short*)vp, *cnt, *std); break; case INTEGER4: *info = pvm_pkint((int*)vp, *cnt, *std); break; case INTEGER8: *info = pvm_pklong((long*)vp, *cnt, *std); break; case REAL4: *info = pvm_pkfloat((float*)vp, *cnt, *std); break; case COMPLEX8: *info = pvm_pkcplx((float*)vp, *cnt, *std); break; case REAL8: *info = pvm_pkdouble((double*)vp, *cnt, *std); break; case COMPLEX16: *info = pvm_pkdcplx((double*)vp, *cnt, *std); break; case STRING: *info = pvm_pkbyte((char*)vp, *cnt, *std); break; default: *info = PvmBadParam; break; } } ./pvm3/libfpvm/pvmfkill.m40000644007401100740110000000030406225226323014300 0ustar kohlkohl /* $Id: pvmfkill.m4,v 1.2 1996/10/04 15:27:15 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfkill) ARGS(`tid, info') int *tid, *info; { *info = pvm_kill(*tid); } ./pvm3/libfpvm/pvmfaddmhf.m40000644007401100740110000000074606365413377014616 0ustar kohlkohl /* $Id: pvmfaddmhf.m4,v 1.5 1997/07/23 14:36:47 pvmsrc Exp $ */ #include "pvm3.h" #include "pvm_consts.h" void FUNCTION(pvmfaddmhf) ARGS(`src, tag, ctx, mid, foo, info') #if defined(IMA_UXPM) || defined(IMA_UXPV) int (**foo)(); /* correction for Fujitsu FORTRAN77 EX */ #else int (*foo)(); #endif int *src, *tag, *ctx, *mid, *info; { #if defined(IMA_UXPM) || defined(IMA_UXPV) *info = pvm_addmhf(*src, *tag, *ctx, *foo); #else *info = pvm_addmhf(*src, *tag, *ctx, foo); #endif } ./pvm3/libfpvm/pvmfperror.m40000644007401100740110000000210110611773764014665 0ustar kohlkohl /* $Id: pvmfperror.m4,v 1.3 2007/04/19 23:15:00 pvmsrc Exp $ */ #include #include #include "pvm3.h" #include "pvm_consts.h" #ifdef SYSVSTR #include #else #include #endif #define MAX(a,b) ((a) > (b) ? (a) : (b)) void FUNCTION(pvmfperror) ARGS(`STRING_ARG(p), info') STRING_ARG_DECL(p); int *info; { static char *buf = 0; static int buflen = 0; /* * Have to have a NUL at the end of the string, and * the only way to do this portably is to copy the whole string * into a malloc'ed buffer. We keep the buffer around for * future use rather than free'ing it each time we're done. */ if (!buf) buf = malloc(buflen = STRING_LEN(p) + 1); else if (STRING_LEN(p) + 1 > buflen) { buflen = MAX(STRING_LEN(p) + 1, buflen * 2); /* don't use realloc; it might cause old data to be copied */ free(buf); buf = malloc(buflen); } if (!buf) { fprintf(stderr, "pvmfperror PvmNoMem"); *info = PvmNoMem; return; } strncpy(buf, STRING_PTR(p), STRING_LEN(p)); buf[STRING_LEN(p)] = '\0'; *info = pvm_perror(buf); } ./pvm3/conf/0000755007401100740110000000000011141631057011500 5ustar kohlkohl./pvm3/conf/CRAY2.def0000644007401100740110000000023306604766722013016 0ustar kohlkohlARCHCFLAGS = -DSYSVSIGNAL -DNOWAIT3 -DRSHCOMMAND=\"/usr/ucb/remsh\" ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = f AR = ar PVM_ARCH = CRAY2 MAKE = make ./pvm3/conf/AIX4SP2.def0000644007401100740110000000040007240566201013207 0ustar kohlkohlARCHCFLAGS = -DSOCKLENISUINT -DSYSVSIGNAL -DNOUNIXDOM -DNEEDSSELECTH ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t PVM_ARCH = AIX4SP2 AR_FRONT = ar AR_NODE = ar AR = ar CC = cc NODECC = mpcc NEEDF2M4 = t FORTRAN = f77 NODEFORT = mpxlf MAKE = make ./pvm3/conf/NETBSDHP300.m40000644007401100740110000000122206221570165013376 0ustar kohlkohldivert(-1) undefine(`len') # # FORTRAN function names are in upper case # define(`FUNCTION',`translit($1,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ)') # # FORTRAN character strings are passed as follows: # XXX is this right? # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/win32cygwin.def0000644007401100740110000000133310135243024014336 0ustar kohlkohl#*****************************************************************************# # # Definitions # for cygwin.mak files # #*****************************************************************************# PVM_ARCH = CYGWIN LINK_FLAGS = LINK_MULTITHREAD = ARCHCFLAGS = -DCYGWIN -DHASSTDLIB -DSYSVBFUNC -DNOTMPNAM \ -DSYSVSTR -DNOGETDTBLSIZ -DNOUNIXDOM -DNOREXEC -DFDSETNOTSTRUCT \ -DNEEDSFFS -DSTDC_HEADERS -DRSHCOMMAND=\"rsh\" \ -DNO_NETINET_TCP_H -DUSESTRERROR -DSYSVSIGNAL -DNOWAIT3 # if available -DHASREADLINE LIB = $(PVM_ROOT_U)/lib/$(PVM_ARCH)/libpvm3.a GLIB = $(PVM_ROOT_U)/lib/$(PVM_ARCH)/libgpvm3.a CFLAGS = -c $(ARCHCFLAGS) -I$(PVM_ROOT_U)/include -I$(PVM_ROOT_U)/src \ -I$(PVM_ROOT_U)/tracer CDEBUG = -g -O ./pvm3/conf/TITN.m40000644007401100740110000000102006221570227012515 0ustar kohlkohldivert(-1) undefine(`len') # # FORTRAN function names are in upper case # define(`FUNCTION',`translit($1,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ)') # # The Titan uses a special string descriptor to pass strings in FORTRAN. # The descriptor is passed by reference. # divert(0) typedef struct { char *ptr; int length; } FSD; divert(-1) define(`STRING_ARG',`$1_fsd') define(`STRING_ARG_DECL',`FSD * $1_fsd') define(`STRING_LEN',`($1_fsd)->length') define(`STRING_PTR',`($1_fsd)->ptr') define(`ARGS',`($1)') divert(0) ./pvm3/conf/NETBSDHP300.def0000644007401100740110000000041707052611774013626 0ustar kohlkohl# Warning: Now Subsumed By NETBSDM68K arch. ARCHCFLAGS = -DSOCKADHASLEN -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DHASERRORVARS -DNOREXEC -DNEEDMENDIAN -DSYSERRISCONST ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = NETBSDHP300 MAKE = make #MAKE = gmake ./pvm3/conf/DARWIN.def0000644007401100740110000000057010106413556013150 0ustar kohlkohlARCHCFLAGS = -DSOCKADHASLEN -DNOREXEC \ -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DHASSTDLIB -DNEEDMENDIAN -DHASERRORVARS \ -DFAKEXDRFLOAT -DSYSERRISCONST \ -I/usr/include/malloc \ -I/System/Library/Frameworks/System.framework/Headers/bsd/sys # this last -I flag needed for tracer build... ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = DARWIN MAKE = make ./pvm3/conf/PGON.m40000644007401100740110000000110206221570177012507 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/CYGWIN.m40000644007401100740110000000110207052615441012741 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/SUN4SOL2.m40000644007401100740110000000110206221570222013124 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/UWARE.m40000644007401100740110000000121006300703533012617 0ustar kohlkohldivert(-1) undefine(`len') # # FORTRAN function names are in upper case # define(`FUNCTION',`translit($1,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ)') # # FORTRAN character strings are passed as follows: # XXX is this right? # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr, $1_len') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/NETBSDSPARC64.def0000644007401100740110000000034507052612213014103 0ustar kohlkohlARCHCFLAGS = -DSOCKADHASLEN -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DHASERRORVARS -DNOREXEC -DNEEDMENDIAN -DSYSERRISCONST ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = NETBSDSPARC64 MAKE = make #MAKE = gmake ./pvm3/conf/NETBSDNS32K.m40000644007401100740110000000110207052612150013433 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/CSPP.m40000644007401100740110000000143606221570142012513 0ustar kohlkohldivert(-1) undefine(`len') # # This generates two copies of each libfpvm function, one with # a trailing underscore and one without, so the resulting libfpvm # works whether or not you use -qextname. # For more comments, see the HPPA m4 file. define(`FUNCTION',ifdef(`USCORYES',`$1_',`$1')) #define(`FUNCTION',`$1') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/SUN3.def0000644007401100740110000000015306604767013012721 0ustar kohlkohlARCHCFLAGS = -f68881 ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = SUN3 MAKE = make ./pvm3/conf/BAL.m40000644007401100740110000000110206221570124012332 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/LINUX.m40000644007401100740110000000110206221570156012640 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/IPSC2.def0000644007401100740110000000032406604766743013022 0ustar kohlkohlARCHCFLAGS = -DSYSVSIGNAL -DNOWAIT3 -DNOWAITPID -DSYSVSTR \ -DRSHCOMMAND=\"/usr/ucb/rcmd\" -DNOUNIXDOM ARCHDLIB = -lsocket ARCHDOBJ = ARCHLIB = -lsocket HASRANLIB = f AR = ar PVM_ARCH = IPSC2 MAKE = make ./pvm3/conf/RS6K.m40000644007401100740110000000143606221570201012467 0ustar kohlkohldivert(-1) undefine(`len') # # This generates two copies of each libfpvm function, one with # a trailing underscore and one without, so the resulting libfpvm # works whether or not you use -qextname. # For more comments, see the HPPA m4 file. define(`FUNCTION',ifdef(`USCORYES',`$1_',`$1')) #define(`FUNCTION',`$1') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/SGI.def0000644007401100740110000000024306604767000012607 0ustar kohlkohlARCHCFLAGS = -DSYSVSIGNAL -DRSHCOMMAND=\"/usr/bsd/rsh\" -DNOWAIT3 ARCHDLIB = -lsun ARCHDOBJ = ARCHLIB = -lsun HASRANLIB = f AR = ar PVM_ARCH = SGI MAKE = make ./pvm3/conf/SX3.m40000644007401100740110000000114406221570224012360 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`INT_ARG_DECL',`int * $1') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/HPPAMP.def0000644007401100740110000000124007004131154013136 0ustar kohlkohl# --------------------- Build with HP C ------------------- #CC = /opt/ansic/bin/cc #C_OPT = -U_REENTRANT +DA1.1 +DS1.1 -Wl,+tm,hpux #F77 = /opt/fortran/bin/f77 #AS = /usr/ccs/bin/as # --------------------- Standard Stuff --------------------------------- ARCHCFLAGS = -DSHMEM -DSYSVSIGNAL -DNOWAIT3 -DNOGETDTBLSIZ \ -DRSHCOMMAND=\"/usr/bin/remsh\" -DNOUNIXDOM \ -DCLUMP_ALLOC -DHASSTDLIB -DFDSETISINT # remove -DFDSETISINT above for HP-UX 11.0...? ARCHDLIB = # ARCHDLIB = -lnsl # for HP-UX 11.0 ARCHDOBJ = # ARCHLIB = -lnsl # for HP-UX 11.0 HASRANLIB = f PVM_ARCH = HPPAMP #AR = /usr/bin/ar AR = ar FC = fort77 NEEDF2M4 = t AMEMOBJ = amem.o MAKE = make ./pvm3/conf/SUN3.m40000644007401100740110000000110206221570217012467 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/AIX4MP.def0000644007401100740110000000036306604766702013142 0ustar kohlkohlARCHCFLAGS = -DSOCKLENISUINT -DSYSVSIGNAL -DNOUNIXDOM -D_BSD \ -DRSHCOMMAND=\"/usr/bin/rsh\" -DNEEDSSELECTH -DSHMEM ARCHDLIB = -lbsd -lpthreads ARCHDOBJ = ARCHLIB = -lbsd -lpthreads HASRANLIB = t PVM_ARCH = AIX4MP AR = ar MAKE = make ./pvm3/conf/UTS2.def0000644007401100740110000000030506604767026012731 0ustar kohlkohlARCHCFLAGS = -eft -DSYSVSTR -DNOUNIXDOM -DNET_IF_IN_SYS ARCHDLIB = -lnsl -lsocket -lbsd -lrpc ARCHLIB = -lnsl -lsocket -lbsd -lrpc ARCHDOBJS = AR = ar HASRANLIB = f PVM_ARCH = UTS2 MAKE = make ./pvm3/conf/NETBSDPOWERPC.m40000644007401100740110000000110207052612151013753 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/AIX56K.def0000644007401100740110000000033510001307371013061 0ustar kohlkohlARCHCFLAGS = -DSOCKLENISUINT -DSYSVSIGNAL \ -DRSHCOMMAND=\"/usr/bin/rsh\" -DSOCKADHASLEN \ -DNEEDSSELECTH ARCHDLIB = -lbsd ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = AIX56K NEEDF2M4 = t MAKE = make ./pvm3/conf/NETBSDM68K.def0000644007401100740110000000034207052612132013543 0ustar kohlkohlARCHCFLAGS = -DSOCKADHASLEN -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DHASERRORVARS -DNOREXEC -DNEEDMENDIAN -DSYSERRISCONST ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = NETBSDM68K MAKE = make #MAKE = gmake ./pvm3/conf/MASPAR.def0000644007401100740110000000014506604766757013173 0ustar kohlkohlARCHCFLAGS = ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = MASPAR MAKE = make ./pvm3/conf/SGIMP.def0000644007401100740110000000026506604767010013051 0ustar kohlkohlARCHCFLAGS = -DSYSVSIGNAL -DRSHCOMMAND=\"/usr/bsd/rsh\" -DNOUNIXDOM \ -DSHMEM ARCHDLIB = -lsun ARCHDOBJ = ARCHLIB = -lsun HASRANLIB = f AR = ar PVM_ARCH = SGIMP MAKE = make ./pvm3/conf/CSPP.def0000644007401100740110000000367706604766723012763 0ustar kohlkohl# NOTES: # # 1 - When building with the HP compilers or GNU compilers, make sure # that /bin appears in the PATH environment varaible before the # Convex compilers or loader (e.g. /usr/convex/bin). Otherwise # the Convex compiler will be used and an incompatible crt0.o # will be used to link the executables, resulting in unresolved # symbols. # # 2 - When building with the Convex compilers be sure that # /usr/convex/bin appears before /bin in the PATH environment # variable. # # 3 - When compiling on an HP workstation for an Exemplar target using # the Convex compilers, use the '-Wl,+tmspp1' flag to tell the # compiler to use the Exemplar instruction set. The HP # workstation being used for the build will also require # /lib/libcnx_syscall.a and /lib/libail.sl files to be installed # from an Exemplar. # # 4 - When building libraries with the Convex C compiler that must be # compatible with GNU C and HP C objects, compile with the # -U_REENTRANT flag. This turns off the multi-threading of # 'errno'. # # # --------------------- Build with GNU C ----------------------- #CC = gcc -g #F77 = fort77 #FFLAGS = -g # --------------------- Build with Convex C ------------------- #CC = /opt/ansic/bin/cc #C_OPT = -U_REENTRANT +DA1.1 +DS1.1 -Wl,+tm,hpux #F77 = /opt/fortran/bin/f77 #AS = /usr/ccs/bin/as # --------------------- Standard Stuff ------------------------------ ARCHCFLAGS = $(C_OPT) -DSHMEM -DSYSVSIGNAL -DNOWAIT3 -DNOGETDTBLSIZ \ -DRSHCOMMAND=\"/usr/bin/remsh\" -DNOUNIXDOM \ -DCLUMP_ALLOC -DHASSTDLIB -DSUBCOMPLEX_SUPPORT \ -DFDSETISINT -DBALANCED_SPAWN ARCHOBJ = -lcnx_syscall /lib/libail.sl ARCHDOBJ = ARCHDLIB = $(ARCHOBJ) ARCHLIB = $(ARCHLDFLAGS) $(ARCHOBJ) ARCHFLIB = $(ARCHLDFFLAGS) $(ARCHOBJ) HASRANLIB = f LD = $(CC) PVM_ARCH = CSPP #AR = /usr/bin/ar AR = ar LOPT = -Wl,-aarchive NEEDF2M4 = t AMEMOBJ = amem.o MAKE = make ./pvm3/conf/NETBSDMAC68K.m40000644007401100740110000000122206221570170013531 0ustar kohlkohldivert(-1) undefine(`len') # # FORTRAN function names are in upper case # define(`FUNCTION',`translit($1,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ)') # # FORTRAN character strings are passed as follows: # XXX is this right? # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/BEOSCYLD.m40000644007401100740110000000110207354714345013155 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/AIX46K.m40000644007401100740110000000143606233733703012663 0ustar kohlkohldivert(-1) undefine(`len') # # This generates two copies of each libfpvm function, one with # a trailing underscore and one without, so the resulting libfpvm # works whether or not you use -qextname. # For more comments, see the HPPA m4 file. define(`FUNCTION',ifdef(`USCORYES',`$1_',`$1')) #define(`FUNCTION',`$1') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/BFLY.def0000644007401100740110000000015706604766707012742 0ustar kohlkohlARCHCFLAGS = -DNOUNIXDOM ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = BFLY MAKE = make ./pvm3/conf/HPPAMP.m40000644007401100740110000000244506221570150012733 0ustar kohlkohldivert(-1) undefine(`len') # # the HP Snake does nothing special to FORTRAN function names # # The preceding statement is not QUITE true.... If one invokes # certain options for the HP compiler, THEN subprogram names take # on the form.... "abcedf_" as opposed to "abcdef" as stated above. # There seems to be no clean solution. MY answer is to create TWO # separate libaries, one WITH underscores in the names and one WITHOUT. # Each routinme is compiled twice, once with an underscore in the # routine name and once without. Thus, each ".o" file actually # contains two routines. The resulting library lets the loader # pick and choose whichever the perverted HP system wants at THAT # particular time..... -RWB 1/5/93 define(`FUNCTION',ifdef(`USCORYES',`$1_',`$1')) #define(`FUNCTION',`$1') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/CNVX.def0000644007401100740110000000021406604766720012751 0ustar kohlkohlARCHCFLAGS = -no -fi -DNOUNIXDOM ARCHFFLAGS = -no -fi ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = CNVX MAKE = make ./pvm3/conf/SGIMP6.m40000644007401100740110000000110206372172221012704 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/AIX56K.m40000644007401100740110000000143610001307371012646 0ustar kohlkohldivert(-1) undefine(`len') # # This generates two copies of each libfpvm function, one with # a trailing underscore and one without, so the resulting libfpvm # works whether or not you use -qextname. # For more comments, see the HPPA m4 file. define(`FUNCTION',ifdef(`USCORYES',`$1_',`$1')) #define(`FUNCTION',`$1') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/UXPV.def0000644007401100740110000000037506604767031013001 0ustar kohlkohlARCHCFLAGS = -DSYSVBFUNC -DSYSVSTR -DNOGETDTBLSIZ -DSYSVSIGNAL \ -DNOWAIT3 -DNOUNIXDOM -DRSHCOMMAND=\"/usr/bin/rsh\" ARCHDLIB = -lsocket -lnsl -Wl,-dy ARCHDOBJ = ARCHLIB = -lsocket -lnsl -Wl,-dy HASRANLIB = f AR = ar PVM_ARCH = UXPV MAKE = make ./pvm3/conf/PMAX.m40000644007401100740110000000110206221570200012474 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/NETBSDMIPSEB.m40000644007401100740110000000110207052612136013616 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/SYMM.def0000644007401100740110000000015606604767024012763 0ustar kohlkohlARCHCFLAGS = -DNOTMPNAM ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = SYMM MAKE = make ./pvm3/conf/SUN4.m40000644007401100740110000000110206221570220012462 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/SGI64.m40000644007401100740110000000110206221570211012525 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/LINUXHPPA.m40000644007401100740110000000110206463677153013326 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/PMAX.def0000644007401100740110000000014306604766775012753 0ustar kohlkohlARCHCFLAGS = ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = PMAX MAKE = make ./pvm3/conf/UXPM.m40000644007401100740110000000110206221570235012530 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/DGIX.m40000644007401100740110000000126306740730161012504 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') #define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG',`$1_ptr') #define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_ARG_DECL',`char * $1_ptr') #define(`STRING_LEN',`$1_len') define(`STRING_LEN',`strlen($1_ptr)') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/NETBSDSPARC.m40000644007401100740110000000110207052611775013517 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/SUNMP.m40000644007401100740110000000110206221570223012636 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/OS2.m40000644007401100740110000000110206401331673012343 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/LINUX.def0000644007401100740110000000220410723622116013056 0ustar kohlkohl# # Notes on readline Usage: # # If your Linux system has readline, then you may append the # following flags to the defines below: # # ARCHCFLAGS = . . . -DHASREADLINE # ARCHLIB = . . . -lreadline # # and recompile PVM. # # On some Linux systems, readline requires ncurses, so you # must also add "-lncurses" to the ARCHLIB define. # # For building shared libraries, swap the SHAREDCFLAGS define below # to use the -fpic (or -fPIC, usually equivalent) setting, # (be sure $(SHAREDCFLAGS) is included in $(ARCHCFLAGS) below) # and then do a "make clean ; make shared" in $PVM_ROOT. # # SHAREDCFLAGS = -fpic SHAREDCFLAGS = SHAREDLDFLAGS = -shared # ARCHCFLAGS = -DSYSVSIGNAL -DNOWAIT3 -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DNEEDENDIAN -DFDSETNOTSTRUCT -DHASERRORVARS \ -DCTIMEISTIMET -DSYSERRISCONST -DNOTMPNAM \ -DUSESTRERROR -DSYSVSTR -DHASSTDLIB -DSYSVBFUNC \ $(SHAREDCFLAGS) # # -DHASREADLINE # # For Absoft Fortran 95 Compiler: # ARCHFFLAGS = -B108 -YEXT_NAMES="LCS" # (submitted by Reggie Chang ) # ARCHDLIB = ARCHDOBJ = # ARCHLIB = -lreadline ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = LINUX MAKE = make ./pvm3/conf/DARWIN.m40000644007401100740110000000110207277034060012726 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/NEXT.def0000644007401100740110000000015706604766765012770 0ustar kohlkohlARCHCFLAGS = -DNOTMPNAM ARCHDLIB = ARCHDOBJS = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = NEXT MAKE = make ./pvm3/conf/AIX56K64.def0000644007401100740110000000047010001307370013232 0ustar kohlkohlARCHCFLAGS = -DSOCKLENISUINT -DSYSVSIGNAL \ -DRSHCOMMAND=\"/usr/bin/rsh\" -DSOCKADHASLEN \ -DNEEDSSELECTH \ -g -q64 -qmaxmem=-1 -qarch=pwr3 -DHASSTDLIB ARCHFFLAGS = -q64 ARCHDLIB = -lbsd ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar -X64 LOPT = -g -q64 PVM_ARCH = AIX56K64 NEEDF2M4 = t MAKE = make ./pvm3/conf/SUN4.def0000644007401100740110000000014306604767014012722 0ustar kohlkohlARCHCFLAGS = ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = SUN4 MAKE = make ./pvm3/conf/SYMM.m40000644007401100740110000000110206221570226012524 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/SGIMP.m40000644007401100740110000000110206221570213012612 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/SGI64.def0000644007401100740110000000034706604767010012767 0ustar kohlkohlARCHCFLAGS = -DSYSVSIGNAL -DRSHCOMMAND=\"/usr/bsd/rsh\" -DNOWAIT3 \ -64 -woff 1174 -DHASSTDLIB -DCTIMEISTIMET ARCHFFLAGS = -64 #ARCHDLIB = -lsun ARCHDOBJ = #ARCHLIB = -lsun AR = ar HASRANLIB = f PVM_ARCH = SGI64 MAKE = make ./pvm3/conf/U370.def0000644007401100740110000000014606604767026012635 0ustar kohlkohlARCHCFLAGS = -DNOUNIXDOM ARCHDLIBS = ARCHDOBJS = HASRANLIB = t AR = ar PVM_ARCH = U370 MAKE = make ./pvm3/conf/ATT.def0000644007401100740110000000046606604766705012637 0ustar kohlkohlARCHCFLAGS = -DHASSTDLIB -DNOUNIXDOM -DNOGETDTBLSIZ -DNOWAIT3 \ -DRSHCOMMAND=\"/usr/bin/remsh\" -DSYSVBFUNC \ -DSYSVSIGNAL -DSYSVSTR -DNEEDSENDIAN ARCHDLIB = -lnsl -lsocket -L/usr/ucblib -lucb ARCHDOBJ = ARCHLIB = -lnsl -lsocket -L/usr/ucblib -lucb HASRANLIB = f AR = ar PVM_ARCH = ATT MAKE = make ./pvm3/conf/CRAY.def0000644007401100740110000000023206604766721012732 0ustar kohlkohlARCHCFLAGS = -DSYSVSIGNAL -DNOWAIT3 -DRSHCOMMAND=\"/usr/ucb/remsh\" ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = f AR = ar PVM_ARCH = CRAY MAKE = make ./pvm3/conf/LINUXATARI.m40000644007401100740110000000110207171104623013416 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/DGAV.def0000644007401100740110000000030206604766724012716 0ustar kohlkohlARCHCFLAGS = -DNOSTRCASE -DSYSVSIGNAL -DNOWAIT3 -DSYSVSTR \ -DRSHCOMMAND=\"/usr/ucb/remsh\" -DNOUNIXDOM ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = f AR = ar PVM_ARCH = DGAV MAKE = make ./pvm3/conf/UVAX.def0000644007401100740110000000014306604767027012760 0ustar kohlkohlARCHCFLAGS = ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = UVAX MAKE = make ./pvm3/conf/APOLLO.def0000644007401100740110000000026106604766705013166 0ustar kohlkohlARCHCFLAGS = -DSYSVSIGNAL -DNOWAIT3 -DNOGETDTBLSIZ \ -DRSHCOMMAND=\"/usr/bin/remsh\" ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = f AR = ar PVM_ARCH = APOLLO MAKE = make ./pvm3/conf/NETBSDMAC68K.def0000644007401100740110000000042007052611774013757 0ustar kohlkohl# Warning: Now Subsumed By NETBSDM68K arch. ARCHCFLAGS = -DSOCKADHASLEN -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DHASERRORVARS -DNOREXEC -DNEEDMENDIAN -DSYSERRISCONST ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = NETBSDMAC68K MAKE = make #MAKE = gmake ./pvm3/conf/HPPA.def0000644007401100740110000000152607300024306012707 0ustar kohlkohl# --------------------- Build with HP C ------------------- #CC = /opt/ansic/bin/cc #C_OPT = -U_REENTRANT +DA1.1 +DS1.1 -Wl,+tm,hpux #F77 = /opt/fortran/bin/f77 #AS = /usr/ccs/bin/as # --------------------- Standard Stuff ------------------------ ARCHCFLAGS = -DSYSVSIGNAL -DNOWAIT3 -DNOGETDTBLSIZ \ -DRSHCOMMAND=\"/usr/bin/remsh\" -DFDSETISINT # remove -DFDSETISINT above for HP-UX 11.0...? # replace -DFDSETISINT with -DFDSETNOTSTRUCT for HP-UX 10.20... ARCHDLIB = # ARCHDLIB = -lnsl -ldld # for HP-UX 11.0 ARCHDOBJ = ARCHLIB = # ARCHLIB = -lnsl -ldld # for HP-UX 11.0 HASRANLIB = f PVM_ARCH = HPPA FC = fort77 #AR = /usr/bin/ar AR = ar LOPT = -Wl,-aarchive # LOPT = -Wl,-ashared # for HP-UX 11.0 # LOPT = -Wl,-adefault # alternate, for HP-UX 11.0 # LOPT = -Wl,-ashared_archive # for HP-UX B.11.00 A 9000/785 NEEDF2M4 = t MAKE = make ./pvm3/conf/LINUXHPPA.def0000644007401100740110000000112307354447044013541 0ustar kohlkohl# # Notes on readline Usage: # # If your Linux system has readline, then you may append the # following flags to the defines below: # # ARCHCFLAGS = . . . -DHASREADLINE # ARCHLIB = . . . -lreadline # # and recompile PVM. # # On some Linux systems, readline requires ncurses, so you # must also add "-lncurses" to the ARCHLIB define. # ARCHCFLAGS = -DSYSVSIGNAL -DNOWAIT3 -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DNEEDENDIAN -DFDSETNOTSTRUCT -DHASERRORVARS \ -DCTIMEISTIMET -DSYSERRISCONST -DNOTMPNAM ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = LINUXHPPA MAKE = make ./pvm3/conf/AIX5MP.def0000644007401100740110000000036310001307372013117 0ustar kohlkohlARCHCFLAGS = -DSOCKLENISUINT -DSYSVSIGNAL -DNOUNIXDOM -D_BSD \ -DRSHCOMMAND=\"/usr/bin/rsh\" -DNEEDSSELECTH -DSHMEM ARCHDLIB = -lbsd -lpthreads ARCHDOBJ = ARCHLIB = -lbsd -lpthreads HASRANLIB = t PVM_ARCH = AIX5MP AR = ar MAKE = make ./pvm3/conf/ALPHA.m40000644007401100740110000000110206221570120012555 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/BEOLIN.m40000644007401100740110000000110207053052665012715 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/ATT.m40000644007401100740110000000110206221570123012363 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/MACOSX.def0000644007401100740110000000030007277053522013155 0ustar kohlkohlARCHCFLAGS = -DHASERRORVARS -DSYSERRISCONST -DNOREXEC \ -DRSHCOMMAND=\"/usr/bin/rsh\" ARCHDLIB = ARCHDOBJS = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = MACOSX MAKE = make CC = cc ./pvm3/conf/SGIMP64.def0000644007401100740110000000037106604767012013223 0ustar kohlkohlARCHCFLAGS = -DSYSVSIGNAL -DRSHCOMMAND=\"/usr/bsd/rsh\" \ -DNOUNIXDOM -64 -woff 1174 -DHASSTDLIB -DSHMEM \ -DCTIMEISTIMET ARCHFFLAGS = -64 #ARCHDLIB = -lsun ARCHDOBJ = #ARCHLIB = -lsun HASRANLIB = f AR = ar PVM_ARCH = SGIMP64 MAKE = make ./pvm3/conf/NETBSDMIPSEL.m40000644007401100740110000000110207052612140013623 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/AFX8.def0000644007401100740110000000017306604766701012704 0ustar kohlkohlARCHCFLAGS = -DNOSTRCASE -DNOUNIXDOM ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t PVM_ARCH = AFX8 AR = ar MAKE = make ./pvm3/conf/LINUXARM.m40000644007401100740110000000110207051071753013201 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/AIX46K64.m40000644007401100740110000000143610001307370013016 0ustar kohlkohldivert(-1) undefine(`len') # # This generates two copies of each libfpvm function, one with # a trailing underscore and one without, so the resulting libfpvm # works whether or not you use -qextname. # For more comments, see the HPPA m4 file. define(`FUNCTION',ifdef(`USCORYES',`$1_',`$1')) #define(`FUNCTION',`$1') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/CNVXN.m40000644007401100740110000000110206221570134012631 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/CRAYSMP.def0000644007401100740110000000014606604766722013317 0ustar kohlkohlARCHCFLAGS = ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = CRAYSMP MAKE = make ./pvm3/conf/RT.def0000644007401100740110000000014106604766777012533 0ustar kohlkohlARCHCFLAGS = ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = RT MAKE = make ./pvm3/conf/NETBSDALPHA.m40000644007401100740110000000110207052612131013457 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/SGI5.def0000644007401100740110000000024406604767001012676 0ustar kohlkohlARCHCFLAGS = -DSYSVSIGNAL -DRSHCOMMAND=\"/usr/bsd/rsh\" -DNOWAIT3 ARCHDLIB = -lsun ARCHDOBJ = ARCHLIB = -lsun HASRANLIB = f AR = ar PVM_ARCH = SGI5 MAKE = make ./pvm3/conf/NETBSDI386.m40000644007401100740110000000110207052611774013277 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/PGON.def0000644007401100740110000000040106604766774012745 0ustar kohlkohlARCHCFLAGS = -DNOWAIT3 -DNOUNIXDOM ARCHDLIB = -lrpc -lnx ARCHDOBJ = ARCHLIB = -lrpc -lnx HASRANLIB = f PVM_ARCH = PGON AR_FRONT = ar860 AR_NODE = ar860 AR = ar860 CC = icc NODECC = icc FORTRAN = if77 NODEFORT = if77 PVMDEPPATH = PGON/ MAKE = make ./pvm3/conf/UVAX.m40000644007401100740110000000110206221570233012520 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/CRAY2.m40000644007401100740110000000045106221570137012566 0ustar kohlkohl#include undefine(`len') define(`FUNCTION',`translit($1,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ)') define(`STRING_ARG',`$1_fcd') define(`STRING_ARG_DECL',`_fcd $1_fcd') define(`STRING_LEN',`_fcdlen($1_fcd)') define(`STRING_PTR',`_fcdtocp($1_fcd)') define(`ARGS',`($1)') ./pvm3/conf/CRAY.m40000644007401100740110000000045106221570136012503 0ustar kohlkohl#include undefine(`len') define(`FUNCTION',`translit($1,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ)') define(`STRING_ARG',`$1_fcd') define(`STRING_ARG_DECL',`_fcd $1_fcd') define(`STRING_LEN',`_fcdlen($1_fcd)') define(`STRING_PTR',`_fcdtocp($1_fcd)') define(`ARGS',`($1)') ./pvm3/conf/UWARE.def0000644007401100740110000000050306604767030013052 0ustar kohlkohlARCHCFLAGS = -DSYSVBFUNC -DSYSVSTR -DNOGETDTBLSIZ \ -DSYSVSIGNAL -DNOWAIT3 -DNOUNIXDOM \ -DRSHCOMMAND=\"/bin/rsh\" \ -DHASSTDLIB -DNOREXEC -DNOWAIT3 -UNOWAITPID \ -DNOSTRCASE -USOCKADHASLEN ARCHDOBJ = ARCHDLIB = -lnsl -lsocket ARCHLIB = -lnsl -lsocket HASRANLIB = f AR = ar PVM_ARCH = UWARE MAKE = make ./pvm3/conf/NETBSDPMAX.def0000644007401100740110000000042007052611774013633 0ustar kohlkohl# Warning: Now Subsumed By NETBSDMIPSEL arch. ARCHCFLAGS = -DSOCKADHASLEN -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DHASERRORVARS -DNOREXEC -DNEEDMENDIAN -DSYSERRISCONST ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = NETBSDPMAX MAKE = make #MAKE = gmake ./pvm3/conf/HPPA.m40000644007401100740110000000244506221570146012503 0ustar kohlkohldivert(-1) undefine(`len') # # the HP Snake does nothing special to FORTRAN function names # # The preceding statement is not QUITE true.... If one invokes # certain options for the HP compiler, THEN subprogram names take # on the form.... "abcedf_" as opposed to "abcdef" as stated above. # There seems to be no clean solution. MY answer is to create TWO # separate libaries, one WITH underscores in the names and one WITHOUT. # Each routinme is compiled twice, once with an underscore in the # routine name and once without. Thus, each ".o" file actually # contains two routines. The resulting library lets the loader # pick and choose whichever the perverted HP system wants at THAT # particular time..... -RWB 1/5/93 define(`FUNCTION',ifdef(`USCORYES',`$1_',`$1')) #define(`FUNCTION',`$1') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/BSD386.def0000644007401100740110000000032206606706522013040 0ustar kohlkohlARCHCFLAGS = -DSOCKADHASLEN -DNOREXEC -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DHASSTDLIB -DNEEDMENDIAN -DHASERRORVARS ARCHDLIB = ARCHDOBJ = ARCHLIB = -lrpc HASRANLIB = t AR = ar PVM_ARCH = BSD386 MAKE = gmake ./pvm3/conf/RT.m40000644007401100740110000000110206221570204012260 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/NETBSDSH3.m40000644007401100740110000000110207052612213013230 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/CYGWIN.def0000644007401100740110000000077310135243023013161 0ustar kohlkohlARCHCFLAGS = -DCYGWIN -DHASSTDLIB -DSYSVSTR -DSYSVSIGNAL \ -DNOTMPNAM -DFDSETNOTSTRUCT -DNOUNIXDOM \ -DSTDC_HEADERS \ -DRSHCOMMAND=\"rsh\" -DNEEDSFFS -DSYSVBFUNC -DNOWAIT3 \ -DNOGETDTBLSIZ -DNOREXEC -DNO_NETINET_TCP_H \ -DUSESTRERROR -I/usr/include -I/usr/local/include # if available -DHASREADLINE ARCHDLIB = -L/usr/lib -L/usr/local/lib -lrpclib ARCHDOBJ = ARCHLIB = -L/usr/lib -L/usr/local/lib -lrpclib HASRANLIB = t AR = ar PVM_ARCH = CYGWIN MAKE = make EXESFX = .exe FC = g77 ./pvm3/conf/NETBSDALPHA.def0000644007401100740110000000034307052612130013702 0ustar kohlkohlARCHCFLAGS = -DSOCKADHASLEN -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DHASERRORVARS -DNOREXEC -DNEEDMENDIAN -DSYSERRISCONST ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = NETBSDALPHA MAKE = make #MAKE = gmake ./pvm3/conf/MIPS.def0000644007401100740110000000027506604766760012756 0ustar kohlkohlARCHCFLAGS = -I/usr/include/bsd -DSYSVSIGNAL -DNOWAIT3 ARCHDLIB = -lrpcsvc -lsun -lbsd -lgen ARCHDOBJ = ARCHLIB = -lrpcsvc -lsun -lbsd HASRANLIB = t AR = ar PVM_ARCH = MIPS MAKE = make ./pvm3/conf/SP2MPI.m40000644007401100740110000000143606221570216012722 0ustar kohlkohldivert(-1) undefine(`len') # # This generates two copies of each libfpvm function, one with # a trailing underscore and one without, so the resulting libfpvm # works whether or not you use -qextname. # For more comments, see the HPPA m4 file. define(`FUNCTION',ifdef(`USCORYES',`$1_',`$1')) #define(`FUNCTION',`$1') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/DGIX.def0000644007401100740110000000035006740730161012716 0ustar kohlkohlARCHCFLAGS = -DNOSTRCASE -DSYSVSIGNAL -DNOWAIT3 -DSYSVSTR \ -DRSHCOMMAND=\"/usr/bin/rsh\" -DNOUNIXDOM ARCHDLIB = -lnsl -lsocket ARCHDOBJ = ARCHLIB = -lnsl -lsocket HASRANLIB = f AR = ar PVM_ARCH = DGIX MAKE = make ./pvm3/conf/SGIMP6.def0000644007401100740110000000030106604767011013127 0ustar kohlkohlARCHCFLAGS = -n32 -DSYSVSIGNAL -DRSHCOMMAND=\"/usr/bsd/rsh\" \ -DNOUNIXDOM -DSHMEM ARCHFFLAGS = -n32 ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = f AR = ar PVM_ARCH = SGIMP6 MAKE = make ./pvm3/conf/AIX5MP.m40000644007401100740110000000143610001307372012703 0ustar kohlkohldivert(-1) undefine(`len') # # This generates two copies of each libfpvm function, one with # a trailing underscore and one without, so the resulting libfpvm # works whether or not you use -qextname. # For more comments, see the HPPA m4 file. define(`FUNCTION',ifdef(`USCORYES',`$1_',`$1')) #define(`FUNCTION',`$1') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/CRAYSMP.m40000644007401100740110000000110206221570140013050 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/LINUXSPARC.def0000644007401100740110000000110407354447044013660 0ustar kohlkohl# # Notes on readline Usage: # # If your Linux system has readline, then you may append the # following flags to the defines below: # # ARCHCFLAGS = . . . -DHASREADLINE # ARCHLIB = . . . -lreadline # # and recompile PVM. # # On some Linux systems, readline requires ncurses, so you # must also add "-lncurses" to the ARCHLIB define. # ARCHCFLAGS = -DSYSVSIGNAL -DNOWAIT3 -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DNEEDENDIAN -DCTIMEISTIMET -DFDSETNOTSTRUCT \ -DHASERRORVARS -DNOTMPNAM ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = LINUXSPARC MAKE = make ./pvm3/conf/UXPM.def0000644007401100740110000000035506604767030012765 0ustar kohlkohlARCHCFLAGS = -DSYSVBFUNC -DSYSVSTR -DNOGETDTBLSIZ -DSYSVSIGNAL \ -DNOWAIT3 -DNOUNIXDOM -DRSHCOMMAND=\"/usr/bin/rsh\" ARCHDLIB = -lsocket -lnsl ARCHDOBJ = ARCHLIB = -lsocket -lnsl HASRANLIB = f AR = ar PVM_ARCH = UXPM MAKE = make ./pvm3/conf/NETBSDSPARC64.m40000644007401100740110000000110207052612214013656 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/NEXT.m40000644007401100740110000000112106221570175012521 0ustar kohlkohldivert(-1) undefine(`len') # # do nothing special to FORTRAN function names # define(`FUNCTION',`$1') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # XXX I hope... # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/SGI6.m40000644007401100740110000000110206372172214012451 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/FREEBSD.m40000644007401100740110000000045306221570143013017 0ustar kohlkohldivert(-1) undefine(`len') define(`FUNCTION',`$1_') define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/NETBSDAMIGA.m40000644007401100740110000000122206221570163013460 0ustar kohlkohldivert(-1) undefine(`len') # # FORTRAN function names are in upper case # define(`FUNCTION',`translit($1,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ)') # # FORTRAN character strings are passed as follows: # XXX is this right? # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/win32watcom.def0000644007401100740110000000121006604767041014342 0ustar kohlkohl# # $Id: win32watcom.def,v 1.2 1998/10/01 21:03:29 pvmsrc Exp $ # cc = wcc386 -wcd=301 -wcd=202 fc = wfc386 -noreference conflags = OUT = -FO= OUTBIN = /fe= OUTLIB = -o = OUTDLL = -o= FORTRANLIB = linkexe = wcl386 linklib = wlib -b -n linkdll = wlib -b -n /bd FILE = file link_flags = SEPARATOR = " " BEGIN = { END = } link_multithread = conlibs = CFLAGS = -bt=nt !ifeq CFLAGS -zW CFLAGS += -i=$(%WATCOM)\h;$(%WATCOM)\h\win !else CFLAGS += -i=$(%WATCOM)\h;$(%WATCOM)\h\nt !endif CFLAGS += $(ARCHCFLAGS) -DWIN32 -DIMA_WIN32_WATCOM -i=..\include \ -i=..\src -i=..\tracer -oaxt -d2 -db -w4 -hw MAKE = make ./pvm3/conf/SGI6.def0000644007401100740110000000026506604767001012702 0ustar kohlkohlARCHCFLAGS = -n32 -DSYSVSIGNAL -DRSHCOMMAND=\"/usr/bsd/rsh\" \ -DNOWAIT3 ARCHFFLAGS = -n32 ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = f AR = ar PVM_ARCH = SGI6 MAKE = make ./pvm3/conf/HP300.def0000644007401100740110000000026006604766741012731 0ustar kohlkohlARCHCFLAGS = -DSYSVSIGNAL -DNOWAIT3 -DNOGETDTBLSIZ \ -DRSHCOMMAND=\"/usr/bin/remsh\" ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = f AR = ar PVM_ARCH = HP300 MAKE = make ./pvm3/conf/NETBSDARM32.def0000644007401100740110000000034307052612131013642 0ustar kohlkohlARCHCFLAGS = -DSOCKADHASLEN -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DHASERRORVARS -DNOREXEC -DNEEDMENDIAN -DSYSERRISCONST ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = NETBSDARM32 MAKE = make #MAKE = gmake ./pvm3/conf/ALPHA.def0000644007401100740110000000076407240075023013014 0ustar kohlkohl# # Note: The -DCTIMEISTIMET flag in the ARCHCFLAGS definition may not # be required on all Alpha systems... # # Similarly, to fix an XDR bug on some Alpha systems, add the # -DUSE_XDR_LONGLONG flag to ARCHCFLAGS... # ARCHCFLAGS = -DHASSTDLIB -DCTIMEISTIMET #ARCHCFLAGS = -DHASSTDLIB -DCTIMEISTIMET -DUSE_XDR_LONGLONG ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t PVM_ARCH = ALPHA AR = ar # PVMDEPPATH Not Needed on *All* DEC Alpha Systems #PVMDEPPATH = PVMDEPPATH = ALPHA/ MAKE = make ./pvm3/conf/win32visual.def0000644007401100740110000000537706672276506014403 0ustar kohlkohl# # $Id: win32visual.def,v 1.4 1999/03/12 20:47:02 pvmsrc Exp $ # ####################################################### # For Alpha ####################################################### !if "$(PROCESSOR_ARCHITECTURE)" == "ALPHA" cc = cl.exe fc = f77.exe conflags = /MACHINE:ALPHA /NOLOGO ####################################################### # For Intel ####################################################### !else cc = cl.exe fc = df.exe conflags = /MACHINE:IX86 /NOLOGO !endif OUT = /Fo OUTBIN = -out: OUTLIB = -out: OUTDLL = -out: MAKE = nmake EXESFX = .exe linkexe = link linklib = link -lib linkdll = link -dll link_flags = $(PVM_CLIBDIR)\wsock32.lib \ $(PVM_CLIBDIR)\kernel32.lib\ $(PVM_CLIBDIR)\libc.lib \ $(PVM_CLIBDIR)\gdi32.lib \ $(PVM_CLIBDIR)\winspool.lib \ $(PVM_CLIBDIR)\comdlg32.lib \ $(PVM_CLIBDIR)\advapi32.lib \ $(PVM_CLIBDIR)\shell32.lib \ $(PVM_CLIBDIR)\ole32.lib \ $(PVM_CLIBDIR)\oleaut32.lib \ $(PVM_CLIBDIR)\uuid.lib \ $(PVM_CLIBDIR)\oldnames.lib \ /nodefaultlib:"LIBCMT.LIB" fl32_link = $(PVM_CLIBDIR)\wsock32.lib \ $(PVM_CLIBDIR)\kernel32.lib \ $(PVM_CLIBDIR)\gdi32.lib \ $(PVM_CLIBDIR)\winspool.lib \ $(PVM_CLIBDIR)\comdlg32.lib \ $(PVM_CLIBDIR)\advapi32.lib \ $(PVM_CLIBDIR)\shell32.lib \ $(PVM_CLIBDIR)\ole32.lib \ $(PVM_CLIBDIR)\oleaut32.lib \ $(PVM_CLIBDIR)\uuid.lib \ $(PVM_CLIBDIR)\oldnames.lib link_multithread = $(PVM_CLIBDIR)\wsock32.lib \ $(PVM_CLIBDIR)\kernel32.lib \ $(PVM_CLIBDIR)\libcmt.lib \ $(PVM_CLIBDIR)\gdi32.lib \ $(PVM_CLIBDIR)\winspool.lib \ $(PVM_CLIBDIR)\comdlg32.lib \ $(PVM_CLIBDIR)\advapi32.lib \ $(PVM_CLIBDIR)\shell32.lib \ $(PVM_CLIBDIR)\ole32.lib \ $(PVM_CLIBDIR)\oleaut32.lib \ $(PVM_CLIBDIR)\uuid.lib \ $(PVM_CLIBDIR)\oldnames.lib \ $(PVM_CLIBDIR)\libcpmt.lib conlibs = $(libc) ######################################################## # Optimized Code ######################################################## cflags = /c /WX $(ARCHCFLAGS) /nologo /GX /O2 /D "NDEBUG" \ /D "_CONSOLE" -I$(PVM_CINCLUDE) -I$(PVM_ROOT)\include \ -I$(PVM_ROOT)\tracer -I$(PVM_ROOT)\src fflags = /c $(ARCHCFLAGS) /nologo /D "NDEBUG" /D "_CONSOLE" \ -I $(PVM_CINCLUDE) -I $(PVM_ROOT)\include \ -I $(PVM_ROOT)\src ######################################################## # Debugging mode ######################################################## #cflags = /c /W2 $(ARCHCFLAGS) /nologo /MTd /Gm /GX /Zi /Od /D \ # "_DEBUG" /D "_CONSOLE" \ # -I$(PVM_CINCLUDE) -I$(PVM_ROOT)\include \ # -I$(PVM_ROOT)\tracer -I$(PVM_ROOT)\src ######################################################## libpvm3dll = libpvm3.dll libgpvm3dll = libgpvm3.dll pvmd3exe = visual_pvmd3.exe ./pvm3/conf/WIN32.def0000644007401100740110000000154406673301045012773 0ustar kohlkohl############################################### # Get the information captured during setup ! ############################################### ARCHCFLAGS = -DHASSTDLIB -DWIN32 -DSYSVBFUNC -DSYSVSTR \ -DHASERRORVARS -DNOWAIT3 -DNOGETDTBLSIZ -DNOUNIXDOM \ -DNOTMPNAM -DMAXHOSTNAMELEN=64 -DMAXPATHLEN=64 \ -DNEEDSFFS # for the defines in the workspace declaration # HASSTDLIB, WIN32, SYSVBFUNC, SYSVSTR, HASERRORVARS, NOWAIT3, # NOGETDTBLSIZ, NOUNIXDOM, NOTMPNAM, MAXHOSTNAMELEN=64, MAXPATHLEN=64, # NEEDSFFS, STDC_HEADERS, REGEX_MALLOC ARCHDLIB = ARCHDOBJ = ARCHLIB = MAKE = make ################################################ # We are ready to go: # compilerswitch ################################################ !IF "$(PVM_CCOMPILER)" == "WATCOMC++" !include $(PVM_ROOT)\conf\win32watcom.def !else !include $(PVM_ROOT)\conf\win32visual.def !endif ./pvm3/conf/IPSC2.m40000644007401100740110000000110206221570153012556 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/LINUX64.m40000644007401100740110000000110207240567543013022 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/LINUXALPHA.def0000644007401100740110000000117707354447043013646 0ustar kohlkohl# # Notes on readline Usage: # # If your Linux system has readline, then you may append the # following flags to the defines below: # # ARCHCFLAGS = . . . -DHASREADLINE # ARCHLIB = . . . -lreadline # # and recompile PVM. # # On some Linux systems, readline requires ncurses, so you # must also add "-lncurses" to the ARCHLIB define. # ARCHCFLAGS = -DNOWAIT3 -DNOUNIXDOM -DCTIMEISTIMET -DSYSERRISCONST \ -DRSHCOMMAND=\"/usr/bin/rsh\" -DNEEDENDIAN \ -DHASSTDLIB -DSYSVSTR -DHASERRORVARS -DFDSETNOTSTRUCT \ -DSOCKLENISUINT -DNOTMPNAM ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = LINUXALPHA MAKE = make ./pvm3/conf/AIX46K64.def0000644007401100740110000000046710001307370013237 0ustar kohlkohlARCHCFLAGS = -DSOCKLENISUINT -DSYSVSIGNAL \ -DRSHCOMMAND=\"/usr/bin/rsh\" -DSOCKADHASLEN \ -DNEEDSSELECTH \ -g -q64 -qmaxmem=-1 -qarch=ppc -DHASSTDLIB ARCHFFLAGS = -q64 ARCHDLIB = -lbsd ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar -X64 LOPT = -g -q64 PVM_ARCH = AIX46K64 NEEDF2M4 = t MAKE = make ./pvm3/conf/BSD386.m40000644007401100740110000000045306604472265012631 0ustar kohlkohldivert(-1) undefine(`len') define(`FUNCTION',`$1_') define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/APOLLO.m40000644007401100740110000000107706310023131012723 0ustar kohlkohldivert(-1) undefine(`len') # # do nothing special to FORTRAN function names # define(`FUNCTION',`$1') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/NETBSDNS32K.def0000644007401100740110000000034307052612146013664 0ustar kohlkohlARCHCFLAGS = -DSOCKADHASLEN -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DHASERRORVARS -DNOREXEC -DNEEDMENDIAN -DSYSERRISCONST ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = NETBSDNS32K MAKE = make #MAKE = gmake ./pvm3/conf/RS6KMP.def0000644007401100740110000000041006604766776013166 0ustar kohlkohlARCHCFLAGS = -DSOCKLENISUINT -DSYSVSIGNAL -DNOUNIXDOM -D_BSD \ -DRSHCOMMAND=\"/usr/bin/rsh\" -DSOCKADHASLEN \ -DNEEDSSELECTH -DSHMEM ARCHDLIB = -lbsd -lpthreads ARCHDOBJ = ARCHLIB = -lbsd -lpthreads HASRANLIB = t AR = ar PVM_ARCH = RS6KMP MAKE = make ./pvm3/conf/BFLY.m40000644007401100740110000000110206221570125012471 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/RS6K.def0000644007401100740110000000033306604766775012734 0ustar kohlkohlARCHCFLAGS = -DSOCKLENISUINT -DSYSVSIGNAL \ -DRSHCOMMAND=\"/usr/bin/rsh\" -DSOCKADHASLEN \ -DNEEDSSELECTH ARCHDLIB = -lbsd ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = RS6K NEEDF2M4 = t MAKE = make ./pvm3/conf/RS6KMP.m40000644007401100740110000000110206221570203012714 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/CNVX.m40000644007401100740110000000110206221570133012512 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/BEOLIN.def0000644007401100740110000000055007053052665013141 0ustar kohlkohlARCHCFLAGS = -DSYSVSIGNAL -DNOWAIT3 -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DNEEDENDIAN -DFDSETNOTSTRUCT -DHASERRORVARS \ -DCTIMEISTIMET -DSYSERRISCONST -DNOTMPNAM \ -DNOUNIXDOM -DNOPROT ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t PVM_ARCH = LINUX AR_FRONT = ar AR_NODE = ar AR = ar CC = cc NODECC = cc FORTRAN = f77 NODEFORT = f77 MAKE = make ./pvm3/conf/X86SOL2.m40000644007401100740110000000110206221570236012765 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/NETBSDVAX.m40000644007401100740110000000110207052612215013273 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/LINUX64.def0000644007401100740110000000302111122261740013222 0ustar kohlkohl# # Notes on readline Usage: # # If your Linux system has readline, then you may append the # following flags to the defines below: # # ARCHCFLAGS = . . . -DHASREADLINE # ARCHLIB = . . . -lreadline # # and recompile PVM. # # On some Linux systems, readline requires ncurses, so you # must also add "-lncurses" to the ARCHLIB define. # # Add define of HASSTDLIB for LINUX64 (copied from the LINUX template) # new definitions to allow, at least, "malloc.h" heder file include # and thus not generate 32-bits truncating (thru "sxt4" assembly # instruction ...) code, leading to Linux64 Virtual Memory addresses # to be corrupted ("segments" bits are located in the highest weighted # word/bits !!), on IA-64/Linux64 platforms. # # For some x86-64 systems (like LINUXX86_64 on Fedora 5), you need # to add -DSYSVSTR to ARCHCFLAGS, or else strerror() will bomb. # (Thanks to Bill Schell for this report!) # # For building shared libraries, swap the SHAREDCFLAGS define below # to use the -fpic (or -fPIC, usually equivalent) setting, # (be sure $(SHAREDCFLAGS) is included in $(ARCHCFLAGS) below) # and then do a "make clean ; make shared" in $PVM_ROOT. # # SHAREDCFLAGS = -fpic SHAREDCFLAGS = SHAREDLDFLAGS = -shared # ARCHCFLAGS = -DSYSVSIGNAL -DNOWAIT3 -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DNEEDENDIAN -DFDSETNOTSTRUCT -DHASERRORVARS \ -DHASSTDLIB -DCTIMEISTIMET -DSYSERRISCONST -DNOTMPNAM \ -DSYSVSTR -DUSESTRERROR $(SHAREDCFLAGS) ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = LINUX64 MAKE = make ./pvm3/conf/LINUXALPHA.m40000644007401100740110000000110206427710727013416 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/NETBSDVAX.def0000644007401100740110000000034107052612214013514 0ustar kohlkohlARCHCFLAGS = -DSOCKADHASLEN -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DHASERRORVARS -DNOREXEC -DNEEDMENDIAN -DSYSERRISCONST ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = NETBSDVAX MAKE = make #MAKE = gmake ./pvm3/conf/UTS2.m40000644007401100740110000000033406221570232012477 0ustar kohlkohlundefine(`len') define(`FUNCTION',`$1_') define(`STRING_ARG',`$1_ptr, $1_len') define(`STRING_ARG_DECL',`char * $1_ptr; int * $1_len') define(`STRING_LEN',`(*$1_len)') define(`STRING_PTR',`$1_ptr') define(`ARGS',`($1)') ./pvm3/conf/NETBSDSUN3.m40000644007401100740110000000122206221570174013374 0ustar kohlkohldivert(-1) undefine(`len') # # FORTRAN function names are in upper case # define(`FUNCTION',`translit($1,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ)') # # FORTRAN character strings are passed as follows: # XXX is this right? # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/SUNMP.def0000644007401100740110000000110407337304405013064 0ustar kohlkohlARCHCFLAGS = -DSYSVBFUNC -DSYSVSTR -DNOGETDTBLSIZ -DSYSVSIGNAL \ -DNOWAIT3 -DRSHCOMMAND=\"/usr/bin/rsh\" -DNOUNIXDOM \ -DUSESTRERROR -DSHMEM # -DUSESTRERROR -DSHMEM -DPVMUSEMUTEX # If you want to use MUTEX instead of Semaphores set -DPVMUSEMUTEX here # and remove the PLOCKFILE definition below # Note some older machines cannot use the v8plus directive PLOCKFILE = ../tas.il -xarch=v8plusa # Test And Set In Line code #PLOCKFILE = ARCHDLIB = -lnsl -lsocket -lthread ARCHDOBJ = ARCHLIB = -lnsl -lsocket -lthread HASRANLIB = f AR = ar PVM_ARCH = SUNMP MAKE = make ./pvm3/conf/ALPHAMP.m40000644007401100740110000000110206221570121013013 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/CNVXN.def0000644007401100740110000000016006604766721013070 0ustar kohlkohlARCHCFLAGS = -DNOUNIXDOM ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = CNVXN MAKE = make ./pvm3/conf/LINUXSPARC.m40000644007401100740110000000110206334440246013432 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/AIX4MP.m40000644007401100740110000000143606763561340012723 0ustar kohlkohldivert(-1) undefine(`len') # # This generates two copies of each libfpvm function, one with # a trailing underscore and one without, so the resulting libfpvm # works whether or not you use -qextname. # For more comments, see the HPPA m4 file. define(`FUNCTION',ifdef(`USCORYES',`$1_',`$1')) #define(`FUNCTION',`$1') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/NETBSDI386.def0000644007401100740110000000034207052611774013522 0ustar kohlkohlARCHCFLAGS = -DSOCKADHASLEN -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DHASERRORVARS -DNOREXEC -DNEEDMENDIAN -DSYSERRISCONST ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = NETBSDI386 MAKE = make #MAKE = gmake ./pvm3/conf/BAL.def0000644007401100740110000000015606604766706012602 0ustar kohlkohlARCHCFLAGS = -DNOUNIXDOM ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = BAL MAKE = make ./pvm3/conf/M88K.def0000644007401100740110000000031506604766747012675 0ustar kohlkohlARCHCFLAGS = -DNEEDSFFS -DNOUNIXDOM -DNOWAIT3 -DSHAREDTMP \ -DSTATISTICS -DNOGETDTBLSIZ -DREALIX -DMAXPATHLEN=1024 ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = f AR = ar PVM_ARCH = M88K MAKE = make ./pvm3/conf/NETBSDARM32.m40000644007401100740110000000110207052612132013417 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/SGI.m40000644007401100740110000000110206221570205012356 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/SUN4SOL2.def0000644007401100740110000000063307432766472013375 0ustar kohlkohl# # Note: for 64-bit systems, add the following flags to ARCHCFLAGS: # # -DHASSTDLIB -xarch=v9 -KPIC # # (-KPIC used for building shared dynamic libraries...) # ARCHCFLAGS = -DSYSVBFUNC -DSYSVSTR -DNOGETDTBLSIZ -DSYSVSIGNAL \ -DNOWAIT3 -DRSHCOMMAND=\"/usr/bin/rsh\" -DUSESTRERROR ARCHDLIB = -lnsl -lsocket ARCHDOBJ = ARCHLIB = -lnsl -lsocket HASRANLIB = f AR = ar PVM_ARCH = SUN4SOL2 MAKE = make ./pvm3/conf/FREEBSD.def0000644007401100740110000000037206604766725013257 0ustar kohlkohlARCHCFLAGS = -DSOCKADHASLEN -DNOREXEC -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DHASSTDLIB -DNEEDMENDIAN -DHASERRORVARS \ -DFAKEXDRFLOAT -DSYSERRISCONST ARCHDLIB = ARCHDOBJ = ARCHLIB = -lrpcsvc HASRANLIB = t AR = ar PVM_ARCH = FREEBSD MAKE = make ./pvm3/conf/E88K.def0000644007401100740110000000020506604766724012656 0ustar kohlkohlARCHCFLAGS = -DNOUNIXDOM -DNET_IF_IN_SYS ARCHDLIB = ARCHDOBJ = ARCHLIB = -lrpc HASRANLIB = f AR = ar PVM_ARCH = E88K MAKE = make ./pvm3/conf/TITN.def0000644007401100740110000000030606604767025012752 0ustar kohlkohlARCHCFLAGS = -DNOGETDTBLSIZ -DSYSVSIGNAL -DNOWAIT3 -DSYSVSTR \ -DNOREXEC -DNOSOCKOPT -DNOUNIXDOM -DNEEDSFFS ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = f AR = ar PVM_ARCH = TITN MAKE = make ./pvm3/conf/LINUXATARI.def0000644007401100740110000000104107354447044013650 0ustar kohlkohl# # Notes on readline Usage: # # If your Linux system has readline, then you may append the # following flags to the defines below: # # ARCHCFLAGS = . . . -DHASREADLINE # ARCHLIB = . . . -lreadline # # and recompile PVM. # # On some Linux systems, readline requires ncurses, so you # must also add "-lncurses" to the ARCHLIB define. # ARCHCFLAGS = -DRSHCOMMAND=\"/usr/bin/rsh\" -DNEEDENDIAN \ -DHASERRORVARS -DSYSERRISCONST -DNOREXEC -DNOTMPNAM ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = LINUXATARI MAKE = make ./pvm3/conf/M88K.m40000644007401100740110000000122206221570157012434 0ustar kohlkohldivert(-1) undefine(`len') # # FORTRAN function names are in upper case # define(`FUNCTION',`translit($1,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ)') # # FORTRAN character strings are passed as follows: # XXX is this right? # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/OS2.def0000644007401100740110000000067006604766773012614 0ustar kohlkohlARCHCFLAGS = -D__ST_MT_ERRNO__ -Zsysv-signals -DSYSVSIGNAL \ -DHASERRORVARS -DNEEDMENDIAN -DHASSTDLIB -DSYSVSTR \ -DNOGETDTBLSIZ -DNOTMPNAM -DNOWAIT3 -DNOUNIXDOM \ -DNOSOCKOPT -DNOWAITPID -DRSHCOMMAND=\"rsh\" \ -DMAXHOSTNAMELEN=256 -DFAKEXDRFLOAT -DFDSETNOTSTRUCT \ -DSYSERRISCONST ARCHDLIB = -lsocket -lrpc ARCHDOBJ = ARCHLIB = -lsocket -lrpc HASRANLIB = f PVM_ARCH = OS2 EXESFX = .exe CC = gcc MAKE = make ./pvm3/conf/SP2MPI.def0000644007401100740110000000044206604767012013143 0ustar kohlkohlARCHCFLAGS = -DSYSVSIGNAL -DNOUNIXDOM -DSOCKADHASLEN \ -DRSHCOMMAND=\"/usr/bin/rsh\" -DNEEDSSELECTH ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t PVM_ARCH = SP2MPI AR_FRONT = ar AR_NODE = ar AR = ar CC = cc NODECC = mpcc NEEDF2M4 = t FORTRAN = f77 NODEFORT = mpxlf MAKE = make ./pvm3/conf/AIX4SP2.m40000644007401100740110000000143606233733753013014 0ustar kohlkohldivert(-1) undefine(`len') # # This generates two copies of each libfpvm function, one with # a trailing underscore and one without, so the resulting libfpvm # works whether or not you use -qextname. # For more comments, see the HPPA m4 file. define(`FUNCTION',ifdef(`USCORYES',`$1_',`$1')) #define(`FUNCTION',`$1') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/ALPHAMP.def0000644007401100740110000000054507044071700013246 0ustar kohlkohl# # Note: The -DCTIMEISTIMET flag in the ARCHCFLAGS definition may not # be required on all Alpha systems... # ARCHCFLAGS = -DHASSTDLIB -DNOUNIXDOM -DSHMEM -DCTIMEISTIMET ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = ALPHAMP # PVMDEPPATH Not Needed on *All* DEC Alpha Systems #PVMDEPPATH = PVMDEPPATH = ALPHAMP/ MAKE = make ./pvm3/conf/UXPV.m40000644007401100740110000000110206365411444012546 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/U370.m40000644007401100740110000000033406221570231012377 0ustar kohlkohlundefine(`len') define(`FUNCTION',`$1_') define(`STRING_ARG',`$1_ptr, $1_len') define(`STRING_ARG_DECL',`char * $1_ptr; int * $1_len') define(`STRING_LEN',`(*$1_len)') define(`STRING_PTR',`$1_ptr') define(`ARGS',`($1)') ./pvm3/conf/LINUXPPC.m40000644007401100740110000000110206474362273013214 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/NETBSDM68K.m40000644007401100740110000000110207052612133013321 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/NETBSDMIPSEB.def0000644007401100740110000000034407052612134014041 0ustar kohlkohlARCHCFLAGS = -DSOCKADHASLEN -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DHASERRORVARS -DNOREXEC -DNEEDMENDIAN -DSYSERRISCONST ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = NETBSDMIPSEB MAKE = make #MAKE = gmake ./pvm3/conf/MIPS.m40000644007401100740110000000110206221570162012506 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/AIX5SP2.def0000644007401100740110000000040010001307372013177 0ustar kohlkohlARCHCFLAGS = -DSOCKLENISUINT -DSYSVSIGNAL -DNOUNIXDOM -DNEEDSSELECTH ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t PVM_ARCH = AIX5SP2 AR_FRONT = ar AR_NODE = ar AR = ar CC = cc NODECC = mpcc NEEDF2M4 = t FORTRAN = f77 NODEFORT = mpxlf MAKE = make ./pvm3/conf/SGI5.m40000644007401100740110000000110206221570207012445 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/MASPAR.m40000644007401100740110000000110206221570161012720 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/AIX56K64.m40000644007401100740110000000143610001307371013020 0ustar kohlkohldivert(-1) undefine(`len') # # This generates two copies of each libfpvm function, one with # a trailing underscore and one without, so the resulting libfpvm # works whether or not you use -qextname. # For more comments, see the HPPA m4 file. define(`FUNCTION',ifdef(`USCORYES',`$1_',`$1')) #define(`FUNCTION',`$1') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/SX3.def0000644007401100740110000000026206604767016012612 0ustar kohlkohlARCHCFLAGS = -DSYSVSIGNAL -DNOWAIT3 -DNOGETDTBLSIZ -DNOSTRCASE \ -DNOWAITPID -DHASSTDLIB ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = f AR = ar PVM_ARCH = SX3 MAKE = make ./pvm3/conf/AIX5SP2.m40000644007401100740110000000143610001307373012774 0ustar kohlkohldivert(-1) undefine(`len') # # This generates two copies of each libfpvm function, one with # a trailing underscore and one without, so the resulting libfpvm # works whether or not you use -qextname. # For more comments, see the HPPA m4 file. define(`FUNCTION',ifdef(`USCORYES',`$1_',`$1')) #define(`FUNCTION',`$1') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/BEOSCYLD.def0000644007401100740110000000117307354714344013402 0ustar kohlkohl# # Notes on readline Usage: # # If your Linux system has readline, then you may append the # following flags to the defines below: # # ARCHCFLAGS = . . . -DHASREADLINE # ARCHLIB = . . . -lreadline # # and recompile PVM. # # On some Linux systems, readline requires ncurses, so you # must also add "-lncurses" to the ARCHLIB define. # ARCHCFLAGS = -DSYSVSIGNAL -DNOWAIT3 -DRSHCOMMAND=\"/usr/bin/bpsh\" \ -DNEEDENDIAN -DFDSETNOTSTRUCT -DHASERRORVARS \ -DCTIMEISTIMET -DSYSERRISCONST -DNOTMPNAM ARCHDLIB = /usr/lib/libbproc.a ARCHDOBJ = ARCHLIB = /usr/lib/libbproc.a HASRANLIB = t AR = ar PVM_ARCH = BEOSCYLD MAKE = make ./pvm3/conf/MACOSX.m40000644007401100740110000000150007471215162012736 0ustar kohlkohldivert(-1) undefine(`len') # # For g77, do nothing special to FORTRAN function names # define(`FUNCTION',`$1') # # For the Absoft Compiler, FORTRAN function names are in upper case, # so use this line instead (from Drew McCormack cormack@chem.vu.nl): # # define(`FUNCTION',`translit($1,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ) # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # XXX I hope... # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/NETBSDPMAX.m40000644007401100740110000000122206221570171013406 0ustar kohlkohldivert(-1) undefine(`len') # # FORTRAN function names are in upper case # define(`FUNCTION',`translit($1,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ)') # # FORTRAN character strings are passed as follows: # XXX is this right? # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/HPIA64.def0000644007401100740110000000067210723626140013062 0ustar kohlkohl# --------------------- Build with GCC ------------------- #CC = gcc #C_OPT = -mlp64 -pipe -O3 -g -Wall #F77 = g77 #AS = /usr/ccs/bin/as # --------------------- Standard Stuff --------------------------------- ARCHCFLAGS = -DSYSVSIGNAL -DNOWAIT3 -DNOGETDTBLSIZ \ -DRSHCOMMAND=\"/usr/bin/remsh\" \ -DCLUMP_ALLOC -DHASSTDLIB ARCHDLIB = -lnsl ARCHLIB = -lnsl HASRANLIB = f PVM_ARCH = HPIA64 AR = ar FC = g77 NEEDF2M4 = t MAKE = gmake ./pvm3/conf/NETBSDSPARC.def0000644007401100740110000000052207052611775013742 0ustar kohlkohl# # Note: some versions of NetBSD for Sparc may require the # -DNEEDMENDIAN flag in the ARCHCFLAGS definition. # ARCHCFLAGS = -DSOCKADHASLEN -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DHASERRORVARS -DNOREXEC -DSYSERRISCONST ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = NETBSDSPARC MAKE = make #MAKE = gmake ./pvm3/conf/HP300.m40000644007401100740110000000107706221570145012504 0ustar kohlkohldivert(-1) undefine(`len') # # do nothing special to FORTRAN function names # define(`FUNCTION',`$1') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/LINUXPPC.def0000644007401100740110000000102607354447044013435 0ustar kohlkohl# # Notes on readline Usage: # # If your Linux system has readline, then you may append the # following flags to the defines below: # # ARCHCFLAGS = . . . -DHASREADLINE # ARCHLIB = . . . -lreadline # # and recompile PVM. # # On some Linux systems, readline requires ncurses, so you # must also add "-lncurses" to the ARCHLIB define. # ARCHCFLAGS = -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DNEEDENDIAN -DFDSETNOTSTRUCT -DHASERRORVARS -DNOTMPNAM ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = LINUXPPC MAKE = make ./pvm3/conf/LINUXARM.def0000644007401100740110000000112207354447044013427 0ustar kohlkohl# # Notes on readline Usage: # # If your Linux system has readline, then you may append the # following flags to the defines below: # # ARCHCFLAGS = . . . -DHASREADLINE # ARCHLIB = . . . -lreadline # # and recompile PVM. # # On some Linux systems, readline requires ncurses, so you # must also add "-lncurses" to the ARCHLIB define. # ARCHCFLAGS = -DSYSVSIGNAL -DNOWAIT3 -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DNEEDENDIAN -DFDSETNOTSTRUCT -DHASERRORVARS \ -DCTIMEISTIMET -DSYSERRISCONST -DNOTMPNAM ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = LINUXARM MAKE = make ./pvm3/conf/SCO.def0000644007401100740110000000036706604766777012644 0ustar kohlkohlARCHCFLAGS = -DSYSVSTR -DSYSVSIGNAL -DNOUNIXDOM \ -DRSHCOMMAND=\"/usr/bin/rcmd\" -DNEEDSFFS \ -DSYSVBFUNC -DNOWAIT3 -DNOGETDTBLSIZ ARCHDLIB = -lsocket ARCHDOBJ = ARCHLIB = -lrpc -lsocket HASRANLIB = AR = ar PVM_ARCH = SCO MAKE = make ./pvm3/conf/AIX46K.def0000644007401100740110000000033506604766701013104 0ustar kohlkohlARCHCFLAGS = -DSOCKLENISUINT -DSYSVSIGNAL \ -DRSHCOMMAND=\"/usr/bin/rsh\" -DSOCKADHASLEN \ -DNEEDSSELECTH ARCHDLIB = -lbsd ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = AIX46K NEEDF2M4 = t MAKE = make ./pvm3/conf/NETBSDSH3.def0000644007401100740110000000034107052612212013451 0ustar kohlkohlARCHCFLAGS = -DSOCKADHASLEN -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DHASERRORVARS -DNOREXEC -DNEEDMENDIAN -DSYSERRISCONST ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = NETBSDSH3 MAKE = make #MAKE = gmake ./pvm3/conf/SGIMP64.m40000644007401100740110000000110206221570214012765 0ustar kohlkohldivert(-1) undefine(`len') # # append an underscore to FORTRAN function names # define(`FUNCTION',`$1_') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/NETBSDAMIGA.def0000644007401100740110000000041707052611773013711 0ustar kohlkohl# Warning: Now Subsumed By NETBSDM68K arch. ARCHCFLAGS = -DSOCKADHASLEN -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DHASERRORVARS -DNOREXEC -DNEEDMENDIAN -DSYSERRISCONST ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = NETBSDAMIGA MAKE = make #MAKE = gmake ./pvm3/conf/HPIA64.m40000644007401100740110000000244510723626140012644 0ustar kohlkohldivert(-1) undefine(`len') # # the HP Snake does nothing special to FORTRAN function names # # The preceding statement is not QUITE true.... If one invokes # certain options for the HP compiler, THEN subprogram names take # on the form.... "abcedf_" as opposed to "abcdef" as stated above. # There seems to be no clean solution. MY answer is to create TWO # separate libaries, one WITH underscores in the names and one WITHOUT. # Each routinme is compiled twice, once with an underscore in the # routine name and once without. Thus, each ".o" file actually # contains two routines. The resulting library lets the loader # pick and choose whichever the perverted HP system wants at THAT # particular time..... -RWB 1/5/93 define(`FUNCTION',ifdef(`USCORYES',`$1_',`$1')) #define(`FUNCTION',`$1') # # FORTRAN character strings are passed as follows: # a pointer to the base of the string is passed in the normal # argument list, and the length is passed by value as an extra # argument, after all of the other arguments. # define(`ARGS',`($1`'undivert(1))') define(`SAVE',`divert(1)$1`'divert(0)') define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')') define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len') define(`STRING_LEN',`$1_len') define(`STRING_PTR',`$1_ptr') divert(0) ./pvm3/conf/win32.bat0000644007401100740110000000040306625342661013142 0ustar kohlkohlPVM_ROOT= C:\PROGRA~1\PVM3.4 PVM_ARCH= WIN32 CCOMPILER= VISUALC++ FCOMPILER= DigitalFortran FLIBDIR= C:\PROGRA~1\DEVSTU~1\DF\LIB FINCLUDE= C:\PROGRA~1\DEVSTU~1\DF\INCLUDE CLIBDIR= C:\PROGRA~1\DEVSTU~1\VC\LIB CINCLUDE= C:\PROGRA~1\DEVSTU~1\VC\INCLUDE ./pvm3/conf/NETBSDPOWERPC.def0000644007401100740110000000034507052612151014201 0ustar kohlkohlARCHCFLAGS = -DSOCKADHASLEN -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DHASERRORVARS -DNOREXEC -DNEEDMENDIAN -DSYSERRISCONST ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = NETBSDPOWERPC MAKE = make #MAKE = gmake ./pvm3/conf/NETBSDSUN3.def0000644007401100740110000000041607052611775013624 0ustar kohlkohl# Warning: Now Subsumed By NETBSDM68K arch. ARCHCFLAGS = -DSOCKADHASLEN -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DHASERRORVARS -DNOREXEC -DNEEDMENDIAN -DSYSERRISCONST ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = NETBSDSUN3 MAKE = make #MAKE = gmake ./pvm3/conf/X86SOL2.def0000644007401100740110000000036006604767032013217 0ustar kohlkohlARCHCFLAGS = -DSYSVBFUNC -DSYSVSTR -DNOGETDTBLSIZ -DSYSVSIGNAL \ -DNOWAIT3 -DNOUNIXDOM -DRSHCOMMAND=\"/usr/bin/rsh\" ARCHDLIB = -lnsl -lsocket ARCHDOBJ = ARCHLIB = -lnsl -lsocket HASRANLIB = f AR = ar PVM_ARCH = X86SOL2 MAKE = make ./pvm3/conf/NETBSDMIPSEL.def0000644007401100740110000000034407052612137014056 0ustar kohlkohlARCHCFLAGS = -DSOCKADHASLEN -DRSHCOMMAND=\"/usr/bin/rsh\" \ -DHASERRORVARS -DNOREXEC -DNEEDMENDIAN -DSYSERRISCONST ARCHDLIB = ARCHDOBJ = ARCHLIB = HASRANLIB = t AR = ar PVM_ARCH = NETBSDMIPSEL MAKE = make #MAKE = gmake ./pvm3/Readme0000644007401100740110000004532511140673152011705 0ustar kohlkohl PVM version 3.4: Parallel Virtual Machine System University of Tennessee, Knoxville TN. Oak Ridge National Laboratory, Oak Ridge TN. Emory University, Atlanta GA. Authors: J. J. Dongarra, G. E. Fagg, G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci, P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam (C) 2009 All Rights Reserved NOTICE Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted provided that the above copyright notice appear in all copies and that both the copyright notice and this permission notice appear in supporting documentation. Neither the Institutions (Emory University, Oak Ridge National Laboratory, and University of Tennessee) nor the Authors make any representations about the suitability of this software for any purpose. This software is provided ``as is'' without express or implied warranty. PVM version 3 was funded in part by the U.S. Department of Energy, the National Science Foundation and the State of Tennessee. ________________________________________________________________________ WHAT IS PVM? PVM is a software system that enables a collection of heterogeneous computers to be used as a coherent and flexible concurrent computational resource, or a "parallel virtual machine". The individual computers may be shared- or local-memory multiprocessors, vector supercomputers, specialized graphics engines, or scalar workstations and PCs, that may be interconnected by a variety of networks, such as Ethernet or FDDI. PVM consists of a run-time environment and library for message-passing, task and resource management, and fault notification. While PVM will not automatically make a commercial software package run faster, it *does* provide a powerful set of functions for manually parallelizing an existing source program, or for writing new parallel / distributed programs. The PVM software must be specifically installed on every machine that is to be used in your "virtual machine". There is no "automatic" installation of executables onto remote machines in PVM, although simply copying the pvm3/lib and pvm3/bin directories to another *similar* machine (and setting $PVM_ROOT and $PVM_ARCH - see below) is sufficient for running PVM programs. Compiling or building PVM programs requires the full PVM installation. User programs written in C, C++ or Fortran can access PVM through provided library routines. ________________________________________________________________________ UNPACKING This distribution contains source code, some simple examples, and run-time support for PVM version 3. The documentation for PVM can be obtained separately from Netlib. To get a list of available subsets, send e-mail to "netlib@ORNL.GOV" with the subject: "send index from pvm3". The files in the source distribution unpack into a "pvm3" directory. The pvm3 directory can reside in either a private or shared disk area. Installations for multiple machine architectures can coexist in the same shared filesystem because compiled files are placed in different subdirectories named for each architecture ($PVM_ARCH). Some of the more important directories are: Directory Contains --------------------------------------------------------------- bin/$PVM_ARCH/ PVM user program executables (examples & your programs) conf/ Make configuration files for all PVM architectures console/ Source for the pvm console doc/ Miscellaneous documentation examples/ Example PVM programs source files gexamples/ More example PVM programs - for group library hoster/ An example "hoster" program include/ Header files for PVM programs lib/ Generic system executables (scripts, rc file stubs) lib/$PVM_ARCH/ System executables (PVM daemon, console, etc.) libfpvm/ Source for the libfpvm Fortran library man/man[13]/ Online manual pages (nroff format) misc/ Some miscellaneous PVM examples and utilities patches/ Patch files and instructions, as they are released pvmgs/ Source for the libgpvm library and group nameserver rm/ An example resource manager for PVM shmd/ A special daemon for shared memory systems (*MP) src/ Source for the libpvm library and PVM daemon src/$PVM_ARCH/ Additional source code for specific machines tasker/ An example "tasker" program for PVM tracer/ An example "tracer" program for PVM xep/ An example interactive X-Window program BUILDING AND INSTALLING To build the full PVM software, you will need to have a "make" utility, a C or C++ compiler, and a Fortran compiler installed on your system. Before building or running PVM, you must set the environment variable "PVM_ROOT" to the path where PVM resides, i.e. the path of the directory with this "Readme" file. This can be in a private area, for example $HOME/pvm3, or a public one, such as /usr/local/pvm3. If your shell is "csh", add a line such as: setenv PVM_ROOT $HOME/pvm3 to your .cshrc file. If you use "ksh" or "bash" shells, then add the following lines to that shell's startup file, i.e. $HOME/.kshrc or $HOME/.bashrc, respectively: PVM_ROOT=$HOME/pvm3 export PVM_ROOT (NOTE: If you use "bash", please do _Not_ put PVM environment settings into $HOME/.profile, as it is _Not_ sourced on remote shell invocations - *Always Use $HOME/.bashrc*...! :-) The use of this variable and others is explained more fully in the pvm_intro man page. You can also include an appropriate shell startup file stub to set other PVM environment variables and to add PVM directories to your execution path. Insert the matching stub file, pvm3/lib/cshrc.stub, pvm3/lib/kshrc.stub or pvm3/lib/bashrc.stub, after your declaration of PVM_ROOT in your shell startup file (e.g. copy the lines from the stub file _into_ your $HOME/.cshrc or $HOME/.kshrc or $HOME/.bashrc file, respectively, and uncomment the stuff you want... :-). To build PVM for your system, type "make" in this directory. Make will use the "aimk" in the pvm3/lib directory to build the daemon executable (pvmd3), the C library (libpvm3.a), the Fortran library (libfpvm3.a) and the console client program (pvm). The libraries and executables are installed in $PVM_ROOT/lib/$PVM_ARCH, where $PVM_ARCH is the host architecture name, e.g. "CRAY" or "LINUX". If you have problems compiling PVM on your system, check the architecture-specific configuration file: $PVM_ROOT/conf/$PVM_ARCH.def for comments regarding alternative configurations for your system. The provided scripts $PVM_ROOT/lib/pvm and $PVM_ROOT/lib/pvmd are used to start the PVM console and the PVM daemon, respectively. They determine the machine architecture and run the actual programs in the $PVM_ROOT/lib/$PVM_ARCH directory. You can either copy these scripts to your bin directory or add $PVM_ROOT/lib to your shell search path (using the above *.stub files). You may wish to add $PVM_ROOT/man to your MANPATH environment variable, if it's supported on your system. This will allow you to easily read the online manual pages. ALTERNATIVES TO RSH To use "ssh" instead of "rsh" on your system, you can either: 1. Modify the $PVM_ROOT/conf/$PVM_ARCH.def file to change the absolute path specified for RSHCOMMAND in the ARCHCFLAGS define. Replace the path to rsh with the absolute path to "ssh" on your system and then recompile PVM and your applications. or 2. Set the "PVM_RSH" environment variable to point to the absolute path to "ssh" on your system. This does not require re-compilation but must be done in every shell from which PVM is executed. The "PVM_RSH" environment variable can be set in your $HOME/.cshrc or equivalent shell startup file to take affect in all new shells. Once either of these approaches has been applied, the $HOME/.rhosts file is then no longer necessary for PVM, thereby eliminating a fundamental security concern. Now, to add PVM hosts (using ssh), you can either manually enter your password each time you add a host, or else you can set up an ssh-agent session. (You can always just use a $HOME/.shosts file, but then you're not much more secure than with standard rsh...) When manually entering your password, you will not receive a prompt from PVM or ssh - the text prompts normally returned by ssh are automatically captured and written to the local /tmp/pvml. log file. However, simply typing your password from inside the "pvm" console or when running the "pvmd" script will work. You can bypass this manual password entry for a given session by executing the following commands (example is for bash, could use for any shell): $ ssh-agent bash $ ssh-add $ pvm $ pvm> add host2 . . . For this to work, you must have run "ssh-keygen" on each host to create a private/public key pair for your login id. These keys are typically stored in the $HOME/.ssh directory on each system. The $HOME/.ssh/identity.pub public key must be copied to each remote host and added as a line in the $HOME/.ssh/authorized_keys file on the remote system. When this has been set up, any PVM hosts can be added without password or passphrase entry using the above ssh-agent session. STARTING AND STOPPING PVM To start PVM, run $PVM_ROOT/lib/pvm. This starts the console task, which in turn starts a PVM daemon ("pvmd") if one is not already running. More hosts can be started and added to your "virtual machine" by using the console "add" command. To start the pvmd without starting the console, you can also run the $PVM_ROOT/lib/pvmd directly. A number of hosts can all be started at once by supplying the pvmd with a host file, as in: $PVM_ROOT/lib/pvmd my_hosts where "my_hosts" contains the names of the hosts you wish to add, one host per line. See the pvmd man page for other host file options. To stop PVM, use the PVM console command "halt". From within your user programs, you can use the pvm_halt() function. You can also kill the pvmd3 process (always use a catchable signal such as SIGTERM). But, if you do kill the pvmd, or if it fails for some other reason, always be sure to remove any leftover /tmp/pvmd. pvmd socket files, where is your numerical user id. These files will make PVM think a pvmd is running, and can cause the dreaded "Can't Start Pvmd" message. For more information about the console commands, see the console "help" function or the console man page. TROUBLESHOOTING If you ever have trouble starting PVM or adding a new host to your virtual machine, verify that there are no leftover /tmp/pvmd. daemon socket files on the machines where you are trying to start PVM (as described above) and then check the local PVM log file: /tmp/pvml. for any error messages which may help you to determine the problem. A common problem is caused by restricted access to a remote machine via "rsh". PVM uses "rsh" to start the pvmd on a remote host. If you cannot do this: % rsh remote_host 'echo $PVM_ROOT' and successfully get back the correct value of $PVM_ROOT on that remote host, without typing your password, then that is the problem. You will need to set up permissions on the remote host to allow rsh access without a password. On Unix systems, this is accomplished by creating a $HOME/.rhosts file on the *remote* machine that provides access to your *local* machine. (Note: the $HOME/.rhosts file is *NOT* a PVM host file...) The format of a $HOME/.rhosts file is as follows: your_host_1 your_login_on_host_1 your_host_2 your_login_on_host_2 your_host_3 your_login_on_host_3 . . . If you get really stuck, try checking the online FAQ off of the PVM Home Page: http://www.netlib.org/pvm3/book/node23.html#SECTION00450000000000000000 Master Host IP Address is Loopback! ----------------------------------- *** If you see "Master Host IP Address is Loopback!" or get the PvmIPLoopback error when adding hosts, this means that the networking on your Master PVM host (the one you initially started PVM on) is not set up correctly for networking to multiple, remote hosts in your virtual machine. By default, especially on many Linux systems, your system's host name alias is appended to the 127.0.0.1 loopback, or localhost, IP address in the /etc/hosts file. This is very useful for PCs running in stand-alone mode without networking, however this alias must be removed for interaction with remote hosts in PVM. The bottom line is that you need to assign a "real" IP address to your machine's host name in /etc/hosts. By default, most Linux systems create an entry like this: 127.0.0.1 localhost.localdomain localhost foo where "foo" is your system's host name. The problem here is that PVM uses the host name "foo" to look up the IP address for your system, so PVM gets the localhost "loopback" IP address (127.0.0.1) by mistake. You need to create a separate line in /etc/hosts that associates your host name with its externally recognized IP address: 127.0.0.1 localhost.localdomain localhost 123.45.67.89 foo.your.domain foo Make sure that you remove any references to your host name / alias from the 127.0.0.1 line, or else put the new hard-coded IP address line *before* the localhost line in /etc/hosts... If you don't want to manually change your /etc/hosts file in this way, then please see the Linux Networking HOWTO for information on automatically handling this scenario (via ifup-local and ifdown-local scripts). Also keep in mind that you can start PVM using the '-n' flag to select a specific host name & corresponding IP address, as in: $ pvm -nfoo Note that there is no space between the '-n' and your desired host name. Clusters with Internal and External Networks -------------------------------------------- If you have a cluster system with an internal network that can't be seen from outside the cluster, then you may have problems adding cluster nodes to a virtual machine that was started on the head cluster node. The problem is likely related to a mixing of your cluster's internal versus external networking setup. Your front-end head cluster node likely has *two* IP addresses, one for the external network, and one for the internal network. This is a common scenario where the front-end node that can see both the external network and also the internal cluster network, but the internal cluster nodes cannot see the external network. When you start PVM on the master node, by default it uses the system host name to look up the network interface and corresponding IP address (using gethostbyname()). In most cases, this will be the IP address for the externally visible network interface. So, when you try to add an internal cluster node from the master, PVM will initiate the connection using this external IP address, which the cluster node can't see from inside its private, internal network. Then PVM will in fact double-check the source IP address of incoming message packets at the internal cluster nodes, and if the IP's don't match, it drops the packets (for security reasons). Therefore, the replies from the cluster nodes' PVM daemons will never reach the master PVM daemon. The solution is to start PVM using the *internal* network interface (and corresponding IP address) on the master node, so that the internal cluster nodes will correctly recognize the front-end node's IP address and network packets. This can be accomplished using the '-n' argument to the "pvm" console, as in: pvm -nfoo where "foo" is the master's host name on the internal network. (Note: there is no space between the '-n' and the 'foo'... :-) Clearly, for this to work, your front-end master cluster node must have 2 entries in its /etc/hosts file, one mapping the external IP address to some externally recognized host name, and there must be another line with the internal network IP address and a distinct internal network host name. You should be aware that running PVM on the master node using the internal network interface, to enable the internal cluster nodes to see the master, precludes adding hosts from the external network to your virtual machine. The master node does *not* act as a gateway between the internal and external networks in PVM. Instead, if you really need to include nodes on an external network in the same PVM virtual machine with your cluster nodes, then you should use the BEOLIN port of PVM, which uses a single PVM daemon on the master node and treats the cluster as one computational resource. (See the pvm3/Readme.Beolin file for information and usage.) Hope this helps! GCC "tmpnam()" Warnings ----------------------- With the latest versions of gcc, if you get the warning: "the use of `tmpnam' is dangerous, better use `mkstemp'" during compilation of PVM, you may safely ignore it. While the use of tmpnam() for temporary file generation is generally unsafe, PVM 3.4.6 has now been revamped to _never_ do a straight fopen() for writing any temporary file - all writing/appending to such files is done using open() with the O_CREAT and O_EXCL flags. If the warnings are annoying to you, then please add "-DNOTMPNAM" to the ARCHCFLAGS definition in your $PVM_ROOT/conf/$PVM_ARCH.def file, and then "make clean ; make" in $PVM_ROOT. Enjoy! :-D APPLICATION PROGRAMS C, C++ and Fortran programs must be linked with the main PVM library, $PVM_ROOT/lib/$PVM_ARCH/libpvm3.a, and Fortran programs must also be linked with the $PVM_ROOT/lib/$PVM_ARCH/libfpvm3.a library file. User program source files should include the $PVM_ROOT/include/pvm3.h header file for C/C++ programs, to define PVM constants and function prototypes. The corresponding Fortran header file is $PVM_ROOT/include/fpvm3.h. Executables should be installed in $PVM_ROOT/bin/$PVM_ARCH for a user installation (where the $PVM_ROOT directory is somewhere in a user-writable area), and in $HOME/pvm3/bin/$PVM_ARCH for a system-wide PVM installation (such as /usr/local/pvm3, where the user may not be able to write to the $PVM_ROOT/bin/$PVM_ARCH directory). The default execution path can be changed; see the "ep=" option on the pvmd man page. When user programs are spawned by PVM, by default they execute in the $HOME directory of the user. Any input or data files should therefore reside in or be linked to $HOME. This default working directory can be changed; see the "wd=" option on the pvmd man page. CONTACT The PVM web home page is at http://www.csm.ornl.gov/pvm/pvm_home.html A newsgroup, comp.parallel.pvm, exists for discussions about PVM and help with specific problems. Please direct any e-mail (questions, bugs, bug fixes, etc.) to: pvm@msr.CSM.ORNL.GOV To report bugs or problems with PVM, please see the file $PVM_ROOT/doc/bugreport . ________________________________________________________________________ Sincerely, The PVM research group ./pvm3/make.bat0000644007401100740110000001624706673522114012201 0ustar kohlkohlrem rem $Id: make.bat,v 1.15 1999/03/16 18:34:52 pvmsrc Exp $ rem rem echo on @echo off cls rem Script File for PVM for WIN32 rem 06/24/1997 Markus Fischer rem 10/--/1998 Stephen L. Scott -- revised edition rem 01/16/1999 Stephen L. Scott -- resolve some NT, Win95/98 issues rem 02/17/1999 Stephen L. Scott -- DevStudio C/Fortran V6 vs V5 differences rem rem OS is used to decide if batch file has to do any work rem to initialize C or Fortran setup. NT does not require rem any setup while 95/98 has some interesting twists... rem if "%OS%" == "Windows_NT" goto BEGIN rem skip 95/98 tests if have already been through once if "%PVMVCF%" == "YES" goto BEGIN rem *********** rem * FORTRAN * rem *********** rem check if dfvars.bat has been executed rem DF_TOOLS is defined as MSVC in dfvars.bat, so test for it... rem if found - dfvars.bat already initialized VC rem so skip VC stuff below too if "%DF_TOOLS%" == "MSVC" goto BEGIN rem dfvars.bat not executed, determine if fortran is installed rem decide which based on explicit path to fortran location. rem if find here, then execute dfvars.bat and skip C stuff below. if exist "%PVM_FBIN%\dfvars.bat" goto HASFORTRAN echo. echo Fortran compiler not found. echo. rem ****** rem * VC * rem ****** rem check if vcvars32.bat has been executed rem MSVCDIR is defined in vcvars.bat, so test for it... rem if found - vcvars32.bat already initialized VC rem so skip VC stuff below if exist "%MSVCDIR%\bin\vcvars32.bat" goto BEGIN rem either vcvars32.bat not executed OR VC not installed rem decide which based on explicit path to VC location. rem if find here, then execute vcvars32.bat if exist "%PVM_CBIN%\vcvars32.bat" goto HASC echo. echo C compiler not found. echo. goto INTRO :HASFORTRAN CALL %PVM_FBIN%\dfvars.bat rem this does VC also - so skip VC stuff... goto BEGIN :HASC CALL %PVM_CBIN%\vcvars32.bat goto BEGIN :BEGIN set PVMVCF=YES if "%1" == "" goto INTRO goto SWITCH :INTRO echo This is a script for (re)compiling the PVM code and examples. echo Type one of the following at the DOS command line. echo. echo make pvm -- will compile and install the PVM code by echo compiling libpvm, daemon, hoster, groupserver echo and console echo. echo make ec -- will compile the C examples echo. echo make ef -- will compile the Fortran examples echo. echo make gec -- will compile the C group examples echo. echo make gef -- will compile the Fortran group examples echo. echo make all -- will compile the items above echo. echo make clean -- will erase all object files (.obj) echo. echo make tidy -- will erase the object, dll, and executables echo (.obj .dll .ilk .pdb .exe) echo. echo make tec -- perform a "tidy" for C examples echo. echo make tef -- perform a "tidy" for Fortran examples echo. echo make tgec -- perform a "tidy" for C group examples echo. echo make tgef -- perform a "tidy" for Fortran group examples echo. echo. goto ENDE :SWITCH if "%1" == "pvm" goto PVM if "%1" == "all" goto PVMEX if "%1" == "clean" goto CLEAN if "%1" == "tidy" goto TIDY if "%1" == "ec" goto CEXAMPLES if "%1" == "ef" goto FEXAMPLES if "%1" == "gec" goto CGEXAMPLES if "%1" == "gef" goto FGEXAMPLES if "%1" == "tec" goto TEC if "%1" == "tef" goto TEF if "%1" == "tgec" goto TGEC if "%1" == "tgef" goto TGEF echo Your make "option" specification did not match. RETRY... echo. goto INTRO :PVM :PVMEX echo. echo Compiling and installing library (C,Fortran), daemon, tracer, echo console, hoster and groupserver echo ------------------------------------------------------------- cd %PVM_ROOT%\src\ nmake /f makefile.mak cd %PVM_ROOT% echo. echo Compiling and installing tracer echo ------------------------------- cd %PVM_ROOT%\tracer\ nmake /f makefile.mak cd %PVM_ROOT% echo. echo Compiling and installing pvm echo ---------------------------- cd %PVM_ROOT%\console\ nmake /f makefile.mak cd %PVM_ROOT% echo. echo Compiling and installing hoster echo ------------------------------- cd %PVM_ROOT%\hoster\ nmake /f makefile.mak cd %PVM_ROOT% echo. echo Compiling and installing pvmgs echo ------------------------------ cd %PVM_ROOT%\pvmgs\ nmake /f makefile.mak cd %PVM_ROOT% echo. echo Compiling and installing libfpvm echo -------------------------------- cd %PVM_ROOT%\libfpvm\ nmake /f makefile.mak cd %PVM_ROOT% echo. echo More Information in Readme.win32 echo. if "%1" == "pvm" goto ENDE :CEXAMPLES cd %PVM_ROOT%\examples echo. echo Building C examples echo ------------------- nmake /f makefile.mak c-all cd %PVM_ROOT% if "%1" == "ec" goto ENDE :FEXAMPLES echo. echo Building Fortran examples echo ------------------------- cd %PVM_ROOT%\examples nmake /f makefile.mak f-all cd %PVM_ROOT% if "%1" == "ef" goto ENDE :CGEXAMPLES cd %PVM_ROOT%\gexamples echo. echo Building C group examples echo ------------------------- nmake /f makefile.mak c-all cd %PVM_ROOT% if "%1" == "gec" goto ENDE :FGEXAMPLES echo. echo Building Fortran group examples echo ------------------------------- rem skipout here if doing "all" as there is a known rem problem with the fortran group example code if "%1" == "all" goto ENDE rem feel free to let it fail if you really want to try it... cd %PVM_ROOT%\gexamples nmake /f makefile.mak f-all cd %PVM_ROOT% if "%1" == "gef" goto ENDE goto ENDE :TIDY echo. echo Cleaning Execs and Libs ... echo --------------------------- cd %PVM_ROOT%\bin\%PVM_ARCH%\ erase *.exe cd %PVM_ROOT%\tracer\%PVM_ARCH%\ erase *.exe erase *.lib cd %PVM_ROOT%\lib\%PVM_ARCH%\ erase *.lib erase *.exe erase *.dll cd %PVM_ROOT%\libfpvm\%PVM_ARCH%\ erase *.lib erase *.dll cd %PVM_ROOT% :CLEAN echo. echo Cleaning Objects ... echo -------------------- cd %PVM_ROOT%\src\%PVM_ARCH%\ erase *.obj echo. echo Cleaning libfpvm objects ... echo ---------------------------- cd %PVM_ROOT%\libfpvm\%PVM_ARCH% erase *.obj echo. echo Cleaning console objects ... echo ---------------------------- cd %PVM_ROOT%\console\%PVM_ARCH% erase *.obj echo. echo Cleaning hoster objects ... echo --------------------------- cd %PVM_ROOT%\hoster\%PVM_ARCH%\ erase *.obj echo. echo Cleaning pvmgs objects ... echo -------------------------- cd %PVM_ROOT%\pvmgs\%PVM_ARCH%\ erase *.obj echo. echo Cleaning tracer objects ... echo --------------------------- cd %PVM_ROOT%\tracer\%PVM_ARCH%\ erase *.obj echo. echo Cleaning example objects ... echo ---------------------------- cd %PVM_ROOT%\examples\%PVM_ARCH%\ erase *.obj cd %PVM_ROOT%\libfpvm\%PVM_ARCH%\ erase *.ilk erase *.pdb echo. echo Cleaning group example objects ... echo ---------------------------------- cd %PVM_ROOT%\gexamples\%PVM_ARCH%\ erase *.obj cd %PVM_ROOT% goto ENDE :TEC echo. echo Tidy the C examples echo ------------------- cd %PVM_ROOT%\examples nmake /f makefile.mak tidy-c cd %PVM_ROOT% goto ENDE :TEF echo. echo Tidy the Fortran examples echo ------------------------- cd %PVM_ROOT%\examples nmake /f makefile.mak tidy-f cd %PVM_ROOT% goto ENDE :TGEC echo. echo Tidy the C group examples echo ------------------------- cd %PVM_ROOT%\gexamples nmake /f makefile.mak tidy-c cd %PVM_ROOT% goto ENDE :TGEF echo. echo Tidy the Fortran group examples echo ------------------------- cd %PVM_ROOT%\gexamples nmake /f makefile.mak tidy-f cd %PVM_ROOT% goto ENDE :ENDE ./pvm3/console/0000755007401100740110000000000011141631057012215 5ustar kohlkohl./pvm3/console/cmds.c0000644007401100740110000017017611140667617013335 0ustar kohlkohl static char rcsid[] = "$Id: cmds.c,v 1.48 2009/01/30 21:22:23 pvmsrc Exp $"; /* * PVM version 3.4: Parallel Virtual Machine System * University of Tennessee, Knoxville TN. * Oak Ridge National Laboratory, Oak Ridge TN. * Emory University, Atlanta GA. * Authors: J. J. Dongarra, G. E. Fagg, M. Fischer * G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci, * P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam * (C) 1997 All Rights Reserved * * NOTICE * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted * provided that the above copyright notice appear in all copies and * that both the copyright notice and this permission notice appear in * supporting documentation. * * Neither the Institutions (Emory University, Oak Ridge National * Laboratory, and University of Tennessee) nor the Authors make any * representations about the suitability of this software for any * purpose. This software is provided ``as is'' without express or * implied warranty. * * PVM version 3 was funded in part by the U.S. Department of Energy, * the National Science Foundation and the State of Tennessee. */ /* * cmds.c * * PVM console commands. * * $Log: cmds.c,v $ * Revision 1.48 2009/01/30 21:22:23 pvmsrc * Fixed up insecure usage of fopen() for creating/writing/appending files. * - replace with open(...O_EXCL...) and fdopen()... * (Spanker=kohl) * * Revision 1.47 2009/01/29 20:57:14 pvmsrc * Replaced use of PVMTMPNAM() and temporary files for auto-diagnostics... * - just use popen() instead, no file race security holes... :-D * (Spanker=kohl) * * Revision 1.46 2006/08/15 15:03:57 pvmsrc * Extended help text for host add commands... * - make note of host option tags... * (Spanker=kohl) * * Revision 1.45 2004/01/14 18:46:20 pvmsrc * Added new AIX5* arches. * (Spanker=kohl) * * Revision 1.44 2001/09/26 23:37:22 pvmsrc * Made hd_vmid additions to hostd mirror struct... * - don't know if this is really necessary, but wtf. * (Spanker=kohl) * * Revision 1.43 2001/09/25 21:18:13 pvmsrc * Minor TMPNAMFUN()/tmpnam() cleanup. * - moved macro def to pvm3.h, renamed PVMTNPMAN(). * - same for LEN_OF_TMP_NAM -> PVMTMPNAMLEN. * - mostly a huge waste of time, since *both* tmpnam() & mktemp() * produce the same "dangerous" warning message in Linux/gcc... * - damn. * (Spanker=kohl) * * Revision 1.42 2001/08/17 20:18:32 pvmsrc * Added --host= option to spawn command. * - allows passing IP address in place of host name. * - used gnu-like syntax at Paul Gray's suggestion... :-) * (Spanker=kohl) * * Revision 1.41 2001/07/30 17:46:08 pvmsrc * O.K., Paul's bug was legit. Some goofy (Mandrake) Linux passes * stderr back through rsh... * - weed out lines with stuff like "/bin/ls: ... No such file..." * (Spanker=kohl) * * Revision 1.40 2001/07/30 16:52:00 pvmsrc * Minor cleanup to auto-diag routine... * - slightly more solid checking for leftover /tmp/pvmd.* files. * - inspired by a pseudo-bug report from Paul Gray, could be bogus... * :-) * (Spanker=kohl) * * Revision 1.39 2001/07/30 16:02:31 pvmsrc * epm -> csm... * (Spanker=kohl) * * Revision 1.38 2001/04/23 14:41:41 pvmsrc * Tweaked spawn_cmd() parsing to allow -:wd working directory spec. * - i.e. without a host or arch specified... * - fixed help spawn text. * (Spanker=kohl) * * Revision 1.37 2001/02/02 17:05:50 pvmsrc * Fixed typo in Win32 diagnostic message output. * (Spanker=kohl) * * Revision 1.36 2000/03/29 20:01:40 pvmsrc * Stoopid typo... :-Q * (Spanker=kohl) * * Revision 1.35 2000/02/18 22:01:42 pvmsrc * Cleaned up Windows side of diagnose_cant_start_pvm()... * - lose any '\r' at end of rsh output. * - use "chdir" instead of "pwd" for Windows O.S. check. * - minor typos... * (Spanker=kohl) * * Revision 1.34 2000/02/15 18:06:20 pvmsrc * Modified jobs_cmd() to dump task ids for traced jobs... * - can't use output buffers, must use TRC_ID->tevtask_list list. * - snagged necessary state constants from trclib.h, can't just * #include it, as it #includes fricking everything... :-Q * (Spanker=kohl) * * Revision 1.33 2000/02/15 17:06:42 pvmsrc * Added new getopt / setopt console commands. * - for setting PVM console task's PVM options (like PvmShowTids). * Fixed debug flags in tickle help. * (Spanker=kohl) * * Revision 1.32 2000/02/14 20:30:59 pvmsrc * Lose #define-d RSHCOMMAND usage. * - use new pvmgetrsh() routine, which checks for PVM_RSH or else * uses old RSHCOMMAND interface. * (Spanker=kohl) * * Revision 1.31 2000/02/10 22:17:38 pvmsrc * Cleaned up diagnose_cant_start_pvmd() test routine a bunch. * - replaced gobs of inline code with new do_rsh_cmd() routine. * - added new check_env_var() routine to sort through extra * garbage in rsh commands when checking env vars... * (Spanker=kohl) * * Revision 1.30 2000/02/10 20:43:37 pvmsrc * Added checking for new PVM_TMP env var on remote host. * - in diagnose_cant_start_pvm()... * - use in place of hard-coded /tmp or \TEMP... * (Spanker=kohl) * * Revision 1.29 2000/01/26 23:34:17 pvmsrc * *** Added Killer Routine of All Time - diagnose_cant_start_pvm() *** * Nearly 800 lines of pure joy! :-D * - on "Can't start pvmd" error, tries to rsh to host and checks * everything from rhosts to $PVM_ROOT to /tmp/pmvd.* crap files. * - should theoretically work on both Unix and Windows machines, * for both Unix and Windows remote hosts (tested for Unix :-). * - with any luck this will cut bug mail in half... yeah right. * (Spanker=kohl) * * Revision 1.28 1999/07/08 18:59:39 kohl * Fixed "Log" keyword placement. * - indent with " * " for new CVS. * * Revision 1.27 1999/06/11 17:27:35 pvmsrc * When breaking up multiline commands into subcommands, * dump out each command as you execute it, along with a fresh prompt. * (Spanker=kohl) * * Revision 1.26 1999/06/10 16:57:16 pvmsrc * Fixed docmd() to handle commands with '\n's in them... * - a la file input redirection, cut & paste, etc. * - break string into individual commands and execute. * (Spanker=kohl) * * Revision 1.25 1999/02/05 20:36:17 pvmsrc * More contributions from Edward Vigmond . * - better readline interface, with command completion & help. * (Spanker=kohl) * * Revision 1.24 1998/11/20 19:43:07 pvmsrc * Changes so that win32 will compile & build. Also, common * source for win32 & unix. * (Spanker=sscott) * * Revision 1.23 1998/01/28 23:03:39 pvmsrc * Fixed tracing bogusness! * - host add / del notifies for tracing were getting scrunched by * console host add notify, etc... * - moved message / notify tag constants to job.h and USED THEM. * - initialized nextjob properly... * - added new "joboffset" global in cons.c for dumping more * reasonable job numbers to user. * (Spanker=kohl) * * Revision 1.22 1997/12/31 22:13:15 pvmsrc * Updated "xpvm" trace mask settings. * (Spanker=kohl) * * Revision 1.21 1997/08/29 16:56:53 pvmsrc * Added TEV_USER_DEFINED to "xpvm" default trace mask settings... * (Spanker=kohl) * * Revision 1.20 1997/07/09 13:21:03 pvmsrc * Fixed Author Header. * * Revision 1.19 1997/05/13 14:37:38 pvmsrc * Changed header file $includes: * - ../src/listmac.h -> listmac.h * - ../src/bfunc.h -> bfunc.h * - use -I$(PVMDIR)/src in Makefile.aimk instead. * * Revision 1.18 1997/05/02 20:18:51 pvmsrc * D-Oh. * * Revision 1.17 1997/05/01 15:41:14 pvmsrc * SGI Compiler Warning Cleanup. * * Revision 1.16 1997/04/30 21:15:35 pvmsrc * SGI Compiler Warning Cleanup. * * Revision 1.15 1997/04/17 12:53:15 pvmsrc * rename of pvm_mboxinfo() to include word "get" * * Revision 1.14 1997/04/10 20:34:35 pvmsrc * "CVS": Modified Files: * Typo... * * Revision 1.13 1997/04/10 20:09:33 pvmsrc * Rewrote names_cmd() for new pvm_mboxinfo() syntax. * - pvm_getnames() is history. * * Revision 1.12 1997/04/09 20:18:13 pvmsrc * Minor fixes (like being able to actually pass args to "reset"... :-). * * Revision 1.11 1997/04/09 19:53:12 pvmsrc * Merged resetinfo_cmd() command into reset_cmd() routine. * - check for args, adjust calling parms to pvmreset()... * * Revision 1.10 1997/04/09 18:31:58 pvmsrc * Added new "resetinfo" command. * - like a reset, but without all the task bloodshed... :-)~ * * Revision 1.9 1997/04/08 17:08:46 pvmsrc * Extracted guts of reset_cmd() routine: * - created new system pvmreset() routine for general usage. * * Revision 1.8 1997/04/01 19:35:44 pvmsrc * Corrected flag to PvmMbox... * * Revision 1.7 1997/04/01 17:04:45 pvmsrc * Updated mbox stuff: * - changed args of pvm_putinfo(). * - renamed pvm_getinfo() (again) -> pvm_recvinfo(), w/ new syntax. * * Revision 1.6 1997/03/27 20:09:51 pvmsrc * Added PvmNoSpawnParent to pvm_spawn() calls in spawn_cmd(). * * Revision 1.5 1997/02/17 16:29:04 pvmsrc * Added checking of pvm_getnoresets() list in reset_cmd(). * * Revision 1.4 1997/01/28 19:13:17 pvmsrc * New Copyright Notice & Authors. * * Revision 1.3 1996/10/24 23:03:39 pvmsrc * Updated to new tracing facilty. * - new trace_cmd() options: * * "xpvm" mask mimick. * * "buf" trace buffer size query & set. * * "opt" trace options query & set. * - new job creation handling for spawn command, * tracing vs. output vs. both... * - installed new trc_print_tmask() library call for trace mask dump. * * Revision 1.2 1996/10/08 18:29:39 pvmsrc * Renamed routines: * - pvm_put() -> pvm_putinfo(). * - pvm_get() -> pvm_getinfo(). * * Revision 1.1 1996/09/23 20:25:35 pvmsrc * Initial revision * * Revision 1.8 1995/11/02 15:11:40 manchek * added to tickle help * * Revision 1.7 1995/09/05 19:06:52 manchek * help text lowercase * * Revision 1.6 1995/07/03 18:59:51 manchek * help text * * Revision 1.5 1995/07/03 18:57:29 manchek * added ps 's' flag, tickle help 100. * ps doesn't print tasks with tid 0 unless -x flag used * * Revision 1.4 1995/05/17 15:26:17 manchek * added "return 0" to lots of commands. * added idump command * * Revision 1.3 1994/10/15 18:38:56 manchek * updated task flags and ps list headers * * Revision 1.2 1994/06/03 20:01:51 manchek * version 3.3.0 * * Revision 1.1 1993/08/30 23:30:32 manchek * Initial revision * */ #include #include #ifdef SYSVSTR #include #else #include #endif #include #include #include #include #include #include "cmd.h" #include "myalloc.h" #include "listmac.h" #include "bfunc.h" #include "job.h" #ifndef WIN32 #include #endif #define PVMERRMSG(n) ((n) <= 0 && (n) > -pvm_nerr \ ? pvm_errlist[-(n)] : "Unknown Error") char *getenv(); void i_dump(); extern char **environ; extern char *pvm_errlist[]; extern int pvm_nerr; extern struct Pvmtevinfo pvmtevinfo[]; extern char *prompt; int add_cmd(); int alias_cmd(); int conf_cmd(); int delete_cmd(); int echo_cmd(); int export_cmd(); int getopt_cmd(); int halt_cmd(); int help_cmd(); int id_cmd(); int idump_cmd(); /* int insert_cmd(); */ int jobs_cmd(); int kill_cmd(); /* int lookup_cmd(); */ int mstat_cmd(); int names_cmd(); int quit_cmd(); int pstat_cmd(); int put_cmd(); /* int remove_cmd(); */ int reset_cmd(); int setenv_cmd(); int setopt_cmd(); int sig_cmd(); int spawn_cmd(); int start_cmd(); int tasks_cmd(); int tickle_cmd(); int trace_cmd(); int unalias_cmd(); int unexport_cmd(); int version_cmd(); extern struct alias *aliases; /* from cons.c */ extern struct pvmhostinfo *hostlist; /* from cons.c */ extern struct job *joblist; /* from job.c */ extern int mytid; /* from cons.c */ extern int narchs; /* from cons.c */ extern int joboffset; /* from cons.c */ extern int nextjob; /* from cons.c */ extern int nhosts; /* from cons.c */ struct cmdsw commands[] = { { "add", 2, 0, add_cmd }, { "alias", 1, 0, alias_cmd }, { "conf", 1, 1, conf_cmd }, { "delete", 2, 0, delete_cmd }, { "echo", 1, 0, echo_cmd }, { "export", 1, 0, export_cmd }, { "getopt", 1, 2, getopt_cmd }, { "halt", 1, 1, halt_cmd }, { "help", 1, 2, help_cmd }, { "id", 1, 1, id_cmd }, { "idump", 1, 2, idump_cmd }, /* { "insert", 4, 4, insert_cmd }, */ { "jobs", 1, 2, jobs_cmd }, { "kill", 2, 0, kill_cmd }, /* { "lookup", 3, 3, lookup_cmd }, */ { "mstat", 2, 0, mstat_cmd }, { "names", 1, 2, names_cmd }, { "ps", 1, 2, tasks_cmd }, { "pstat", 2, 0, pstat_cmd }, { "put", 4, 4, put_cmd }, { "quit", 1, 1, quit_cmd }, /* { "remove", 3, 3, remove_cmd }, */ { "reset", 1, 4, reset_cmd }, { "setenv", 1, 0, setenv_cmd }, { "setopt", 3, 3, setopt_cmd }, { "sig", 3, 0, sig_cmd }, { "spawn", 2, 0, spawn_cmd }, { "trace", 1, 0, trace_cmd }, { "tickle", 2, 11, tickle_cmd }, { "unalias", 2, 0, unalias_cmd }, { "unexport", 1, 0, unexport_cmd }, { "version", 1, 1, version_cmd }, { 0, 0, 0, 0 } }; /* Host descriptor (pieces lifted from pvm3/src/host.h - pvmd stuff) */ struct hostd { int hd_ref; /* num refs to this struct */ int hd_hostpart; /* host tid base */ char *hd_name; /* name */ char *hd_arch; /* cpu arch class */ char *hd_login; /* loginname [used master only] */ char *hd_dpath; /* daemon executable */ char *hd_epath; /* task exec search path */ char *hd_bpath; /* debugger executable */ char *hd_wdir; /* pvmd working dir */ char *hd_sopts; /* hoster options */ int hd_flag; int hd_dsig; /* data signature */ int hd_err; /* error code */ int hd_mtu; /* max snd/rcv length */ /* struct sockaddr_in hd_sad; /^ UDP address/port */ int hd_rxseq; /* expected next seq num from host */ int hd_txseq; /* next tx seq num to host */ /* struct pkt *hd_txq; /^ not-yet-sent packet queue to host */ /* struct pkt *hd_opq; /^ outstanding packets to host */ int hd_nop; /* length of opq */ /* struct pkt *hd_rxq; /^ packet reordering queue from host */ /* struct pmsg *hd_rxm; /^ to-us msg reassembly from host */ /* struct timeval hd_rtt; /^ estd round-trip time to host */ int hd_speed; /* cpu relative speed */ /* struct mca *hd_mcas; /^ from-host mca cache */ char *hd_aname; /* name to use for network address */ char *hd_vmid; /* virtual machine id for host */ }; freealias(ap) struct alias *ap; { LISTDELETE(ap, a_link, a_rlink); MY_FREE(ap->a_name); while (ap->a_num-- > 0) MY_FREE(ap->a_args[ap->a_num]); MY_FREE(ap->a_args); MY_FREE(ap); return 0; } struct alias * newalias(name, num, args) char *name; int num; char **args; { struct alias *ap, *ap2; ap = TALLOC(1, struct alias, "alias"); ap->a_name = STRALLOC(name); ap->a_args = TALLOC(num + 1, char *, "aargs"); ap->a_num = num; while (num-- > 0) ap->a_args[num] = STRALLOC(args[num]); for (ap2 = aliases->a_link; ap2 != aliases; ap2 = ap2->a_link) if (strcmp(ap2->a_name, name) > 0) break; LISTPUTBEFORE(ap2, ap, a_link, a_rlink); return ap; } struct alias * findalias(name) char *name; { struct alias *ap; for (ap = aliases->a_link; ap != aliases; ap = ap->a_link) if (!strcmp(ap->a_name, name)) return ap; return (struct alias*)0; } docmd(cmd) char *cmd; { char *p; struct cmdsw *csp; struct alias *ap; int i; int ac; char *av[128]; int self; char *nextcmd = NULL; int first = 1; /* * check for '\n's in command, separate commands */ nextcmd = cmd; do { /* * look for a newline... */ cmd = nextcmd; while ( *nextcmd != '\0' && *nextcmd != '\n' ) nextcmd++; if ( *nextcmd == '\n' ) { *nextcmd++ = '\0'; if ( !first ) printf( prompt ); else first = 0; printf( "%s\n", cmd ); } /* * parse command */ ac = sizeof(av)/sizeof(av[0]) - 1; if (acav(cmd, &ac, av)) { fputs("command too long\n", stdout); return 0; } if (!ac) return 0; /* * resolve aliases */ for (ap = aliases->a_link; ap != aliases; ap = ap->a_link) ap->a_flag = 0; while (ap = findalias(av[0])) { if (ap->a_flag) { printf("alias loop\n"); return 0; } ap->a_flag = 1; if (ap->a_num > 1) { if (ac + ap->a_num > sizeof(av)/sizeof(av[0])) { fputs("command too long\n", stdout); return 0; } for (i = ac; --i > 0; ) av[i + ap->a_num - 1] = av[i]; ac += ap->a_num - 1; } self = !strcmp(av[0], ap->a_args[0]); for (i = ap->a_num; i-- > 0; ) av[i] = ap->a_args[i]; if (self) break; } /* * find command and call it */ av[ac] = 0; p = av[0]; for (csp = commands; csp->cmd; csp++) { if (!strcmp(csp->cmd, p)) { if (ac >= csp->a1 && (ac <= csp->a2 || !csp->a2)) (csp->fun)(ac, av); else printf("%s: wrong #args\n", p); break; } } if (!csp->cmd) printf("%s: not found\n", p); } while ( *nextcmd != '\0' ); return 0; } /**************** ** Commands ** ** ** ****************/ add_cmd(ac, av) int ac; char **av; { int diagnose = 0; int cc; int *sv; int i; av++; ac--; sv = TALLOC(ac, int, "int"); if ((cc = pvm_addhosts(av, ac, sv)) >= 0) { if (cc > 0) pvm_recv(-1, HostsAddedTag); /* waste the notify message */ printf("%d successful\n", cc); fputs(" HOST DTID\n", stdout); for (i = 0; i < ac; i++) if ((cc = sv[i]) < 0) { printf("%24s %8s\n", av[i], PVMERRMSG(cc)); if (cc == PvmCantStart) diagnose++; } else printf("%24s %8x\n", av[i], cc); /* Try to Further Diagnose "PvmCantStart" Cases... */ /* Otherwise, sure to generate MORE BUG MAIL!!! :-Q */ if ( diagnose ) { printf( "\nAuto-Diagnosing Failed Hosts...\n" ); for (i = 0; i < ac; i++) { if (sv[i] == PvmCantStart) { printf( "%s...\n", av[i] ); diagnose_cant_start_pvm( av[i] ); printf( "\n" ); } } } } MY_FREE(sv); pvm_config(&nhosts, &narchs, &hostlist); return 0; } diagnose_cant_start_pvm( hostline ) char *hostline; { FILE *fp; #ifndef WIN32 struct passwd *pw; #endif struct hostd hp; struct stat statck; char lhost[1024]; char pvmarch[1024]; char pvmroot[1024]; char pvmtmp[1024]; char result[1024]; char result2[1024]; char tcmd[1024]; char tmp[255]; char user[1024]; int remote_os = -1; int len; int i; /* Extract Raw Host Name from Add Command */ if ( parsehost(hostline, &hp) < 0 ) { printf( "Error Parsing Host String!\n" ); printf( "Cannot Auto-Diagnose!\n" ); return( 0 ); } /* Get Local Hostname */ gethostname( lhost, 1024 ); /* Get Local User */ #ifndef WIN32 if ( (pw = getpwuid( getuid() )) != NULL ) strcpy( user, pw->pw_name ); else strcpy( user, "" ); #else strcpy( user, MyGetUserName() ); #endif /* Ping / Timeout Test */ /* * Maybe later - for now rsh returns "Connection timed out" * printf( "Pinging Host \"%s\"...\n", hp.hd_name ); sprintf( tcmd, "ping -c 1 %s 1>%s 2>&1", hp.hd_name, tfile ); system( tcmd ); fp = fopen( tfile, "r" ); if ( fp != NULL ) { while ( fgets( result, 1024, fp ) != NULL ) { printf( "%s\n", result ); } fclose( fp ); } else printf( "Ping Command Failed - Test Skipped...\n" ); unlink( tfile ); */ /* Verify Rsh Path */ printf( "Verifying Local Path to \"rsh\"...\n" ); strcpy( tcmd, pvmgetrsh() ); if ( stat( tcmd, &statck ) < 0 ) { printf( "\nError - File %s Not Found!\n", tcmd ); #ifndef WIN32 printf( "Use \"whereis rsh\" or \"which rsh\" to determine\n" ); printf( "where \"rsh\" is on your system and modify the\n" ); printf( "$PVM_ROOT/conf/$PVM_ARCH.def configuration file\n" ); #else printf( "Determine the path to the \"rsh\" command on your\n" ); printf( "system, and edit %PVM_ROOT%\\conf\\WIN32.def\n" ); #endif printf( "to adjust the path for the -DRSHCOMMAND=\\\"\\\"\n" ); printf( "flag. Then recompile PVM and your applications.\n" ); return( 0 ); } else printf( "Rsh found in %s - O.K.\n", tcmd ); /* Rsh Test */ if ( do_rsh_cmd( &hp, "Testing Rsh/Rhosts Access to", "echo YES", result, 1024 ) ) { /* check result */ if ( !strncmp( result, "YES", 3 ) ) printf( "Rsh/Rhosts Access is O.K.\n" ); else { printf( "\nRsh/Rhosts Access FAILED - \"%s\"\n", result ); printf( "Make sure host %s is up and connected to\n", hp.hd_name ); printf( "a network and check its DNS / IP address.\n" ); printf( "Also verify that %s is allowed\n", lhost ); printf( "rsh access on %s\n", hp.hd_name ); printf( "Add this line to the $HOME/.rhosts on %s:\n", hp.hd_name ); printf( "%s %s\n", lhost, user ); return( 0 ); } } else return( 0 ); /* Is Remote Host O.S. Windows or Unix? */ if ( do_rsh_cmd( &hp, "Checking O.S. Type (Unix test) on", "pwd", result, 1024 ) ) { /* Unix-land */ if ( result[0] == '/' ) { printf( "Host %s is Unix-based.\n", hp.hd_name ); remote_os = 0; } else if ( do_rsh_cmd( &hp, "Checking O.S. Type (Win test) on", "chdir", result2, 1024 ) ) { /* Windows-land */ len = strlen( result2 ); if ( len >= 3 && result2[0] >= 'A' && result2[0] <= 'Z' && result2[1] == ':' && result2[2] == '\\' ) { printf( "Host %s is Windows-based.\n", hp.hd_name ); remote_os = 1; } /* Hmmm... Go Figure. */ else { len = strlen( result ); for ( i=0 ; i < len - 1 && remote_os < 0 ; i++ ) { if ( result[i] == '/' ) { printf( "Assuming Host %s to be Unix-based.\n", hp.hd_name ); remote_os = 0; } else if ( result[0] == '\\' ) { printf( "Assuming Host %s to be Windows-based.\n", hp.hd_name ); remote_os = 1; } } if ( remote_os < 0 ) { len = strlen( result2 ); if ( !len ) { printf( "Assuming Host %s to be Unix-based.\n", hp.hd_name ); remote_os = 0; } else { for ( i=0 ; i < len - 1 && remote_os < 0 ; i++ ) { if ( result2[i] == '/' ) { printf( "Assuming Host %s to be Unix-based.\n", hp.hd_name ); remote_os = 0; } else if ( result2[0] == '\\' ) { printf( "Assuming Host %s to be Windows-based.\n", hp.hd_name ); remote_os = 1; } } } } if ( remote_os < 0 ) { printf( "Error - Cannot Determine Remote O.S.!\n" ); printf( "Can't Auto-Diagnose.\n" ); return( 0 ); } } } } else return( 0 ); /* PVM_ROOT Test */ if ( do_rsh_cmd( &hp, ( remote_os == 0 ) ? "Checking $PVM_ROOT on" : "Checking %PVM_ROOT% on", ( remote_os == 0 ) ? "echo $PVM_ROOT" : "echo %PVM_ROOT%", result, 1024 ) ) { /* check for undefined variable (Unix) */ if ( remote_os == 0 && !check_env_var( "PVM_ROOT", result ) ) { printf( "\nThe $PVM_ROOT Environment Variable is Not Set!\n" ); printf( "Use one of the shell *.stub files in\n" ); printf( "the pvm3/lib directory to set up the\n" ); printf( "PVM environment on host %s.\n", hp.hd_name ); return( 0 ); } /* check for undefined variable (Windows) */ else if ( remote_os == 1 && !strncmp( result, "ECHO", 4 ) ) { printf( "\nThe %%PVM_ROOT%% Environment Variable is Not Set!\n" ); printf( "Check your PVM installation on host %s or\n", hp.hd_name ); printf( "set the %%PVM_ROOT%% environment variable\n" ); printf( "in the C:\\AUTOEXEC.BAT file to point to\n" ); printf( "PVM3.4 directory:\n" ); printf( "set PVM_ROOT = C:\\PVM3.4\n" ); return( 0 ); } /* check for bogus relative path (Unix) */ else if ( remote_os == 0 && result[0] != '/' ) { printf( "\nThe value of the $PVM_ROOT environment\n" ); printf( "variable on %s is invalid (\"%s\").\n", hp.hd_name, result ); printf( "Use the absolute path to the pvm3/ directory.\n" ); return( 0 ); } /* check for bogus relative path (Windows) */ else if ( remote_os == 1 && ( result[1] != ':' || result[2] != '\\' ) ) { printf( "\nThe value of the %%PVM_ROOT%% environment\n" ); printf( "variable on %s is invalid (\"%s\").\n", hp.hd_name, result ); printf( "Use the absolute path to the PVM3.4 directory.\n" ); return( 0 ); } /* appears to be O.K., fall through to next test */ else { strcpy( pvmroot, result ); printf( "%sPVM_ROOT%s on %s Appears O.K. (\"%s\")\n", ( remote_os == 0 ) ? "$" : "%", ( remote_os == 0 ) ? "" : "%", hp.hd_name, pvmroot ); } } else return( 0 ); /* Pvmd Script Existence Test (a.k.a. $PVM_ROOT Validity Test) */ if ( do_rsh_cmd( &hp, "Verifying Location of PVM Daemon Script on", ( remote_os == 0 ) ? "\\ls $PVM_ROOT/lib/pvmd" : "dir /B /L %PVM_ROOT%\\lib\\pvmd.bat", result, 1024 ) ) { /* expected pvmd script path */ if ( remote_os == 0 ) sprintf( tmp, "%s/lib/pvmd", pvmroot ); else sprintf( tmp, "pvmd.bat" ); /* check existence of pvmd script */ if ( strcmp( result, tmp ) ) { printf( "\nPVM Daemon Script \"%s\"\n", tmp ); printf( "Was Not Found on %s\n", hp.hd_name ); printf( "Please check the setting of %sPVM_ROOT%s...\n", ( remote_os == 0 ) ? "$" : "%", ( remote_os == 0 ) ? "" : "%" ); return( 0 ); } else printf( "PVM Daemon Script Found (\"%s\")\n", tmp ); } else return( 0 ); /* Determine Remote Host Architecture */ if ( do_rsh_cmd( &hp, "Determining PVM Architecture on", ( remote_os == 0 ) ? "echo $PVM_ARCH" : "echo %PVM_ARCH%", result, 1024 ) ) { /* check for undefined variable */ if ( ( remote_os == 0 && check_env_var( "PVM_ARCH", result ) ) || ( remote_os == 1 && strncmp( result, "ECHO", 4 ) ) ) { printf( "%sPVM_ARCH%s on %s set to %s\n", ( remote_os == 0 ) ? "$" : "%", ( remote_os == 0 ) ? "" : "%", hp.hd_name, result ); strcpy( pvmarch, result ); } else { printf( "%sPVM_ARCH%s not set on %s\n", ( remote_os == 0 ) ? "$" : "%", ( remote_os == 0 ) ? "" : "%", hp.hd_name ); if ( remote_os == 1 ) { printf( "Assuming WIN32.\n" ); strcpy( pvmarch, "WIN32" ); } else pvmarch[0] = '\0'; } } else return( 0 ); /* Manually Determine Remote Host Architecture (Unix Only) */ if ( remote_os == 0 && pvmarch[0] == '\0' ) { if ( do_rsh_cmd( &hp, "Manually Determining PVM Architecture on", "$PVM_ROOT/lib/pvmgetarch", result, 1024 ) ) { len = strlen( result ); /* sanity check */ if ( len > 1 ) { printf( "$PVM_ARCH for %s is %s.\n", hp.hd_name, result ); strcpy( pvmarch, result ); } else { printf( "Could Not Determine $PVM_ARCH.\n" ); printf( "Can't Further Auto-Diagnose.\n" ); return( 0 ); } } else return( 0 ); } /* Existence of pvmd3 Executable? */ if ( remote_os == 0 ) sprintf( tmp, "\\ls $PVM_ROOT/lib/%s/pvmd3", pvmarch ); else sprintf( tmp, "dir /B /L %%PVM_ROOT%%\\lib\\%s\\pvmd3.exe", pvmarch ); if ( do_rsh_cmd( &hp, "Verifying Existence of PVM Daemon Executable on", tmp, result, 1024 ) ) { /* expected pvmd executable path */ if ( remote_os == 0 ) sprintf( tmp, "%s/lib/%s/pvmd3", pvmroot, pvmarch ); else sprintf( tmp, "pvmd3.exe" ); /* check existence of pvmd executable */ if ( strcmp( result, tmp ) ) { printf( "\nPVM Daemon Executable \"%s\"\n", tmp ); printf( "Was Not Found on %s!\n", hp.hd_name ); printf( "Has PVM been compiled there?\n" ); return( 0 ); } else printf( "PVM Daemon Executable Found (\"%s\")\n", tmp ); } else return( 0 ); /* Determine Remote Host Temp Directory (if set) */ if ( do_rsh_cmd( &hp, "Determining PVM Temporary Directory on", ( remote_os == 0 ) ? "echo $PVM_TMP" : "echo %PVM_TMP%", result, 1024 ) ) { /* check for undefined variable */ if ( ( remote_os == 0 && check_env_var( "PVM_TMP", result ) ) || ( remote_os == 1 && strncmp( result, "ECHO", 4 ) ) ) { printf( "%sPVM_TMP%s on %s set to %s\n", ( remote_os == 0 ) ? "$" : "%", ( remote_os == 0 ) ? "" : "%", hp.hd_name, result ); strcpy( pvmtmp, result ); } else { printf( "%sPVM_TMP%s not set on %s\n", ( remote_os == 0 ) ? "$" : "%", ( remote_os == 0 ) ? "" : "%", hp.hd_name ); if ( remote_os == 1 ) { printf( "Assuming C:\\TEMP.\n" ); strcpy( pvmtmp, "C:\\TEMP" ); } else { printf( "Assuming /tmp.\n" ); strcpy( pvmtmp, "/tmp" ); } } } else return( 0 ); /* Pvmd Already Running There / Leftover Pvmd Files? */ if ( remote_os == 0 ) sprintf( tmp, "\\ls -l %s/pvmd.* | grep %s", pvmtmp, ( hp.hd_login != NULL ) ? hp.hd_login : user ); else /* should really also check %TEMP% */ sprintf( tmp, "dir /B /L %s\\pvmd.%s", pvmtmp, ( hp.hd_login != NULL ) ? hp.hd_login : user ); if ( do_rsh_cmd( &hp, "Checking for Leftover PVM Daemon Files on", tmp, result, 1024 ) ) { len = strlen( result ); /* Find Any? (Unix) */ if ( remote_os == 0 ) { /* search for a '/pvmd', if found assume a hit */ for ( i=0 ; i < len - 1 ; i++ ) { /* bail out if "/bin/ls: ... No such file..." */ if ( !strncmp( result + i, "ls:", 3 ) ) break; else if ( !strncmp( result + i, "/pvmd.", 6 ) ) { printf( "\nPVM Daemon Files Found on %s!\n", hp.hd_name ); printf( "PVM Could Already Be Running or else it\n" ); printf( "crashed and left behind a %s/pvmd.\n", pvmtmp ); printf( "daemon file.\n" ); printf( "Halt PVM if it is running on %s, or else\n", hp.hd_name ); printf( "remove any leftover %s/pvmd.* files.\n", pvmtmp ); return( 0 ); } } printf( "No PVM Daemon Files Found.\n" ); } /* Find Any? (Windows) */ else if ( remote_os == 1 && !strncmp( result, "pvmd", 4 ) ) { printf( "\nPVM Daemon Files Found on %s!\n", hp.hd_name ); printf( "Either PVM is Already Running or else it\n" ); printf( "crashed and left behind a \\TEMP\\pvmd.%s\n", ( hp.hd_login != NULL ) ? hp.hd_login : user ); printf( "daemon file.\n" ); printf( "Halt PVM if it is running on %s, or else\n", hp.hd_name ); printf( "remove any leftover \\TEMP\\pvmd.* files.\n" ); return( 0 ); } /* No Pvmd Files, O.K.? */ else printf( "No PVM Daemon Files Found.\n" ); } else return( 0 ); /* Hmmm... Must Be O.K. (ha ha ha) */ printf( "\nHost %s Appears to Be Correctly Configured.\n", hp.hd_name ); #ifndef WIN32 printf( "Please check your local %s/pvml.%d log file\n", pvmgettmp(), getuid() ); #else printf( "Please check your local %s\\pvml.%s log file\n", pvmgettmp(), user ); #endif printf( "for error messages, or else email \"%s\" for\n", "pvm@msr.csm.ornl.gov" ); printf( "further assistance.\n" ); return( 1 ); } do_rsh_cmd( hp, label, cmd, result, rsize ) struct hostd *hp; char *label; char *cmd; char *result; int rsize; { FILE *fp; char tcmd[1024]; char tmp[255]; int ret = 1; int len; /* Dump Test Label */ printf( "%s Host \"%s\"...\n", label, hp->hd_name ); /* Construct Rsh Command */ sprintf( tcmd, "%s ", pvmgetrsh() ); if ( hp->hd_login != NULL ) { sprintf( tmp, "-l %s ", hp->hd_login ); strcat( tcmd, tmp ); } sprintf( tmp, "%s '%s' ", hp->hd_name, cmd ); strcat( tcmd, tmp ); #ifndef WIN32 sprintf( tmp, "2>&1" ); strcat( tcmd, tmp ); #endif /* Collect Rsh Command Results */ fp = popen( tcmd, "r" ); if ( fp != NULL ) { if ( fgets( result, rsize, fp ) != NULL ) { /* strip off '\n' */ len = strlen( result ); if ( len > 0 && result[ len - 1 ] == '\n' ) result[ len - 1 ] = '\0'; /* strip off any '\r' */ len = strlen( result ); if ( len > 0 && result[ len - 1 ] == '\r' ) result[ len - 1 ] = '\0'; } else { printf( "Error Parsing Output - Can't Auto-Diagnose.\n" ); ret = 0; } pclose( fp ); } else { printf( "Rsh Command Failed - Check Your Execution Path!\n" ); ret = 0; } return( ret ); } check_env_var( name, result ) char *name; char *result; { char *ptr; int nlen = strlen( name ); /* Standard "FOO - Undefined variable" Response? */ if ( !strncmp( result, name, nlen ) ) return( 0 ); /* Check for preceding garbage before standard response */ ptr = result + 1; while ( *ptr != '\0' && strlen( ptr ) >= nlen ) { if ( !strncmp( ptr, name, nlen ) ) return( 0 ); ptr++; } /* Look for "[Uu]ndefined" in result... */ ptr = result; while ( *ptr != '\0' && strlen( ptr ) >= 9 ) { if ( !strncmp( ptr, "Undefined", nlen ) || !strncmp( ptr, "undefined", nlen ) ) return( 0 ); ptr++; } /* Must Be O.K. */ return( 1 ); } /* parsehost() * * Parse hostfile line into hostd. * (lifted from pvm3/src/host.c - pvmd code... hacked a little :-) */ int parsehost(buf, hp) char *buf; struct hostd *hp; { char *av[10]; /* parsed words */ int ac; int err = 0; ac = sizeof(av)/sizeof(av[0]); if (acav(buf, &ac, av)) { printf("parsehost(): line too long\n"); goto bad; } if (!ac) goto bad; /* Initialize Host Struct Fields */ hp->hd_name = (char *) NULL; hp->hd_arch = (char *) NULL; hp->hd_login = (char *) NULL; hp->hd_dpath = (char *) NULL; hp->hd_epath = (char *) NULL; hp->hd_bpath = (char *) NULL; hp->hd_wdir = (char *) NULL; hp->hd_sopts = (char *) NULL; hp->hd_vmid = (char *) NULL; /* add options to host descriptor */ while (--ac > 0) { if (!strncmp(av[ac], "lo=", 3)) { if (hp->hd_login) MY_FREE(hp->hd_login); hp->hd_login = STRALLOC(av[ac] + 3); continue; } if (!strncmp(av[ac], "dx=", 3)) { if (hp->hd_dpath) MY_FREE(hp->hd_dpath); hp->hd_dpath = STRALLOC(av[ac] + 3); continue; } if (!strncmp(av[ac], "ep=", 3)) { if (hp->hd_epath) MY_FREE(hp->hd_epath); hp->hd_epath = STRALLOC(av[ac] + 3); continue; } if (!strncmp(av[ac], "sp=", 3)) { hp->hd_speed = atoi(av[ac] + 3); /* hp->hd_flag |= HF_SPEED; */ continue; } if (!strncmp(av[ac], "bx=", 3)) { if (hp->hd_bpath) MY_FREE(hp->hd_bpath); hp->hd_bpath = STRALLOC(av[ac] + 3); continue; } if (!strncmp(av[ac], "wd=", 3)) { if (hp->hd_wdir) MY_FREE(hp->hd_wdir); hp->hd_wdir = STRALLOC(av[ac] + 3); continue; } if (!strncmp(av[ac], "so=", 3)) { if (hp->hd_sopts) MY_FREE(hp->hd_sopts); hp->hd_sopts = STRALLOC(av[ac] + 3); continue; } if (!strncmp(av[ac], "ip=", 3)) { if (hp->hd_aname) MY_FREE(hp->hd_aname); hp->hd_aname = STRALLOC(av[ac] + 3); continue; } if (!strncmp(av[ac], "id=", 3)) { if (hp->hd_vmid) MY_FREE(hp->hd_vmid); hp->hd_vmid = STRALLOC(av[ac] + 3); continue; } printf("parsehost(): unknown option \"%s\"\n", av[ac]); err++; } if (err) goto bad; if (hp->hd_name) MY_FREE(hp->hd_name); hp->hd_name = STRALLOC(av[0]); return 0; bad: return -1; } alias_cmd(ac, av) int ac; char **av; { struct alias *ap; char *p; int i; if (ac < 3) { for (ap = aliases->a_link; ap != aliases; ap = ap->a_link) { fputs(ap->a_name, stdout); p = "\t"; for (i = 0; i < ap->a_num; i++) { printf("%s%s", p, ap->a_args[i]); p = " "; } fputs("\n", stdout); } } else { if (ap = findalias(av[1])) freealias(ap); newalias(av[1], ac - 2, av + 2); } return 0; } conf_cmd(ac, av) int ac; char **av; { int i; ac = ac; av = av; if (!pvm_config(&nhosts, &narchs, &hostlist)) { printf("%d host%s, %d data format%s\n", nhosts, (nhosts > 1 ? "s" : ""), narchs, (narchs > 1 ? "s" : "")); fputs(" HOST DTID ARCH SPEED DSIG\n", stdout); for (i = 0; i < nhosts; i++) printf("%24s %8x %8s%8d 0x%08x\n", hostlist[i].hi_name, hostlist[i].hi_tid, hostlist[i].hi_arch, hostlist[i].hi_speed, hostlist[i].hi_dsig); } return 0; } delete_cmd(ac, av) int ac; char **av; { int cc; int i; int *sv; av++; ac--; sv = TALLOC(ac, int, "int"); if ((cc = pvm_delhosts(av, ac, sv)) >= 0) { printf("%d successful\n", cc); fputs(" HOST STATUS\n", stdout); for (i = 0; i < ac; i++) { printf("%24s ", av[i]); if ((cc = sv[i]) < 0) printf("%8s\n", PVMERRMSG(cc)); else printf("deleted\n"); } } MY_FREE(sv); return 0; } echo_cmd(ac, av) int ac; char **av; { int i; char *p = ""; for (i = 1; i < ac; i++) { printf("%s%s", p, av[i]); p = " "; } printf("\n"); return 0; } halt_cmd(ac, av) int ac; char **av; { ac = ac; av = av; if (!pvm_halt()) { pvmendtask(); exit(0); } return 0; } char *helptx[] = { "add add Add hosts to virtual machine", "add Syntax: add hostname ...", "add or add 'hostname