ADMB Documentation  11.1.1631
 All Classes Files Functions Variables Typedefs Friends Defines
pvm3bor.h
Go to the documentation of this file.
00001 /*
00002  * $Id: pvm3bor.h 1112 2013-07-12 21:41:41Z johnoel $
00003  *
00004  * Author: David Fournier
00005  * Copyright (c) 2008-2012 Regents of the University of California
00006  *
00007  * ADModelbuilder and associated libraries and documentations are
00008  * provided under the general terms of the "BSD" license.
00009  *
00010  * License:
00011  *
00012  * Redistribution and use in source and binary forms, with or without
00013  * modification, are permitted provided that the following conditions are
00014  * met:
00015  *
00016  * 1. Redistributions of source code must retain the above copyright
00017  * notice, this list of conditions and the following disclaimer.
00018  *
00019  * 2.  Redistributions in binary form must reproduce the above copyright
00020  * notice, this list of conditions and the following disclaimer in the
00021  * documentation and/or other materials provided with the distribution.
00022  *
00023  * 3.  Neither the name of the  University of California, Otter Research,
00024  * nor the ADMB Foundation nor the names of its contributors may be used
00025  * to endorse or promote products derived from this software without
00026  * specific prior written permission.
00027  *
00028  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00029  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00030  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00031  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
00032  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00033  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00034  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00035  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00036  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00037  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00038  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00039  *
00040  */
00045 #if !defined(__BORLANDC__)
00046 #  define ADDLL __declspec(dllexport)
00047 //#  define ADDLL __declspec(dllexport) __stdcall
00048 #else
00049 #  define ADDLL
00050 //#  define ADDLL __stdcall
00051 #endif
00052 #define WIN32
00053 /* $Id: pvm3bor.h 1112 2013-07-12 21:41:41Z johnoel $ */
00054 
00055 /*
00056  *         PVM version 3.4:  Parallel Virtual Machine System
00057  *               University of Tennessee, Knoxville TN.
00058  *           Oak Ridge National Laboratory, Oak Ridge TN.
00059  *                   Emory University, Atlanta GA.
00060  *      Authors:  J. J. Dongarra, G. E. Fagg, M. Fischer
00061  *          G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci,
00062  *         P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam
00063  *                   (C) 1997 All Rights Reserved
00064  *
00065  *                              NOTICE
00066  *
00067  * Permission to use, copy, modify, and distribute this software and
00068  * its documentation for any purpose and without fee is hereby granted
00069  * provided that the above copyright notice appear in all copies and
00070  * that both the copyright notice and this permission notice appear in
00071  * supporting documentation.
00072  *
00073  * Neither the Institutions (Emory University, Oak Ridge National
00074  * Laboratory, and University of Tennessee) nor the Authors make any
00075  * representations about the suitability of this software for any
00076  * purpose.  This software is provided ``as is'' without express or
00077  * implied warranty.
00078  *
00079  * PVM version 3 was funded in part by the U.S. Department of Energy,
00080  * the National Science Foundation and the State of Tennessee.
00081  */
00082 
00083 /*
00084  *  pvm3.h
00085  *
00086  *  Libpvm3 includes.
00087  *
00088  * $Log: pvm3.h,v $
00089  * Revision 1.46  2000/02/16 22:50:01  pvmsrc
00090  * Upped version to 3.4.3 so I don't forget later.
00091  * (Spanker=kohl)
00092  *
00093  * Revision 1.45  2000/02/10 23:53:09  pvmsrc
00094  * Added new PvmIPLoopback error code.
00095  *  - Master Host IP Address tied to Loopback.
00096  * (Spanker=kohl)
00097  *
00098  * Revision 1.44  1999/11/08 17:21:32  pvmsrc
00099  * Added PvmMboxDirectIndex stuff:
00100  *  - PvmMboxMaxFlag: capped regular flags to squeeze in direct index...
00101  *  - PvmMboxDirectIndexShift: # of bits to shift index in flags
00102  *  - PvmMboxMaxDirectIndex: max direct index value, for error checking
00103  *  - PvmMboxDirectIndex(): macro to convert direct index into flag bits
00104  *  - PvmMboxDirectIndexOf(): macro to decode direct index from flags
00105  * (Spanker=kohl)
00106  *
00107  * Revision 1.43  1999/10/27 18:48:40  pvmsrc
00108  * Fixed (yet again) the prototype for pvm_recvf().
00109  *  - hopefully got it right this time...  :-Q
00110  * (Spanker=kohl)
00111  *
00112  * Revision 1.42  1999/10/22 13:34:55  pvmsrc
00113  * Fixed prototype for pvm_recvf().
00114  *  - reported by "Ed D'Azevedo" <efdazedo@alcor.epm.ornl.gov>.
00115  * (Spanker=kohl)
00116  *
00117  * Revision 1.41  1999/10/18 21:22:00  pvmsrc
00118  * Added function prototypes for:
00119  *  - pvm_pkmesg(), pvm_pkmesgbody(), pvm_upkmesg().
00120  * (Spanker=kohl)
00121  *
00122  * Revision 1.40  1999/08/19 16:07:14  pvmsrc
00123  * Upped version to 3.4.2.
00124  * (Spanker=kohl)
00125  *
00126  * Revision 1.39  1999/07/08 18:59:47  kohl
00127  * Fixed "Log" keyword placement.
00128  *  - indent with " * " for new CVS.
00129  *
00130  * Revision 1.38  1999/06/07 20:06:53  pvmsrc
00131  * Upped version to 3.4.1.
00132  * (Spanker=kohl)
00133  *
00134  * Revision 1.37  1999/03/03  19:00:36  pvmsrc
00135  * Added new define PVM_PATCH_VERSION.
00136  *  - the "0" in "3.4.0".
00137  *  - to go along with PVM_MAJOR_VERSION & PVM_MINOR_VERSION.
00138  * (Spanker=kohl)
00139  *
00140  * Revision 1.36  1999/01/19  18:02:17  pvmsrc
00141  * Bumped PVM_VER to 3.4.0.
00142  * (Spanker=kohl)
00143  *
00144  * Revision 1.35  1999/01/13  00:03:19  pvmsrc
00145  * Fixed backwards compat.
00146  *  - redefine old pvm_insert/lookup/delete() consts:
00147  *    * PvmNoEntry -> PvmNotFound
00148  *    * PvmDupEntry -> PvmDenied
00149  *  - remove #ifdef PVM33COMPAT...  O.K. in general.
00150  * (Spanker=kohl)
00151  *
00152  * Revision 1.34  1998/08/27  15:17:14  pvmsrc
00153  * Time to bump up to beta 7...
00154  * (Spanker=kohl)
00155  *
00156  * Revision 1.33  1997/12/30  18:15:32  pvmsrc
00157  * Oops...  better skip directly to beta 6 instead of beta 5...
00158  *  - separate WIN32 release is beta 5...
00159  * (Spanker=kohl)
00160  *
00161  * Revision 1.32  1997/12/29  19:53:51  pvmsrc
00162  * Upgraded from beta4 to beta5.
00163  * (Spanker=kohl)
00164  *
00165  * Revision 1.31  1997/09/15  20:54:29  pvmsrc
00166  * Fixed PVM_MAJOR_VERSION and PVM_MINOR_VERSION defines.
00167  *  - VER -> VERSION.
00168  *  - MAJOR = 3, MINOR = 4 (3.4.*).
00169  * (Spanker=kohl)
00170  *
00171  * Revision 1.30  1997/09/02  13:05:37  pvmsrc
00172  * Upgraded PVM_VER to 3.4 beta 4.
00173  * (Spanker=kohl)
00174  *
00175  * Revision 1.29  1997/07/09  13:29:36  pvmsrc
00176  * Fixed Author Header.
00177  *
00178  * Revision 1.28  1997/07/01  17:19:03  pvmsrc
00179  *  The real real beta version number according to Garp.
00180  *
00181  * Revision 1.27  1997/07/01  15:54:35  pvmsrc
00182  * Trying again on the version.
00183  *  - just straight 3.4.0.
00184  *
00185  * Revision 1.26  1997/07/01  14:17:26  pvmsrc
00186  * Set version for beta release to 3.4.1.0.
00187  *
00188  * Revision 1.25  1997/06/26  19:36:22  pvmsrc
00189  *    Added error constant "PvmParentNotSet" so that
00190  *    tc_siblings can get sibling tids even if the spawn flags
00191  *    had parent as PvmNoParent.
00192  *
00193  * Revision 1.24  1997/06/25  19:41:02  pvmsrc
00194  * WIN32 fixes from Markus.
00195  *
00196  * Revision 1.23  1997/06/23  21:08:42  pvmsrc
00197  * Added new error code "PvmHostrNMstr" / -34.
00198  *  - Hoster run on non-master host.
00199  *
00200  * Revision 1.22  1997/06/10  16:38:53  pvmsrc
00201  * Minor text cleanup.
00202  *
00203  * Revision 1.21  1997/05/06  18:58:56  pvmsrc
00204  * Upped version to 3.4.0.16.
00205  *
00206  * Revision 1.20  1997/04/17  12:52:28  pvmsrc
00207  * rename of pvm_mboxinfo() to include word "get"
00208  *
00209  * Revision 1.19  1997/04/10  20:09:57  pvmsrc
00210  * Fixed prototype for pvm_mboxinfo().
00211  *  - pvm_getnames() is history.
00212  *
00213  * Revision 1.18  1997/04/10  19:34:57  pvmsrc
00214  * Added new pvmmboxinfo structure.
00215  *  - for pvm_mboxinfo().
00216  *
00217  * Revision 1.17  1997/04/09  20:21:51  pvmsrc
00218  * Added PvmMboxWaitForInfo/PVMMBOXWAITFORINFO constants.
00219  *
00220  * Revision 1.16  1997/04/07  20:50:48  pvmsrc
00221  * pvm_addmhf() protoglarp set to new parameter interface
00222  *
00223  * Revision 1.15  1997/04/03  18:19:02  pvmsrc
00224  * Added a define for PvmBaseContext - this is 3.3 compatible context.
00225  * codes that don't ever set their context should operate in this context.
00226  *
00227  * Revision 1.14  1997/04/01  16:46:09  pvmsrc
00228  * Fixed protos for pvm_putinfo(), pvm_recvinfo() (formerly pvm_getinfo()).
00229  *
00230  * Revision 1.13  1997/03/31  21:38:05  pvmsrc
00231  * Replaced original mbox constants with new syntax:
00232  *  - gone:  PvmExclusive, PvmFirstAvail, PvmLock, PvmSticky.
00233  *  - new:  PvmMboxDefault, PvmMboxPersistent, PvmMboxMultiInstance,
00234  *    PvmMboxOverWritable, PvmMboxFirstAvail, PvmMboxReadAndDelete.
00235  *  - fortran equivalents.
00236  *  - checked in for sscott.
00237  *
00238  * Revision 1.12  1997/03/26  21:51:55  pvmsrc
00239  * Added "PvmNoSpawnParent" spawn option constant.
00240  *  - PVMNOSPAWNPARENT for Fortran.
00241  *
00242  * Revision 1.11  1997/03/07  14:41:10  pvmsrc
00243  * PVM patches from the base 3.3.10 to 3.3.11 versions where applicable.
00244  * Originals by Bob Manchek. Altered by Graham Fagg where required.
00245  *
00246  * added pvm_export / pvm_unexport to user API.
00247  *
00248  * Revision 1.10  1997/03/04  19:44:11  pvmsrc
00249  * Added system message mailbox class name #defines:
00250  *  - PVMHOSTERCLASS, PVMTASKERCLASS, PVMTRACERCLASS, PVMRMCLASS.
00251  *
00252  * Revision 1.9  1997/02/17  18:47:51  pvmsrc
00253  * Oops...  must pass ptr to tids array for pvm_getnoresets().
00254  *
00255  * Revision 1.8  1997/02/17  16:30:11  pvmsrc
00256  * Added proto for new pvm_getnoresets() routine.
00257  *  - note:  not an official interface routine...
00258  *
00259  * Revision 1.7  1997/02/13  23:12:41  pvmsrc
00260  * Added PVMNORESETCLASS class name for PvmNoReset.
00261  *
00262  * Revision 1.6  1997/02/13  23:05:22  pvmsrc
00263  * Added new PvmNoReset setopt/getopt constant.
00264  *
00265  * Revision 1.5  1997/01/28  19:14:20  pvmsrc
00266  * New Copyright Notice & Authors.
00267  *
00268  * Revision 1.4  1996/10/24  19:33:48  pvmsrc
00269  * Modified for New Tracing Facility:
00270  *  - added user-defined message encoding, PvmDataTrace.
00271  *  - added new option constants:
00272  *    PvmTraceBuffer, PvmTraceOptions,
00273  *    PvmSelfTraceBuffer & PvmSelfTraceOptions,
00274  *  - added PvmTraceFull, PvmTraceTime & PvmTraceCount for trace opts.
00275  *  - added function prototype for new pvm_reg_tracer() routine.
00276  *
00277  * Revision 1.3  1996/10/11  17:01:52  pvmsrc
00278  * Replaced references to pvm_remove() with pvm_delinfo():  renamed.
00279  *
00280  * Revision 1.2  1996/10/08  18:30:30  pvmsrc
00281  * Renamed routines:
00282  *  - pvm_put() -> pvm_putinfo().
00283  *  - pvm_get() -> pvm_getinfo().
00284  *
00285  * Revision 1.1  1996/09/23  21:06:31  pvmsrc
00286  * Initial revision
00287  *
00288  */
00289 
00290 #ifndef _PVM3_H_
00291 
00292 #define _PVM3_H_
00293 
00294 /*
00295 * Release version
00296 */
00297 
00298 #define PVM_VER       "3.4.3"
00299 #define PVM_MAJOR_VERSION 3
00300 #define PVM_MINOR_VERSION 4
00301 #define PVM_PATCH_VERSION 3
00302 
00303 #ifndef WIN32
00304 #include  <sys/time.h>
00305 #else
00306 #include "pvmwin.h"
00307 #include <sys/timeb.h>
00308 #include <time.h>
00309 #endif
00310 
00311 /*
00312 * Data packing styles for pvm_initsend()
00313 */
00314 
00315 #define PvmDataDefault  0 /* XDR encoding */
00316 #define PvmDataRaw    1 /* Raw data copy */
00317 #define PvmDataInPlace  2 /* Raw data, left in place */
00318 #define PvmDataFoo    PvmDataDefault  /* Internal use */
00319 #define PvmDataTrace  4 /* User-Defined Trace Encoding */
00320 
00321 /*
00322 * pvm_spawn options
00323 */
00324 
00325 #define PvmTaskDefault  0
00326 #define PvmTaskHost   1 /* specify host */
00327 #define PvmTaskArch   2 /* specify architecture */
00328 #define PvmTaskDebug  4 /* start task in debugger */
00329 #define PvmTaskTrace  8 /* process generates trace data */
00330 /* for MPP ports */
00331 #define PvmMppFront   16  /* spawn task on service node */
00332 #define PvmHostCompl  32  /* complement host set */
00333 /* for parent-less spawning */
00334 #define PvmNoSpawnParent  64
00335 
00336 /*
00337 * pvm_notify kinds
00338 */
00339 
00340 #define PvmTaskExit   1 /* on task exit */
00341 #define PvmHostDelete 2 /* on host fail/delete */
00342 #define PvmHostAdd    3 /* on host startup */
00343 #define PvmRouteAdd   4 /* new task-task route opened */
00344 #define PvmRouteDelete  5 /* task-task route closed */
00345 
00346 /* flags combined with notify kind */
00347 
00348 #define PvmNotifyCancel 256 /* cancel (complete immediately) notifies */
00349 
00350 /*
00351 * for pvm_setopt and pvm_getopt
00352 */
00353 
00354 #define PvmRoute      1 /* routing policy */
00355 #define   PvmDontRoute    1 /* don't allow direct task-task links */
00356 #define   PvmAllowDirect    2 /* allow direct links, but don't request */
00357 #define   PvmRouteDirect    3 /* request direct links */
00358 #define PvmDebugMask    2 /* debugmask */
00359 #define PvmAutoErr      3 /* auto error reporting */
00360 #define PvmOutputTid    4 /* stdout destination for children */
00361 #define PvmOutputCode   5 /* stdout message tag */
00362 #define PvmTraceTid     6 /* trace destination for children */
00363 #define PvmTraceCode    7 /* trace message tag */
00364 #define PvmTraceBuffer    8 /* trace buffering for children */
00365 #define PvmTraceOptions   9 /* trace options for children */
00366 #define   PvmTraceFull    1 /* do full trace events */
00367 #define   PvmTraceTime    2 /* only do PVM routine timings */
00368 #define   PvmTraceCount   3 /* only do PVM routine profiling */
00369 #define PvmFragSize     10  /* message fragment size */
00370 #define PvmResvTids     11  /* allow reserved message tids and codes */
00371 #define PvmSelfOutputTid  12  /* stdout destination for task */
00372 #define PvmSelfOutputCode 13  /* stdout message tag */
00373 #define PvmSelfTraceTid   14  /* trace destination for task */
00374 #define PvmSelfTraceCode  15  /* trace message tag */
00375 #define PvmSelfTraceBuffer  16  /* trace buffering for task */
00376 #define PvmSelfTraceOptions 17  /* trace options for task */
00377 #define PvmShowTids     18  /* pvm_catchout prints task ids with output */
00378 #define PvmPollType     19  /* shared memory wait method */
00379 #define   PvmPollConstant   1
00380 #define   PvmPollSleep    2
00381 #define PvmPollTime     20  /* time before sleep if PvmPollSleep */
00382 #define PvmOutputContext  21  /* stdout message context */
00383 #define PvmTraceContext   22  /* trace message context */
00384 #define PvmSelfOutputContext  23  /* stdout message context */
00385 #define PvmSelfTraceContext 24  /* trace message context */
00386 #define PvmNoReset      25  /* do not kill task on reset */
00387 
00388 /*
00389 * for pvm_[sg]ettmask
00390 */
00391 
00392 #define PvmTaskSelf   0 /* this task */
00393 #define PvmTaskChild  1 /* (future) child tasks */
00394 
00395 /*
00396 * Need to have PvmBaseContext defined
00397 */
00398 
00399 #define PvmBaseContext  0
00400 
00401 /*
00402 * for message mailbox operations: pvm_putinfo and pvm_recvinfo
00403 */
00404 
00405 #define PvmMboxDefault      0 /* put: single locked instance */
00406                   /* recv: 1st entry */
00407                   /* start w/index=0 */
00408 #define PvmMboxPersistent   1 /* entry remains after owner exit */
00409 #define PvmMboxMultiInstance  2 /* multiple entries in class */
00410 #define PvmMboxOverWritable   4 /* can write over this entry */
00411 #define PvmMboxFirstAvail   8 /* select 1st index >= specified */
00412 #define PvmMboxReadAndDelete  16  /* atomic read / delete */
00413                   /* requires read & delete rights */
00414 #define PvmMboxWaitForInfo    32  /* for blocking recvinfo */
00415 #define PvmMboxMaxFlag      512 /* maximum mbox flag bit value */
00416 
00417 #define PvmMboxDirectIndexShift 10  /* log2(PvmMboxMaxFlag) + 1 */
00418 
00419 #define PvmMboxMaxDirectIndex \
00420   ( (unsigned) 1 << ( 31 - PvmMboxDirectIndexShift ) )
00421 
00422 #define PvmMboxDirectIndexOf( _flags ) \
00423   ( ( (_flags) & \
00424     ( ( PvmMboxMaxDirectIndex - 1 ) << PvmMboxDirectIndexShift ) ) \
00425     >> PvmMboxDirectIndexShift )
00426 
00427 #define PvmMboxDirectIndex( _index ) \
00428   ( ( (_index) >= PvmMboxMaxDirectIndex ) ? \
00429     ( fprintf( stderr, "Mbox Direct Index Too Large: %d >= %d\n", \
00430       (_index), PvmMboxMaxDirectIndex ), 0 ) \
00431     : ( (_index) << PvmMboxDirectIndexShift ) )
00432 
00433 /*
00434 * pre-defined system message mailbox classes
00435 */
00436 
00437 #define PVMNORESETCLASS   "###_PVM_NO_RESET_###"
00438 
00439 #define PVMHOSTERCLASS    "###_PVM_HOSTER_###"
00440 
00441 #define PVMTASKERCLASS    "###_PVM_TASKER_###"
00442 
00443 #define PVMTRACERCLASS    "###_PVM_TRACER_###"
00444 
00445 #define PVMRMCLASS      "###_PVM_RM_###"
00446 
00447 /*
00448 * Libpvm error codes
00449 */
00450 
00451 #define PvmOk     0 /* Success */
00452 #define PvmBadParam   -2  /* Bad parameter */
00453 #define PvmMismatch   -3  /* Parameter mismatch */
00454 #define PvmOverflow   -4  /* Value too large */
00455 #define PvmNoData   -5  /* End of buffer */
00456 #define PvmNoHost   -6  /* No such host */
00457 #define PvmNoFile   -7  /* No such file */
00458 #define PvmDenied   -8  /* Permission denied */
00459 #define PvmNoMem    -10 /* Malloc failed */
00460 #define PvmBadMsg   -12 /* Can't decode message */
00461 #define PvmSysErr   -14 /* Can't contact local daemon */
00462 #define PvmNoBuf    -15 /* No current buffer */
00463 #define PvmNoSuchBuf  -16 /* No such buffer */
00464 #define PvmNullGroup  -17 /* Null group name */
00465 #define PvmDupGroup   -18 /* Already in group */
00466 #define PvmNoGroup    -19 /* No such group */
00467 #define PvmNotInGroup -20 /* Not in group */
00468 #define PvmNoInst   -21 /* No such instance */
00469 #define PvmHostFail   -22 /* Host failed */
00470 #define PvmNoParent   -23 /* No parent task */
00471 #define PvmNotImpl    -24 /* Not implemented */
00472 #define PvmDSysErr    -25 /* Pvmd system error */
00473 #define PvmBadVersion -26 /* Version mismatch */
00474 #define PvmOutOfRes   -27 /* Out of resources */
00475 #define PvmDupHost    -28 /* Duplicate host */
00476 #define PvmCantStart  -29 /* Can't start pvmd */
00477 #define PvmAlready    -30 /* Already in progress */
00478 #define PvmNoTask   -31 /* No such task */
00479 #define PvmNotFound   -32 /* Not Found */
00480 #define PvmExists   -33 /* Already exists */
00481 #define PvmHostrNMstr -34 /* Hoster run on non-master host */
00482 #define PvmParentNotSet -35 /* Spawning parent set PvmNoSpawnParent */
00483 #define PvmIPLoopback -36 /* Master Host's IP is Loopback */
00484 
00485 /*
00486 * crusty error constants from 3.3, now redefined...
00487 */
00488 #define PvmNoEntry    PvmNotFound /* No such entry */
00489 #define PvmDupEntry   PvmDenied /* Duplicate entry */
00490 
00491 /*
00492 * Data types for pvm_reduce(), pvm_psend(), pvm_precv()
00493 */
00494 
00495 #define PVM_STR     0 /* string */
00496 #define PVM_BYTE    1 /* byte */
00497 #define PVM_SHORT   2 /* short */
00498 #define PVM_INT     3 /* int */
00499 #define PVM_FLOAT   4 /* real */
00500 #define PVM_CPLX    5 /* complex */
00501 #define PVM_DOUBLE    6 /* double */
00502 #define PVM_DCPLX   7 /* double complex */
00503 #define PVM_LONG    8 /* long integer */
00504 #define PVM_USHORT    9 /* unsigned short int */
00505 #define PVM_UINT    10  /* unsigned int */
00506 #define PVM_ULONG   11  /* unsigned long int */
00507 
00508 /*
00509 * returned by pvm_config()
00510 */
00511 
00512 struct pvmhostinfo {
00513   int hi_tid;     /* pvmd tid */
00514   char *hi_name;    /* host name */
00515   char *hi_arch;    /* host arch */
00516   int hi_speed;   /* cpu relative speed */
00517   int hi_dsig;    /* data signature */
00518 };
00519 
00520 /*
00521 * returned by pvm_tasks()
00522 */
00523 
00524 struct pvmtaskinfo {
00525   int ti_tid;       /* task id */
00526   int ti_ptid;      /* parent tid */
00527   int ti_host;      /* pvmd tid */
00528   int ti_flag;      /* status flags */
00529   char *ti_a_out;     /* a.out name */
00530   int ti_pid;       /* task (O/S dependent) process id */
00531 };
00532 
00533 /*
00534 * for pvm_getminfo(), pvm_setminfo()
00535 */
00536 
00537 struct pvmminfo {
00538   int len;        /* message length */
00539   int ctx;        /* context */
00540   int tag;        /* tag */
00541   int wid;        /* wait id */
00542   int enc;        /* encoding */
00543   int crc;        /* crc checksum */
00544   int src;        /* source tid */
00545   int dst;        /* destination tid */
00546 };
00547 
00548 /*
00549 * returned by pvm_getmboxinfo()
00550 */
00551 
00552 struct pvmmboxinfo {
00553   char *mi_name;      /* class name */
00554   int mi_nentries;    /* # of entries for this class */
00555   int *mi_indices;    /* mbox entry indices */
00556   int *mi_owners;     /* mbox entry owner tids */
00557   int *mi_flags;      /* mbox entry flags */
00558 };
00559 
00560 #ifdef __ProtoGlarp__
00561 #undef __ProtoGlarp__
00562 #endif
00563 #if defined(__STDC__) || defined(__cplusplus)
00564 #define __ProtoGlarp__(x) x
00565 #else
00566 #define __ProtoGlarp__(x) ()
00567 #endif
00568 
00569 #ifdef __cplusplus
00570 extern "C" {
00571 #endif
00572 
00573 int ADDLL pvm_addhosts  __ProtoGlarp__(( char **, int, int * ));
00574 int ADDLL pvm_addmhf    __ProtoGlarp__(( int, int, int, int (*) (int) ));
00575 int ADDLL pvm_archcode  __ProtoGlarp__(( char * ));
00576 int ADDLL pvm_barrier   __ProtoGlarp__(( char *, int ));
00577 int ADDLL pvm_bcast   __ProtoGlarp__(( char *, int ));
00578 int ADDLL pvm_bufinfo   __ProtoGlarp__(( int, int *, int *, int * ));
00579 #if defined(EOF)
00580 int ADDLL pvm_catchout  __ProtoGlarp__(( FILE * ));
00581 #endif
00582 int ADDLL pvm_config    __ProtoGlarp__(( int *, int *,
00583                     struct pvmhostinfo ** ));
00584 int ADDLL pvm_delhosts  __ProtoGlarp__(( char **, int, int * ));
00585 int ADDLL pvm_delinfo   __ProtoGlarp__(( char *, int, int ));
00586 int ADDLL pvm_delmhf    __ProtoGlarp__(( int ));
00587 int ADDLL pvm_exit    __ProtoGlarp__(( void ));
00588 int ADDLL pvm_export    __ProtoGlarp__(( char * ));
00589 int ADDLL pvm_freebuf   __ProtoGlarp__(( int ));
00590 int ADDLL pvm_freecontext __ProtoGlarp__(( int ));
00591 int ADDLL pvm_gather    __ProtoGlarp__(( void*, void*,
00592                     int, int, int, char*, int));
00593 int ADDLL pvm_getcontext  __ProtoGlarp__(( void ));
00594 int ADDLL pvm_getfds    __ProtoGlarp__(( int ** ));
00595 int ADDLL pvm_getinst   __ProtoGlarp__(( char *, int ));
00596 int ADDLL pvm_getminfo  __ProtoGlarp__(( int, struct pvmminfo * ));
00597 int ADDLL pvm_getnoresets __ProtoGlarp__(( int **, int * ));
00598 int ADDLL pvm_getopt    __ProtoGlarp__(( int ));
00599 int ADDLL pvm_getrbuf   __ProtoGlarp__(( void ));
00600 int ADDLL pvm_getsbuf   __ProtoGlarp__(( void ));
00601 int ADDLL pvm_gettid    __ProtoGlarp__(( char *, int ));
00602 int ADDLL pvm_gsize   __ProtoGlarp__(( char * ));
00603 int ADDLL pvm_halt    __ProtoGlarp__(( void ));
00604 int ADDLL pvm_hostsync  __ProtoGlarp__(( int, struct timeval *,
00605                     struct timeval * ));
00606 int ADDLL pvm_initsend  __ProtoGlarp__(( int ));
00607 int ADDLL pvm_joingroup __ProtoGlarp__(( char * ));
00608 int ADDLL pvm_kill    __ProtoGlarp__(( int ));
00609 int ADDLL pvm_lvgroup   __ProtoGlarp__(( char * ));
00610 int ADDLL pvm_getmboxinfo __ProtoGlarp__(( char *, int *,
00611                     struct pvmmboxinfo ** ));
00612 int ADDLL pvm_mcast   __ProtoGlarp__(( int *, int, int ));
00613 int ADDLL pvm_mkbuf   __ProtoGlarp__(( int ));
00614 int ADDLL pvm_mstat   __ProtoGlarp__(( char * ));
00615 int ADDLL pvm_mytid   __ProtoGlarp__(( void ));
00616 int ADDLL pvm_newcontext  __ProtoGlarp__(( void ));
00617 int ADDLL pvm_notify    __ProtoGlarp__(( int, int,
00618                     int, int * ));
00619 int ADDLL pvm_nrecv   __ProtoGlarp__(( int, int ));
00620 int ADDLL pvm_packf   __ProtoGlarp__(( const char *, ... ));
00621 int ADDLL pvm_parent    __ProtoGlarp__(( void ));
00622 int ADDLL pvm_perror    __ProtoGlarp__(( char * ));
00623 int ADDLL pvm_pkbyte    __ProtoGlarp__(( char *, int, int ));
00624 int ADDLL pvm_pkcplx    __ProtoGlarp__(( float *, int, int ));
00625 int ADDLL  pvm_pkdcplx    __ProtoGlarp__(( double *, int, int ));
00626 int ADDLL  pvm_pkdouble __ProtoGlarp__(( double *, int, int ));
00627 int ADDLL  pvm_pkfloat    __ProtoGlarp__(( float *, int, int ));
00628 int ADDLL  pvm_pkint    __ProtoGlarp__(( int *, int, int ));
00629 int ADDLL  pvm_pklong   __ProtoGlarp__(( long *, int, int ));
00630 int ADDLL  pvm_pkshort    __ProtoGlarp__(( short *, int, int ));
00631 int ADDLL  pvm_pkstr    __ProtoGlarp__(( char * ));
00632 int ADDLL  pvm_pkuint   __ProtoGlarp__(( unsigned int *, int, int ));
00633 int ADDLL  pvm_pkulong    __ProtoGlarp__(( unsigned long *, int, int ));
00634 int ADDLL  pvm_pkushort __ProtoGlarp__(( unsigned short *, int, int ));
00635 int ADDLL  pvm_pkmesg   __ProtoGlarp__(( int ));
00636 int ADDLL  pvm_pkmesgbody __ProtoGlarp__(( int ));
00637 int ADDLL pvm_precv   __ProtoGlarp__(( int, int,
00638                   void *, int, int,
00639                   int *, int *, int * ));
00640 int ADDLL pvm_probe   __ProtoGlarp__(( int, int ));
00641 int ADDLL pvm_psend   __ProtoGlarp__(( int, int,
00642                   void *, int, int ));
00643 int ADDLL pvm_pstat   __ProtoGlarp__(( int ));
00644 int ADDLL pvm_putinfo   __ProtoGlarp__(( char *, int, int ));
00645 int ADDLL pvm_recv    __ProtoGlarp__(( int, int ));
00646 int (*pvm_recvf   __ProtoGlarp__(( int (*)(int, int, int) )) )
00647   __ProtoGlarp__(( int (*)(int, int, int) ));
00648 int ADDLL pvm_recvinfo  __ProtoGlarp__(( char *, int, int ));
00649 int ADDLL pvm_reduce    __ProtoGlarp__(( void (*)(int*, void*, void*, int*, int*),
00650                   void *, int,
00651                   int, int, char *,
00652                   int ));
00653 
00654 /*
00655 * Predefined pvm_reduce functions
00656 */
00657 void PvmMax     __ProtoGlarp__(( int *, void *, void *,
00658                   int *, int * ));
00659 void PvmMin     __ProtoGlarp__(( int *, void *, void *,
00660                   int *, int * ));
00661 void PvmSum     __ProtoGlarp__(( int *, void *, void *,
00662                   int *, int * ));
00663 void PvmProduct   __ProtoGlarp__(( int *, void *, void *,
00664                   int *, int * ));
00665 
00666 int ADDLL pvm_reg_hoster  __ProtoGlarp__(( void ));
00667 int ADDLL pvm_reg_rm    __ProtoGlarp__(( struct pvmhostinfo ** ));
00668 int ADDLL pvm_reg_tasker  __ProtoGlarp__(( void ));
00669 int ADDLL pvm_reg_tracer  __ProtoGlarp__(( int, int, int, int, char*,
00670                     int, int ));
00671 int ADDLL pvm_scatter   __ProtoGlarp__(( void*, void*,
00672                     int, int, int, char*, int));
00673 int ADDLL pvm_send    __ProtoGlarp__(( int, int ));
00674 int ADDLL pvm_sendsig   __ProtoGlarp__(( int, int ));
00675 int ADDLL pvm_setcontext  __ProtoGlarp__(( int ));
00676 int ADDLL pvm_setminfo  __ProtoGlarp__(( int, struct pvmminfo * ));
00677 int ADDLL pvm_setopt    __ProtoGlarp__(( int, int ));
00678 int ADDLL pvm_setrbuf   __ProtoGlarp__(( int ));
00679 int ADDLL pvm_setsbuf   __ProtoGlarp__(( int ));
00680 int ADDLL pvm_siblings  __ProtoGlarp__(( int ** ));
00681 int ADDLL pvm_spawn   __ProtoGlarp__(( char *, char **, int,
00682                     char *, int, int * ));
00683 int ADDLL pvm_start_pvmd  __ProtoGlarp__(( int, char **, int ));
00684 int ADDLL pvm_tasks   __ProtoGlarp__(( int, int *,
00685                     struct pvmtaskinfo ** ));
00686 int pvm_tickle    __ProtoGlarp__(( int, int *,
00687                     int *, int * ));
00688 int ADDLL pvm_tidtohost __ProtoGlarp__(( int ));
00689 int ADDLL pvm_trecv   __ProtoGlarp__(( int, int, struct timeval * ));
00690 int ADDLL pvm_unexport  __ProtoGlarp__(( char * ));
00691 int pvm_unpackf   __ProtoGlarp__(( const char *, ... ));
00692 int ADDLL pvm_upkbyte   __ProtoGlarp__(( char *, int, int ));
00693 int ADDLL  pvm_upkcplx    __ProtoGlarp__(( float *, int, int ));
00694 int ADDLL  pvm_upkdcplx __ProtoGlarp__(( double *, int, int ));
00695 int ADDLL  pvm_upkdouble  __ProtoGlarp__(( double *, int, int ));
00696 int ADDLL  pvm_upkfloat __ProtoGlarp__(( float *, int, int ));
00697 int ADDLL  pvm_upkint   __ProtoGlarp__(( int *, int, int ));
00698 int ADDLL  pvm_upklong    __ProtoGlarp__(( long *, int, int ));
00699 int ADDLL  pvm_upkshort __ProtoGlarp__(( short *, int, int ));
00700 int ADDLL  pvm_upkstr   __ProtoGlarp__(( char * ));
00701 int ADDLL  pvm_upkuint    __ProtoGlarp__(( unsigned int *, int, int ));
00702 int ADDLL  pvm_upkulong __ProtoGlarp__(( unsigned long *, int, int ));
00703 int ADDLL  pvm_upkushort  __ProtoGlarp__(( unsigned short *, int, int ));
00704 int ADDLL  pvm_upkmesg    __ProtoGlarp__(( void ));
00705 char *pvm_version __ProtoGlarp__(( void ));
00706 
00707 /*
00708 * these are going away in the next version.
00709 * use the replacements
00710 */
00711 
00712 #ifdef  PVM33COMPAT
00713 int pvm_getmwid   __ProtoGlarp__(( int ));
00714 int pvm_setmwid   __ProtoGlarp__(( int, int ));
00715 #endif
00716 
00717 /* made backwards compatible -> now use mbox interface... */
00718 int pvm_delete    __ProtoGlarp__(( char *, int ));
00719 int pvm_insert    __ProtoGlarp__(( char *, int, int ));
00720 int pvm_lookup    __ProtoGlarp__(( char *, int, int * ));
00721 
00722 #ifdef __cplusplus
00723 }
00724 #endif
00725 
00726 #endif  /*_PVM3_H_*/
00727