Re: pfMultiprocess

New Message Reply Date view Thread view Subject view Author view

From: Yair Kurzion (yair++at++polygon.engr.sgi.com)
Date: 03/30/2000 14:41:50


Hello Dirk !

Performer figures out the PFMP_DEFAULT setting when you call pfConfig. Since
pfConfig spawns the processes, you can not change the setting after calling it.

You can easily repeat the default decisions that pfConfig makes:

if
    numCPUs = (int)sysmp(MP_NAPROCS);
and
    numPipes = <The number of pipes you want to use>

then, if numPipes > 1, you can either pick PFMP_APP_CULLDRAW or
PFMP_APP_CULL_DRAW. PFMP_APP_CULLDRAW creates (1 + numPipes) processes.
PFMP_APP_CULL_DRAW creates (1 + 2 * numPipes) processes.
If your numCPUs is large enough, pick PFMP_APP_CULL_DRAW. Otherwise,
PFMP_APP_CULLDRAW.

If numPipes == 1, you can pick PFMP_APPCULLDRAW or PFMP_APPCULL_DRAW or
PFMP_APP_CULL_DRAW. The number of underscores in each constant is the number
of processes it will create. Pick the largest one you can fit in numCPUs.

If you want to dedicate a CPU for DBASE, start the computation with (numCPUs-1).
Same if you want to fork ISECT or COMPUTE and allocate a full CPU for them.

-yair

> I want to determine the optimal process forking automatically. I could use
> pfMultiprocess(PFMP_DEFAULT). Hmmm, but I have to call my own DBase process for
> asynchronous database loading. Combining PFMP_DEFAULT | PFMP_FORK_DBASE was not
> the solution. No wonder! PFMP_DEFAULT == -1. Now I use 0 | PFMP_FORK_DBASE if
> there is no other specific request by user but this results in single
> processing except the extra DBase process. That's unsatisfying, also.
> Desired solution would propose process forking like PFMP_DEFAULT and then add
> extra PFMP_FORK_DBASE. This should be OK because DBase does nothing after all
> models has been loaded.
> pfGetMPMode() and pfGetMPBitmask() doesn't return an useful result until
> pfConfig() is done. But after pfConfig() it's too late. (Or not?)
>
> Is there anybody who could give me a hint?

-- 
\_________  \_____  \__    \__  \_____         Yair Kurzion
\_________  \_____   \__   \__  \_____         yair++at++sgi.com
       \__     \__   \____\__      \__   http://reality.sgi.com/yair
       \__          \__  \__                Work: (650) 933-6502
       \__          \__   \__               Home: (408) 226-9771
       \__          \__    \__             


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Mar 30 2000 - 14:42:01 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.