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

Re: [HTCondor-users] Setting requirements based on availability of a package



Hi John,

If a user is picky -- or has peculiar requirements -- maybe one could investigate in the various container solutions that HTCondor supports?

It kicks a lot of work back to the user (since they have to figure out which image the want), which may-or-may-not be what you are looking for.

Brian

> On Aug 29, 2017, at 4:49 PM, John G Heim <jheim@xxxxxxxxxxxxx> wrote:
> 
> Right, so that's not exactly what the end-user was asking for. He wants to decide for himself what packages he wants and have condor run his job on just machines that have those packages installed. And it's a reasonable thing to ask for. He doesn't want to have to come to me every time he decides he needs some new utility for his job. But it occurs to me that he is asking for the impossible. To do what he wants, condor would have to do something like run a preliminary job to set his attributes so they could be used in the requirements clause for his real job.
> 
> So I have to put it in the execute nodes config or he can put it in a batch file that runs his actual code. The problem with that batch script approach is that if he submits say 20 jobs, itmight actually run on only 10 nodes ... or 5 ... or none. He'd have to check the error logs to find out.
> 
> Well, the good news is that it's kind of a made up problem. We have a very heterogenius environment here. I already have a flag for whether magma is installed. There shouldn't be any nodes in the cluster that do not also have matlab, mathematica, maple, sage, etc installed. They should allbe identical in terms of software, shared disk space, etc. Only difference is supposed to be stuff like number of cores, amount of ram, etc.
> 
> 
> 
> 
> 
> On 08/29/2017 04:17 PM, Michael Pelletier wrote:
> > In the modern versions of HTCondor you can pipe the output of a script which defines key-value pairs to the configuration using "include : script |" (or include command : script"), and add the attribute names in STARTD_ATTRS. Since I started with version 7.8, I still tend to use a OneShot startd cron job instead of an include:
> >
> > STARTD_CRON_JOBLIST                   = $(STARTD_CRON_JOBLIST) HasTensorFlow
> > STARTD_CRON_HASTENSORFLOW_MODE           = OneShot
> > STARTD_CRON_HASTENSORFLOW_RECONFIG_RERUN = True
> > STARTD_CRON_HASTENSORFLOW_EXECUTABLE     = /usr/bin/python
> > STARTD_CRON_HASTENSORFLOW_ARGS           = \
> > " -c 'import pkgutil; print(''HasTensorFlow = True\n--\n'' if pkgutil.find_loader(''tensorflow'') else '''')'"
> >
> >
> > One advantage of the startd_cron approach is that when certain commands are run by any end-user, the configuration is parsed, which also runs any config-include scripts. The above doesn't do so.
> >
> > Note the techniques for escaping quotes in the ARGS line - one-liners like this can be vexing to debug if you're not paying close attention. In this example, it leaves the attribute undefined if it's not true.
> >
> > To view a list of what "has" attributes a machine is advertising, run "condor_status machine -long | grep -I '^has'"
> >
> > 	-Michael Pelletier.
> >
> >
> >> -----Original Message-----
> >> From: HTCondor-users [mailto:htcondor-users-bounces@xxxxxxxxxxx] On Behalf
> >> Of John G Heim
> >> Sent: Tuesday, August 29, 2017 4:54 PM
> >> To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
> >> Subject: [HTCondor-users] Setting requirements based on availability of a
> >> package
> >>
> >> I have a question from an end-user of our condor cluster. How can you have
> >> a condor job prefer nodes that have a particular package installed.
> >>    Something like:
> >>
> >> hasMatlab = $( -e /usr/local/bin/matlab ) requirements = hasMatlab
> >> --
> >> --
> >> John G. Heim; jheim@xxxxxxxxxxxxx; sip://jheim@xxxxxxxxxxxxxxxx
> >> _______________________________________________
> >> HTCondor-users mailing list
> >> To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with
> >> a
> >> subject: Unsubscribe
> >> You can also unsubscribe by visiting
> >> https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
> >>
> >> The archives can be found at:
> >> https://lists.cs.wisc.edu/archive/htcondor-users/
> > _______________________________________________
> > HTCondor-users mailing list
> > To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
> > subject: Unsubscribe
> > You can also unsubscribe by visiting
> > https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
> >
> > The archives can be found at:
> > https://lists.cs.wisc.edu/archive/htcondor-users/
> >
> _______________________________________________
> HTCondor-users mailing list
> To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
> subject: Unsubscribe
> You can also unsubscribe by visiting
> https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
> 
> The archives can be found at:
> https://lists.cs.wisc.edu/archive/htcondor-users/