Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In one of our compute clusters, we have systems with unique hardware resources to which access is controlled by device-file permissions. Each node has two or four of these, and multiple CPU cores. We'd like to be able to schedule different users' jobs on the same node and restrict access to the properly-assigned resources. (Some queues might even be CPU-only, with no access.)

For a while, we were running with a "hey, pay attention and play nice" policy, but that's hard for everyone to keep straight even with the best intentions. So instead we just schedule the entire node for a given user at a time. This is wasteful for single-threaded, single-process tasks.

With Torque, one can run a prologue script as root before the job starts. This could be made to set the device permissions appropriately. But we're running (née Sun) Grid Engine. That has per-queue prolog scripts, but they runs as the user to whom the job belongs (like Torque's prologue.user), which is no help here.

Is there something obvious I'm missing (I hope), or an alternate way to approach this? I realize that I have the source code and therefore can do anything, but I'm hoping there's a standard way I'm just missing.

Thanks!

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

The prolog script can actually be run as any user.

From man queue_conf:

prolog

The executable path of a shell script that is started before execution of Grid Engine jobs with the same environment set- ting as that for the Grid Engine jobs to be started afterwards. An optional prefix "user@" specifies the user under which this procedure is to be started.

So setting prolog root@/path/to/prolog should have it execute as root.

share|improve this answer
    
That sounds like the obvious thing I was missing. :) Off to try it... –  mattdm Jan 18 '11 at 20:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.