crut test with two applicatin clients
liangzeng <[email protected]>
| Newsgroups | gmane.comp.graphics.chromium.user |
|---|---|
| Message-ID | <[email protected]> |
hi,all:
I'm setting up a mini-cluster of four machines to test Crut with two application clients.(the application code is psubmit in the progs of cr-1.8).Following is the configure file.But the server node rendering does not work correctly,the scene displayed on the screen is twinkling,but on one machine it works well . Can anyone help me ?
Thank you,
ZengLiang
# Copyright (c) 2001, Stanford University
# All rights reserved
#
# See the file LICENSE.txt for information on redistributing this software.
# Demonstrate parallel submission with sort-first rendering.
import sys
sys.path.append( "../server" )
from mothership import *
if len(sys.argv) > 1:
Demo = sys.argv[1]
firstExtra = 2
else:
Demo = 'psubmit_crut'
firstExtra = 1
# Collect remaining command line params as program options
ExtraOpts = ""
for arg in sys.argv[firstExtra:]:
ExtraOpts += arg + " "
Demo = os.path.join(crbindir, Demo)
MOTHERSHIP = socket.gethostname()
# How many display tiles
TILE_COLS = 2
TILE_ROWS = 2
# Run crserver and crappfaker automatically?
AUTOSTART = 1
SHELL = "/usr/bin/rsh"
localctag =0
localstag =0
TileWidth = 200
TileHeight = 200
NumApps = 2
Servers = ['localhost', 'localhost','localhost','localhost']
Clients = ['server1', 'server1', 'server1', 'server1']
servernode = ['server1','server2','server3','server4']
DrawBbox = 0
BucketMode = "Uniform Grid"
# Can render/readback windows by dynamically resized?
resizable = 1
# Set this to zero to work-around a problem with ATI's Linux driver
UseglXChooseVisual = 1
cr = CR()
cr.MTU( 10*1024*1024 )
# Set up the control server node
servernode12 = CRNetworkNode(Servers[0])
# Note: each client has the -swap flag and we tell the server to only
# do one SwapBuffers here.
servernode12.Conf( 'only_swap_once', 1 )
servernode12.Conf( 'shared_windows', 1 )
renderspu = SPU( 'render' )
renderspu.Conf( 'window_geometry', [600, 600, TileWidth*2, TileHeight*2] )
renderspu.Conf('resizable', resizable)
renderspu.Conf('type', 'alpha')
renderspu.Conf('render_to_crut_window', 1 )
renderspu.Conf('default_visual', 'rgb, alpha, double, depth')
renderspu.Conf('title',"test ")
renderspu.Conf('shared_windows', 1)
renderspu.Conf('use_glxchoosevisual', UseglXChooseVisual);
servernode12.AddSPU( renderspu )
servernode12.AddTile( 0, 0, TileWidth*2, TileHeight*2 )
#cr.AddNode( servernode12 )
#create a crutserver
crutserver = CRUTServerNode( Servers[0] )
crutserver.Conf('window_geometry', [500, 10,TileWidth*2, TileHeight*2] )
crutserver.Conf('title',"test ")
# Set up network nodes
for row in range(TILE_ROWS):
for col in range(TILE_COLS):
index = row * TILE_COLS + col
servernode[index] = CRNetworkNode(Servers[index])
spu = SPU('readback')
spu.Conf('window_geometry', [(row)*TileWidth, (1-col)*TileHeight, TileWidth, TileHeight])
spu.Conf('extract_depth', 1)
spu.Conf('type', 'alpha')
spu.Conf('shared_windows', 1)
spu.Conf('default_visual', 'rgb, alpha, double, depth')
spu.Conf('use_glxchoosevisual', UseglXChooseVisual);
spu.Conf('title',"test ")
servernode[index].AddSPU( spu )
spu = SPU('pack')
servernode[index].AddSPU( spu )
spu.AddServer( servernode12, 'tcpip',7099 )
servernode[index].AddTile((row)*TileWidth, (col)*TileHeight, TileWidth, TileHeight )
servernode[index].Conf('shared_windows', 1)
if AUTOSTART:
env = "LD_LIBRARY_PATH=" + crlibdir
prog = crbindir + "/crserver -mothership " + MOTHERSHIP
if localstag:
servernode.AutoStart( [SHELL,
NETHOSTS[index],
"/bin/sh -c '" + env + " " + prog + "'"] )
else:
# If you want o run locally with /bin/sh, try this:
servernode[index].AutoStart( ["/bin/sh", "-c", env + " " + prog] )
cr.AddNode( servernode[index] )
# Set up app/client nodes
for rank in range(0, NumApps):
appnode = CRApplicationNode(Clients[rank])
if rank == 0:
appnode.SetApplication( '%s -rank 0 -size %d -clear -swap %s' % (Demo, NumApps, ExtraOpts) )
else:
appnode.SetApplication( '%s -rank %d -size %d %s' % (Demo, rank, NumApps, ExtraOpts) )
appnode.StartDir( crbindir )
spu = SPU('tilesort')
spu.Conf('fake_window_dims', [TileWidth * 2, TileHeight*2] )
spu.Conf('draw_bbox', DrawBbox)
spu.Conf('bucket_mode', BucketMode)
appnode.AddSPU( spu )
spu.AddServer( servernode[0], protocol='tcpip', port=7001 )
spu.AddServer( servernode[1], protocol='tcpip', port=7002 )
spu.AddServer( servernode[2], protocol='tcpip', port=7003 )
spu.AddServer( servernode[3], protocol='tcpip', port=7014 )
appnode.AddCRUTServer( crutserver, protocol='tcpip', port=9000 )
if AUTOSTART:
env = "LD_LIBRARY_PATH=" + crlibdir
prog = crbindir + "/crappfaker -mothership " + MOTHERSHIP
if localctag:
appnode.AutoStart( [SHELL, APPHOST, "/bin/sh -c '" + env + " " + prog + "'"] )
else:
# If you want o run locally with /bin/sh, try this:
appnode.AutoStart( ["/bin/sh", "-c", env + " " + prog] )
cr.AddNode( appnode )
#Auto start crutserver
if AUTOSTART:
env = "LD_LIBRARY_PATH=" + crlibdir
prog = crbindir + "/crutserver -mothership " + MOTHERSHIP
if localctag:
crutserver.AutoStart( [SHELL, APPHOST, "/bin/sh -c '" + env + " " + prog + "'"] )
else:
# If you want o run locally with /bin/sh, try this:
crutserver.AutoStart( ["/bin/sh", "-c", env + " " + prog] )
cr.AddNode( crutserver )
#Auto start crserver
if AUTOSTART:
env = "LD_LIBRARY_PATH=" + crlibdir
prog = crbindir + "/crserver -mothership " + MOTHERSHIP
if localctag:
servernode12.AutoStart( [SHELL, APPHOST, "/bin/sh -c '" + env + " " + prog + "'"] )
else:
# If you want o run locally with /bin/sh, try this:
servernode12.AutoStart( ["/bin/sh", "-c", env + " " + prog] )
cr.AddNode( servernode12 )
cr.Go()
=======================263天下邮-信赖邮自专业=======================
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Chromium-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chromium-users