reassemble.conf and render_to_app_window and borders

Paul Needle <[email protected]>
Newsgroups gmane.comp.graphics.chromium.user
Message-ID <[email protected]>
Hi,

I am putting together a Chromium 1.9 system and am using the attached 
reassemble.conf file. We are using a 16 core application node (cr1), 
which isn't being used as a render node. I am also using two render 
nodes (cr2 and cr3). I have one active stereo projector, which is 
attached to the graphics card on cr2, the first render node.

The behavior I would like to see on the screen is a normal gnome session 
(RHEL AS 4u4) and when I fire up VMD through Chromium, to have a single 
window, which also is the control window for the mouse. The top half of 
the window I need to render from the first render node (cr2) and the 
bottom from the second (cr3).

What I am currently seeing when I fire up VMD through Chromium are two 
separate, bordered windows for the top and bottom half of the VMD 
output. They are aligned correctly, but the borders ruin the effect. 
Secondly, although I have render_to_app_window set in the 
reassemble.conf, I still get a separate control window entitled "VMD 
1.8.5 OpenGL Display". I have to have this on top of the VMD application 
window in order to move any 3D models, which is also undesirable.

Does anyone know how I can fix these two issues?

Many thanks,
Paul.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Chromium-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chromium-users
reassemble.conf (text/plain, 9.1 KB)
# Copyright (c) 2001, Stanford University
# All rights reserved
#
# See the file LICENSE.txt for information on redistributing this software.

# This is an example of tilesort-reassembly into an application window.
#
# The app node has a tilesort SPU that connect to two servers.
# Each server has two tiles (four total).
# A readback SPU runs on each server.
# The readback SPUs send two tiles each to the render SPU.
# The render SPU uses render_to_app_window to render into the original
# application window.  The render SPU window is never displayed.

# Brian Paul  16 July 2002

# Based on Chromium bandled reassemble.conf.
# Added: 1. auto start. 2. Chromium setup.
# Qinghuai Gao
# Copyright Sun Microsystems
# Added: (1) Cluster configuration; (2) Autostart; (3) VirtualGL integration.

# WARNING! WARNING! WARNING! WARNING!
#
# If you enable both 'extract_alpha' and RENDER_BACK you'll probably crash
# your X server if using the NVIDIA 2960 drivers.  This is probably because
# the render SPU GLX context has different visual attributes (an alpha channel)
# that the original app window lacks.  This mismatch shouldn't cause a crash
# but it does.   (Brian - 20 August 2002)
#
# Copyright (c) 2007 Sun Microsystems, Inc.  All rights reserved.  
# U.S. Government Rights - Commercial software.  Government users are 
# subject to the Sun Microsystems, Inc. standard license agreement and 
# applicable provisions of the FAR and its supplements.  Use is subject 
# to license terms.  This distribution may include materials developed 
# by third parties.Portions may be derived from Berkeley BSD systems, 
# licensed from U. of CA.  Sun,  Sun Microsystems,  the Sun logo,  Java,  
# Jini,  Jiro,  Netra,  Solaris,  StarOffice,  StarPortal,  Sun Ray,  
# Sun StorEdge,  SunSpectrum,  SunTone,  Sun[tm] ONE,  Sun[tm] ONE Studio,  
# The Network is the Computer,  We're the dot in .com and  iForce are 
# trademarks or registered trademarks of Sun Microsystems, Inc. in 
# the U.S. and other countries.  All SPARC trademarks are used under 
# license and are trademarks or registered trademarks of SPARC 
# International, Inc. in the U.S. and other countries.  
#
# Added mpi support; screen wakeup and more

import os
import sys
import pdb
sys.path.append( "../server" )
from mothership import *
sys.path.append( ".")
from config import *
from signalprocess import *

setMode('sort-first')
if len(sys.argv) > 1 and sys.argv[1] == '-usage':
        print "This is a python script to strat an application on the cluster"
        print "defined in /etc/chromium/chromium.conf.\n"
	print "Partition in display space, readback, composite on the application node"
	print "Deliver to remote user using VirtualGL"
        print "Usage:"
        print "         python reassemble.conf"
        print "                 Start atlantis demo using default parameters"
        print "         python reassemble.conf [-mport <mothership port>] [-bport <base port>] [-mtu <mtu>] [-pro [tcpip|sdp|...]]"
        print "                 Start atlantis using the provided protocol"
        print "         python reassemble.conf [-mport <mothership port>] [-bport <base port>] [-mtu <mtu>] [-pro [tcpip|sdp|...]] application arg1 ..."
        print "                 Start the provided application with the given protocol"
        sys.exit()

assignSignalCallback()

protcl=getProtocol(sys.argv)
application = getApplication(sys.argv)

preloadSDPEnv = ''
if protcl == 'psdp':
    protcl = 'tcpip'
    preloadSDPEnv = getPreloadSDPEnv()

print 'DISPLAY on %s' % os.getenv('DISPLAY')

mport=getMothershipPort(sys.argv)
bport=getBasePort(sys.argv)

# Read Chromium configuration
tileRows = getNumOfRows()
tileCols = getNumOfColumns()
applicationNode = getApplicationNode()
renderNodes = getRenderNodes()
writeApplicationNodeName(applicationNode)
writeServerNodeNames(renderNodes)

appnode = CRApplicationNode(applicationNode)
pythonPID = os.getpid()
print "Python ID%s " % pythonPID

cr = CR()
cr.MTU( 1024*1024 )  # may need larger value for big windows

MAX_TILE_WIDTH = 1280	
MAX_TILE_HEIGHT = 512 

NUM_SERVERS = tileRows * tileCols  # don't change these unless you overhaul LayoutTiles()

SLOP = 0  # window border

RESIZABLE = 0    # track client window size changes


# This is a callback which we register with spu.TileLayoutFunction()
def LayoutTiles(muralWidth, muralHeight):
	"""Return list of tuples of new tiles for the given mural size.
	Each tuple is of the form (serverIndex, x, y, width, height)."""

#	if muralWidth > MAX_TILE_WIDTH * tileCols:
#			print "Warning: mural size is too wide!"
#			muralWidth = MAX_TILE_WIDTH * tileCols
#	if muralHeight > MAX_TILE_HEIGHT * tileRows:
#			print "Warning: mural size is too tall!"
#			muralHeight = MAX_TILE_HEIGHT * tileRows
	muralHeight = 1024
	muralWidth = 1280
	print "mural size %d %d" % (muralWidth, muralHeight)
	# four tiles
	w = muralWidth / tileCols
	h = muralHeight / tileRows
	tiles = []
	tile0 = ( 1, 0, 0, w, h ) 
	tile1 = ( 0, 0, 512, w, h ) 
#	tile2 = ( 1, 0, h, w, muralHeight - h )
#	tile3 = ( 0, w, h, muralWidth - w, muralHeight - h )
	
	tiles.append( tile0 )
	tiles.append( tile1 )
#	tiles.append( tile2 )
#	tiles.append( tile3 )
	
#	for i in range(tileCols):
	#	for j in range(tileRows):
	#		t = (i + (tileRows-1-j) * tileCols, i * w, j * h, w, h)
	#		tiles.append(t)	
	return tiles


# The application node (tilesort SPU)
tilesortspu = SPU( 'tilesort' )
tilesortspu.TileLayoutFunction( LayoutTiles )
tilesortspu.Conf('bucket_mode', 'Non-Uniform Grid')
tilesortspu.Conf('retile_on_resize', 1) 

client_node = CRApplicationNode(applicationNode)
client_node.SetApplication( application )
client_node.AddSPU( tilesortspu )
#client_node.Conf('track_window_size', RESIZABLE)
#client_node.Conf('track_window_position', RESIZABLE)

cr.AddNode( client_node )


# Final reassembly node (render SPU)
render_node = CRNetworkNode(applicationNode)
renderspu = SPU('render')
renderspu.Conf( 'window_geometry',
		 [0, 0, tileCols * MAX_TILE_WIDTH, tileRows * MAX_TILE_HEIGHT] )
renderspu.Conf('borderless', 1)
renderspu.Conf('display_string', 'cr2:0.0' )
pdb.set_trace()
renderspu.Conf('render_to_app_window', 1)
#renderspu.Conf('resizable', RESIZABLE)
#render_node.Conf('only_swap_once', 1)
#render_node.AddSPU(renderspu)

printspu=SPU('print')
printspu.Conf('log_file', "/tmp/renderspu.log" )
#render_node.AddSPU(printspu)
render_node.AddSPU(renderspu)

cr.AddNode( render_node )

# create server nodes
serverNodes = range(NUM_SERVERS)
for i in range(NUM_SERVERS):
	serverNodes[i] = CRNetworkNode(renderNodes[i])
	readbackspu = SPU( 'readback' )
	readbackspu.Conf( 'window_geometry',
			  [i % tileRows, i / tileCols * (MAX_TILE_HEIGHT + SLOP),
			  MAX_TILE_WIDTH, MAX_TILE_HEIGHT] )
	readbackspu.Conf('extract_alpha', 0)
	readbackspu.Conf('extract_depth', 0)
	readbackspu.Conf('title', 'readback SPU %d' % i)
	serverNodes[i].AddSPU( readbackspu )
	packspu = SPU('pack')
	serverNodes[i].AddSPU(packspu)
	packspu.AddServer( render_node, protocol=protcl )

	tilesortspu.AddServer( serverNodes[i], protocol=protcl, port=bport + 1 + i )
	serverNodes[i].Conf('optimize_bucket', '0')
	cr.AddNode( serverNodes[i] )


# setup tiling
for row in range(tileRows):
	for col in range(tileCols):
		index = row * tileCols + col
		node = serverNodes[index]
		node.AddTile( col * MAX_TILE_WIDTH,
			(tileRows - row - 1) * MAX_TILE_HEIGHT,
			MAX_TILE_WIDTH, MAX_TILE_HEIGHT )
#		if protcl != 'mpi':
#			node.AutoStart( ["/usr/bin/ssh", renderNodes[index], "/bin/bash -c 'echo $$ > /tmp/crserver.%d; export DISPLAY=cr1:1.0; PATH=%s:$PATH; wakeupscreen.sh; %s CRMOTHERSHIP=%s:%d CR_HOSTNAME=%s LD_LIBRARY_PATH=%s:$LD_LIBRARY_PATH crserver'" % (pythonPID, getPath(), preloadSDPEnv, applicationNode, mport, renderNodes[index], getLibPath() ) ] )

# TODO: strip /wakeupscreen.sh and crserver
#if protcl == 'mpi':
#	 client_node.AutoStart( ["/usr/bin/ssh", applicationNode, "/bin/bash -c 'echo $$ > /tmp/crappfaker.%d; PATH=%s:$PATH; mpiexec -machinefile /etc/chromium/hosts -n %d cr_mpich.sh %s 2 %s %s %s:%d %s %s'" % (pythonPID, getPath(), len(renderNodes)+2, pythonPID, getPath(), getLibPath(), applicationNode, mport, os.getenv('DISPLAY'), os.getenv('VGLRUN')) ] )
#else:
#    vglEnv=''
#    if os.getenv('VGLRUN') != None and len(os.getenv('VGLRUN')) > 0:
#	vglEnv='VGL_GLLIB=/usr/lib64/libGL.so CR_SYSTEM_GL_PATH=/opt/VirtualGL/lib'
#    client_node.AutoStart( ["/usr/bin/ssh", applicationNode, "/bin/bash -c 'echo $$ > /tmp/crappfaker.%d; export DISPLAY=%s; PATH=%s:$PATH; wakeupscreen.sh; %s %s CRMOTHERSHIP=%s:%d CR_HOSTNAME=%s LD_LIBRARY_PATH=%s:$LD_LIBRARY_PATH crappfaker '" % (pythonPID, os.getenv('DISPLAY'), getPath(), vglEnv, preloadSDPEnv, applicationNode, mport, applicationNode, getLibPath() ) ] )
#
#    vglEnv=''
#    if os.getenv('VGLRUN') != None and len(os.getenv('VGLRUN')) > 0:
#	vglEnv='CR_SYSTEM_GL_PATH=/opt/VirtualGL/lib'
#    render_node.AutoStart( ["/usr/bin/ssh", applicationNode, "/bin/bash -c 'echo $$ > /tmp/crappfaker.%d; export DISPLAY=%s; PATH=%s:$PATH; wakeupscreen.sh; %s %s CRMOTHERSHIP=%s:%d CR_HOSTNAME=%s LD_LIBRARY_PATH=%s:$LD_LIBRARY_PATH %s crserver '" % (pythonPID, os.getenv('DISPLAY'), getPath(), vglEnv, preloadSDPEnv, applicationNode, mport, applicationNode, getLibPath(), os.getenv('VGLRUN') ) ] )

cr.Go()
chromium.conf (text/plain, 616 B)
# This is a configuration file for Chromium to support a powerwalli
# Items:
#	AppNode -- Application node IP or host name
#	NumOfRows -- Screen number for each row
#	NumOfCols -- Screen number for each column
#	RenderNode -- IP or host name of one render node
#
# Application node, head node
AppNode crib1
NumOfRows 2
NumOfCols 1
muralHeight 1024
muralWidth 1280
RenderNode crib2
RenderNode crib3
CRPATH /chromium/cr-1.9/bin/Linux
CRLIBPATH /chromium/cr-1.9/lib/Linux
MPILIB /usr/lib
MPIBIN /usr/bin
PreloadSDPEnv LD_PRELOAD=/lib64/sock-redirect.so:$LD_PRELOAD
OverlapX 0
OverlapY 0
TILEWIDTH 1280
TILEHEIGHT 1024
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.