Hook: Move job to Execution-Queue

Hello,
we have a job which moves some jobs from our routing-queue to one of the execution queues based on some ressources and user limits from a third-party-system.

We have the problem that the job is moved to the queue by event=queuejob and then the user gets the information, that the job is rejected:
qsub: Access to queue is denied

Then i look into the server log, i see that the error is 15022.
The code looks like this (only parts): https://gist.github.com/Phhere/1451349967e2272b4c338012e5508200

Do you have any idea how to fix this problem?
The Queue UV2000 has this settings:
create queue UV2000
set queue UV2000 queue_type = Execution
set queue UV2000 Priority = 145
set queue UV2000 max_queued = [u:PBS_GENERIC=1024]
set queue UV2000 from_route_only = True
set queue UV2000 default_chunk.arch = uv2000
set queue UV2000 default_chunk.Qlist = uv2000
set queue UV2000 enabled = True
set queue UV2000 started = True

Kind Regards:
Philipp Rehs
University Düsseldorf, Germany

Hello Philipp, you are getting this rejection because of the “from_route_only” queue attribute. Setting the queue on a job directly from a queuejob hook does not qualify as a job being routed into the execution queue from a routing queue.

I already suspected this and changed from_route_only to false.
In which kind of hook would it work?

“we have a job which moves some jobs from our routing-queue to one of the
execution queues based on some ressources and user limits from a
third-party-system”

Philipp, I think we need to find out what is the purpose of this moving job
here.
If the third-party system is a licensed application, and we are waiting on
licenses, then you need to implement a license sensor.

If perhaps the job is waiting for another job to finish, ie there is a
workflow and a series of jobs which are run to process the data,
then maybe you should use a job dependency?

I hope I have not said somthing stupid.

We want all jobs which meet one of the following conditions to get moved to the UV2000-Queue:

  • more than 24 cores in one chunk
  • more than 120gb ram in one chunk
  • have arch=uv2000 as ressource

If you have an idea how we can configure this, it would be great if you share your idea

Philipp,

  1. You can use a wrapper script or job submission script which would take the input from the users and ( memory, cpus, arch, input file name, walltime etc ) and does the qsub at the end to specific queues ( here in this case it will be UV2000-Queue )

  2. server periodic hook on a queue which has not started , which calls a scripts which these conditions and qmoves the jobs that match [ No 1 would be neat ]

Hi Philipp,

Section 4.8.40, “Routing Jobs”, on page 185 in the 14.2.1 Admin Guide,
might be helpful. It presents methods for collecting and routing jobs.