Larry Ramey (ramey++at++ccpo.odu.edu)
Mon, 08 Mar 1999 18:03:30 -0500
pfPerson->Rant()
pfPerson->Rage()
Thanks to everyone that has helped us trace down these last few bugs.
(Angus and Benedikt especially) So here is the final analysis.
We have a Origin 2000 with RE2 Graphics, 8 R10000s.
We are using the CAVE(tm) Library from Univ. of Chicago. CAVE Lib will
fork APP/CULL/Draw off if it detects enough processors. We are also
creating a sproced series of workers based on the number of processors.
We have a user shared memory arena (We create this in a C++ class of our
own using usconfig and usinit) and we have (of course) pfSharedArena.
all right here is the main.cc
int msize=CmdDef::getMemSize(argv[1]); //process config file
Shmem::setup(msize); // setup user shared arena
TimeDef::init(); // init list of TimeDefs in User shared memory
CoordDef::init(); // coord list
CmdDef::init(); //cmd list
Colt::init(); // color tables list
DataDef::init(); //data file list
WorkQ::init(1); // configures workQue to have one worker (to ease
debugging)
LightMgr::init(); //list of lights
GobDef::init(); //list of graphics
CmdDef::readConfigFile(argv[1]);
CmdDef::print();
pfInit();
CmdDef::doCmdType(CmdDef::MODEL_SUFFIX);
sgManager::init(10); //pfMallocs a structure
containing pointers to masterChan, scene, and the top level DCS. There
objects aren't created yet, just the pointers
pfCAVEConfig(&argc,argv,NULL); // configure viewport and decide how to
fork off APP/CULL/DRAW
pfConfig(); // fork em
pfCAVEInitChannels();
fflush(stdout);
cout.flush();
sgManager::createScene(); // CREATES pfScene,pfDCS,and pfGeoState
create_scene(); // load files and start sproc off the work
Que
pfCAVEPreDrawFunc(appPreDraw); // do any OpenGL rendering
int doOnce =1;
sleep(120); // I'll explain this
while (!CAVEgetbutton(CAVE_ESCKEY))
{
psgManager::update();//advance animation, update navigation, ect
pfSync();
pfCAVEPreFrame();
pfFrame();
pfCAVEPostFrame();
}
CAVEHalt();
pfExit();
WorkQ::cleanup();
Shmem::cleanup();
return 0;
}
So, inside the function create_scene parameters are read from a config
file and they are placed on the work Queue. IF we run on a single
processor machine.. (ie APP/CULL/DRAW are all one process) everything is
fine. If we run on the Origin everything breaks. ANY GEOMETRY CREATED ON
THE WORK QUEUE NEVER SHOWS UP!(8processors, separate APP/CULL/DRAW) I
printed the scene graph from the CULL process and the Nodes simply were
not there.
Now to explain the sleep. IF I sleep for 120 seconds (longer than it
takes our work queue to create vtk objects and then convert them to
Geodes) then enter the pfSync/pfFrame loop, then the geometry appears.
(on the Origin)
Let me say that again. IF the Work Queue creates the Geometry before the
FIRST time pfSync/pfFrame is called everything shows up like it should.
Inside the work Queue I use pfGetSharedArena to get the memory that I
use to create the verts inside the GeoSets. When I print the pointer
returned by pfGetSharedArena it is the same as the pointer returned in
the APP process.
I feel that this is obviously a Shared Memory problem but I don't know
where it is. Any Geometry explicitly loaded or created in the APP
process shows up, anything created in the Work Queue after the first
pfSync/pfFrame call never shows up. Irix 6.5.2, Performer dev 2.2,
Execution env 2.2.3, openGL 1.1.
Frustration 6.2 <grin>
Angus, if you can solve this with one e-mail I will send you a copy of
all the 5 Nations Rugby games (I am taping them) Go Scotland!!!!
---------------------------------------------------------------
Larry E. Ramey ramey++at++ccpo.odu.edu
757-683-6276(office) 757-683-5335 (CAVE)
"Count the heads man." - Zaphod Bebblebrox
"Won't weigh you down, with good intentions" -Sarah McLachlan
This archive was generated by hypermail 2.0b2 on Mon Mar 08 1999 - 15:04:06 PST