Changeset 4153 for trunk/packages
- Timestamp:
- Jan 29, 2014, 1:42:54 PM (11 years ago)
- Location:
- trunk/packages/vizservers/nanoscale
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanoscale/renderservers.tcl.in
r4152 r4153 1 1 # 2 # This file is read by nanoscale to determine theports to listen2 # This file is read by nanoscale to determine which ports to listen 3 3 # to and the how to start the associated render server. 4 4 # … … 15 15 # 16 16 # The syntax is 17 # register_server <name> <port> <command> <variables> 17 # register_server <name> <port> ?<flags>? { 18 # commands... 19 # } { 20 # variables... 21 # } 18 22 # 19 # This registers a server by the given name at the given port.20 # When a connection is made to that port, the command is run21 # with the environment variables initialized.23 # Registers a server by <name> at port <port>. 24 # When a connection is made to <port>, <command> is run. 25 # Environment variables will be set before executing command. 22 26 # 23 27 # Note: Don't set DISPLAY here. nanoscale itself sets the DISPLAY … … 45 49 } 46 50 47 # NanoVis server (port 2000) -- 48 # Volume renderer 51 # NanoVis -- 52 # Server Type Volume renderer 53 # Port 2000 54 # Threaded yes 55 # Notes: 56 # o Continue to use default options until we offically upgrade 57 # nanovis to the latest release. We are currently using a 1.2 58 # version of nanovis. 59 # o Requires change to 1.2 nanovis. Can't redirect stderr to log 60 # or X will complain about performing socket operation on non-socket 61 # descriptor. 49 62 # 50 register_server nanovis 2000 \ 51 -output 3 -logstdout no -logstderr no \ 52 { 53 ${bindir}/nanovis -o 3 -p ${libdir}/shaders:${libdir}/resources 63 register_server nanovis 2000 { 64 ${bindir}/nanovis -p ${libdir}/shaders:${libdir}/resources 54 65 } { 55 66 LD_LIBRARY_PATH ${libdir} 56 67 } 57 68 58 # VtkVis server (port 2010)-- 59 # 3D drawings (scene graphs), Contour and surface graphs. 60 # Can remove ":${vtkdir} when moving to VTK 6. 69 # VtkVis -- 70 # Server type 3D drawings (scene graphs). Contour and surface graphs. 71 # Port 2010 72 # Threaded yes 73 # Notes: 74 # o Removed ${vtkdir} from LD_LIRBRARY_PATH. Not needed with VTK 6. 75 # o Using new features in nanoscale/vtkvis to use file descriptor 3 76 # for server output. No automatic logging of stdout and stderr. 61 77 # 62 78 register_server vtkvis 2010 \ … … 68 84 } 69 85 70 # Pymol experimental server (port 2019) -- 71 # Molecular layouts from PDB description. 72 # Need PYMOL_SITE_PATH only for parallelpiped box.py location. 73 # 74 register_server pymolproxy 2019 { 75 ${bindir}/pymolproxy ${bindir}/pymol -p -q -i -x -X 0 -Y 0 76 } { 77 PYMOL_SITE_PATH ${libdir}/pymol 78 LD_LIBRARY_PATH ${libdir} 79 } 80 81 # Pymol server (threaded version of proxy) (port 2010) -- 82 # Molecular layouts from PDB description. 83 # Need PYMOL_SITE_PATH only for parallelpiped box.py location. 84 # 85 register_server pymolproxy-threaded 2020 \ 86 # PymolProxy -- 87 # Server type Molecular layouts using Pymol viewer. 88 # Port 2020 89 # Threaded yes 90 # Notes: 91 # o Need PYMOL_SITE_PATH for parallelpiped box.py location. 92 # o Makes no sense to log stdout and stderr of the proxy. 93 # o Renamed to just pymolproxy and removed non-threaded entry. 94 # 95 register_server pymolproxy 2020 \ 86 96 -logstdout no -logstderr no \ 87 97 { … … 92 102 } 93 103 94 # vmd server (used for mdshowcase) 95 # 104 # VmdShow -- 105 # Server type Molecular layouts using VMD viewer (for mdshowcase). 106 # Port 2018 107 # Threaded no 108 # Notes: 109 # o Commands are sent directly to the VMD process that uses custom 110 # TCL code to process. 111 # o Redirect input to descriptor 3: Otherwise VMD will get select hit. 112 # o Redirect output to descriptor 4: Lots of information written to 113 # stdout and stderr of VMD. Captured in log file. 114 # o Executing binary without wrapper shell script. Requires VMDDIR set. 115 # o Meshing programs surf and msms require explicit environment variables. 116 # o __GL_SYNC_TO_VBLANK probably doesn't matter. 117 # o Client doesn't send data files to VMD, but file paths. Unlikely 118 # client will block on a large write. 119 # 96 120 register_server vmdshow 2018 \ 97 121 -input 3 -output 4 -combinelogs yes \ -
trunk/packages/vizservers/nanoscale/server.c
r4132 r4153 65 65 int numEnvArgs; /* # of args in environment. */ 66 66 char *const *cmdArgs; /* Command to execute for 67 67 * server. */ 68 68 char *const *envArgs; /* Environment strings to set. */ 69 69 int listenerFd; /* Descriptor of the listener … … 601 601 exit(1); 602 602 } 603 if (dup2(newFd, 1) < 0) {603 if (dup2(newFd, 2) < 0) { 604 604 ERROR("%s: can't dup stderr to \"%s\": %s", 605 605 serverPtr->name, path, strerror(errno)); … … 614 614 exit(1); 615 615 } 616 /* When are the input and output ports of the render server 617 * the same? It's an error when input == output. */ 616 618 if (serverPtr->outputFd != serverPtr->inputFd) { 617 619 if (dup2(sock, serverPtr->outputFd) < 0) { /* output */ … … 633 635 setenv(serverPtr->envArgs[i], serverPtr->envArgs[i+1], 1); 634 636 } 635 INFO("Executing %s: client %s, %s in=%d out=%d on DISPLAY=%s", 637 { 638 char *cmd; 639 640 cmd = Tcl_Merge(serverPtr->numCmdArgs, 641 (const char *const *)serverPtr->cmdArgs); 642 INFO("Executing %s: client=%s, \"%s\" in=%d out=%d on DISPLAY=%s", 636 643 serverPtr->name, inet_ntoa(newaddr.sin_addr), 637 serverPtr->cmdArgs[0], serverPtr->inputFd,638 serverPtr->outputFd, display);639 /* Replace the current process with the render server. */640 execvp(serverPtr->cmdArgs[0], serverPtr->cmdArgs);641 ERROR("Can't execute \"%s\": %s", serverPtr->cmdArgs[0],642 strerror(errno));643 exit(1);644 cmd, serverPtr->inputFd, serverPtr->outputFd, display); 645 /* Replace the current process with the render server. */ 646 execvp(serverPtr->cmdArgs[0], serverPtr->cmdArgs); 647 ERROR("Can't execute \"%s\": %s", cmd, strerror(errno)); 648 Tcl_Free(cmd); 649 exit(1); 650 } 644 651 } else { 645 652 close(sock);
Note: See TracChangeset
for help on using the changeset viewer.