I just wanted to share a bit of useful code. I wanted to confirm that all my pvserver processes had the correct DISPLAY environment variable defined. I created an mpi command line that launched two processes per node, with half the processes using -display :0.0 and the other half using -display :0.1. After connecting to the server, I ran this python code inside a Programmable Source:<br>
<br><br>import os<br>import subprocess<br><br>display = os.getenv('DISPLAY')<br>hostname = subprocess.Popen(['hostname'], stdout=subprocess.PIPE).communicate()[0].strip()<br>print hostname, display<br><br>
<br><br><br>The output is printed to the pvserver terminal:<br><br>Process id: 3 >> vs8 :0.0<br>Process id: 4 >> vs14 :0.1<br>Process id: 7 >> vs8 :0.1<br>Process id: 0 >> vs14 :0.0<br>Process id: 5 >> vs30 :0.1<br>
Process id: 1 >> vs30 :0.0<br>Process id: 2 >> vs2 :0.0<br>Process id: 6 >> vs2 :0.1<br><br><br>Pat<br>