[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] Condor and Photoshop action

From: Gandor Florian swisstopo <Florian.Gandor@xxxxxxxxxxxx>
Date: 02/03/2016 09:04 AM

> It seems to me that Photoshop needs the GUI to run actions and that
> HTCondor canât run applications that need the GUI to workâ

> In advance, thanks for your answer,

This won't be applicable to your situation, unfortunately, but it may give you an idea on how to figure out something that would work on Windows.

On Linux, MATLAB plotting depends on the existence of an X Windows display, and without it, it uses a crummy little 640x480 VGA canvas and so your plots come out looking like bedraggled refugees from an 1980's Atari video game.

There's a tool called "Xvfb" (yum install xorg-X11-server-Xvfb on Red Hat 6) which creates a virtual display in memory which can be used in the same way as a physical display by software - you just set the -display argument or the DISPLAY environment variable to point to the proper number - it defaults to using display 99, so you'd just export DISPLAY=:99.0 - and by setting this up as a beefy 1280x1024x32 display, coupled with the -softwareopengl command line option, MATLAB is happy as a clam and produces the high-quality plots you need using the virtual X display, without the need for a physical GUI.

This utterly transformed the productivity of one of our mod/sim teams, who had been stuck running MATLAB jobs on volunteer users' machines by hand, since they were the only ones which had a usable display.

The Xvfb is invoked when requested via the job's +WantXvfb = True attribute, using a USER_JOB_WRAPPER. I attempted to do it using a prepare-job hook, but all prepare-job processes are killed, including a forked Xvfb daemon, when the hook ends and the job begins. The wrapper also looks at +XvfbScreenSize and +XvfbPixDepths attributes for changes to the default dimensions, and sets the job's DISPLAY environment variable to the correct value based on what display number is chosen by the Xvfb daemon.

(I'm hoping to be able to publish this code in the coming months, I'll let everyone know if I get through the hurdles.)

I'm not sure if there's something comparable that could be done with Windows, but good luck in any case!

        -Michael Pelletier.