Re: info-performer Mar 07 1999

New Message Reply Date view Thread view Subject view Author view

Angus Dorbie (dorbie++at++sgi.com)
Mon, 08 Mar 1999 15:46:45 -0800


This is a bogus machine config. It's either Challenge GR or iR/iR2 GFX.

You also call this which is confusing:

        pfCAVEPreDrawFunc(appPreDraw); // do any OpenGL rendering

You can't call OpenGL from the app when forking the draw.

Cheers,Angus.

Larry Ramey
>
> Shared Memory problems with sproc
>
> 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
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com

-- 
"Only the mediocre are always at their best." -- Jean Giraudoux

For advanced 3D graphics Performer + OpenGL based examples and tutors: http://www.dorbie.com/


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Mar 08 1999 - 15:46:48 PST

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