~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to pvm3/src/SP2MPI/pvmdmimd.c

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
static char rcsid[] =
3
 
        "$Id: pvmdmimd.c,v 1.10 1997/10/01 15:36:06 pvmsrc Exp $";
 
3
        "$Id: pvmdmimd.c,v 1.2 2002/10/14 14:38:03 chanceli Exp $";
4
4
 
5
5
/*
6
6
 *         PVM version 3.4:  Parallel Virtual Machine System
39
39
 *                      Initialization. Create a table to keep track of active nodes.
40
40
 *                      argc, argv: passed from main.
41
41
 *
42
 
 *              int mpp_load(int flags, char *name, char *argv, int count, int tids[],
43
 
 *                                      int ptid):
 
42
 *              int mpp_load( struct waitc_spawn *wxp ) 
 
43
 *
44
44
 *                      Load executable onto nodes; create new entries in task table,
45
45
 *                      encode node number and process type into task IDs, etc.
46
46
 *
47
47
 *                              Construction of Task ID:
48
48
 *
49
 
 *                               1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1
50
 
 *                              +-+-+---------------------+-+-----------+---------------------+
51
 
 *                              |s|g|           host index        |n| instance  |       node # (2048)     |
52
 
 *                              +-+-+---------------------+-+-----------+---------------------+
 
49
 *                       1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
 
50
 *                      +-+-+-----------------------+-+-----+--------------------------+
 
51
 *                      |s|g|           host index          |n| prt |           node # (16384)     |
 
52
 *                      +-+-+-----------------------+-+-----+--------------------------+
53
53
 *
54
 
 *                              The "n" bit is set for node task but clear for host task.
 
54
 *                      The "n" bit is set for node task but clear for host task.
55
55
 *
56
56
 *                      flags:  exec options;
57
57
 *                      name:   executable to be loaded;
89
89
 *                      Remove node/process-type from active list.
90
90
 *                      tp: task pointer.
91
91
 *
92
 
$Log: pvmdmimd.c,v $
 
92
 * $Log: pvmdmimd.c,v $
 
93
 * Revision 1.2  2002/10/14 14:38:03  chanceli
 
94
 * update
 
95
 *
 
96
 * Revision 1.13  2001/09/25 21:19:28  pvmsrc
 
97
 * Minor TMPNAMFUN()/tmpnam() cleanup.
 
98
 *      - moved macro def to pvm3.h, renamed PVMTNPMAN().
 
99
 *      - same for LEN_OF_TMP_NAM -> PVMTMPNAMLEN.
 
100
 *      - mostly a huge waste of time, since *both* tmpnam() & mktemp()
 
101
 *              produce the same "dangerous" warning message in Linux/gcc...
 
102
 *      - damn.
 
103
 * (Spanker=kohl)
 
104
 *
 
105
 * Revision 1.12  2000/02/17 21:10:44  pvmsrc
 
106
 * Cleaned up comments...  mpp_load() args...
 
107
 * (Spanker=kohl)
 
108
 *
 
109
 * Revision 1.11  1999/07/08 19:00:28  kohl
 
110
 * Fixed "Log" keyword placement.
 
111
 *      - indent with " * " for new CVS.
 
112
 *
93
113
 * Revision 1.10  1997/10/01  15:36:06  pvmsrc
94
114
 * Removed unnecessary #include "fromlib.h" header.
95
115
 *      - all consts now included in pvm3.h...
213
233
static struct nodeset *busynodes;       /* active nodes; ordered by proc type */
214
234
static char pvmtxt[512];                /* scratch for error log */
215
235
static int ptypemask;                   /* mask; we use these bits of ptype in tids */
216
 
static char nodefile[L_tmpnam]; /* tmp node file */
 
236
static char nodefile[PVMTMPNAMLEN];     /* tmp node file */
217
237
static char **nodelist = 0;             /* default poe node list */
218
238
static int partsize = 0;                /* number of nodes allocated */
219
239
static int hostfileused = TRUE;         /* Check if MP_HOSTFILE used */
328
348
                pvmlogperror(pvmtxt);
329
349
                return (char *)0;
330
350
        }
331
 
        (void)tmpnam(nodefile);
 
351
        (void)PVMTMPNAMFUN(nodefile);
332
352
        if (!(tmpfp = fopen(nodefile, "w"))) {
333
353
                sprintf(pvmtxt, "sp2hostfile() fopen %s", nodefile);
334
354
                pvmlogperror(pvmtxt);