| 62 |
|
int force = 0; |
| 63 |
|
/* mark start time */ |
| 64 |
|
starttime = time(NULL); |
| 65 |
< |
initurand(10240); /* initialize urand */ |
| 65 |
> |
initurand(16384); /* initialize urand */ |
| 66 |
|
progname = argv[0]; /* get arguments */ |
| 67 |
|
for (i = 1; i < argc && argv[i][0] == '-'; i++) |
| 68 |
|
switch (argv[i][1]) { |
| 279 |
|
if (!disp_check(idle)) |
| 280 |
|
return(0); |
| 281 |
|
/* display only? */ |
| 282 |
< |
if (ncprocs <= 0) |
| 282 |
> |
if (nprocs <= 0) |
| 283 |
|
return(1); |
| 284 |
|
/* check file size */ |
| 285 |
|
if (maxdisk > 0 && hdfilen(hdlist[0]->fd) >= maxdisk) { |
| 500 |
|
p->next = freepacks; |
| 501 |
|
freepacks = p; |
| 502 |
|
} |
| 503 |
< |
if (n2flush > 512*RPACKSIZ*ncprocs) { |
| 503 |
> |
if (n2flush > 512*RPACKSIZ*nprocs) { |
| 504 |
|
hdflush(NULL); /* flush holodeck buffers */ |
| 505 |
|
n2flush = 0; |
| 506 |
|
} |
| 610 |
|
int status = 0; |
| 611 |
|
|
| 612 |
|
if (hdlist[0] != NULL) { /* flush holodeck */ |
| 613 |
< |
if (ncprocs > 0) { |
| 613 |
> |
if (nprocs > 0) { |
| 614 |
|
done_packets(flush_queue()); |
| 615 |
|
status = end_rtrace(); /* close rtrace */ |
| 616 |
< |
hdflush(NULL); |
| 617 |
< |
if (vdef(REPORT)) { |
| 618 |
< |
long fsiz, fuse; |
| 619 |
< |
report(0); |
| 620 |
< |
fsiz = hdfilen(hdlist[0]->fd); |
| 621 |
< |
fuse = hdfiluse(hdlist[0]->fd, 1); |
| 622 |
< |
fprintf(stderr, |
| 616 |
> |
} |
| 617 |
> |
hdflush(NULL); |
| 618 |
> |
if (ncprocs > 0 && vdef(REPORT)) { |
| 619 |
> |
long fsiz, fuse; |
| 620 |
> |
report(0); |
| 621 |
> |
fsiz = hdfilen(hdlist[0]->fd); |
| 622 |
> |
fuse = hdfiluse(hdlist[0]->fd, 1); |
| 623 |
> |
fprintf(stderr, |
| 624 |
|
"%s: %.1f Mbyte holodeck file, %.1f%% fragmentation\n", |
| 625 |
< |
hdkfile, fsiz/(1024.*1024.), |
| 626 |
< |
100.*(fsiz-fuse)/fsiz); |
| 627 |
< |
} |
| 627 |
< |
} else |
| 628 |
< |
hdflush(NULL); |
| 625 |
> |
hdkfile, fsiz/(1024.*1024.), |
| 626 |
> |
100.*(fsiz-fuse)/fsiz); |
| 627 |
> |
} |
| 628 |
|
} |
| 629 |
|
if (orig_mode >= 0) /* reset holodeck access mode */ |
| 630 |
|
fchmod(hdlist[0]->fd, orig_mode); |