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

Re: [HTCondor-users] Why does HTCondor replace my executable with condor_exec.exe on Linux?



When I condor_submit a job that tells it to run /Volume/my/network/shared/drive/foo.a, it seems to run correctly. However when I print argv[0], it shows condor_exec.exe instead of foo.a.

Seems like you might be able to work around this with a wrapper script that exec's your real binary, which should [re]set argv[0]; something like

	#!/bin/bash
	exec /Volume/my/network/shared/drive/foo.a "$@"

Or else do it right from the submit file:

	executable = /bin/bash
	arguments = "-c 'exec /Volume/my/network/shared/drive/foo.a ...'"


Not sure whether these are considered "recommended practice", but either way it should re-replace the "condor_exec.exe" in argv[0] with "/Volume/my/network/shared/drive/foo.a", if you need that.

Carl

On Thu, 4 Aug 2016, Michael Di Domenico wrote:

On Thu, Aug 4, 2016 at 10:43 AM, Nathan W. Panike
<nathan.panike@xxxxxxxxx> wrote:
This is documented behavior

https://research.cs.wisc.edu/htcondor/manual/v8.4/2_15Potential_Problems.html

On Thu, Aug 4, 2016 at 5:05 AM, Jason Liu <jason.liu@xxxxxxxxxxxxx> wrote:
When I condor_submit a job that tells it to run
/Volume/my/network/shared/drive/foo.a, it seems to run correctly. However
when I print argv[0], it shows condor_exec.exe instead of foo.a. This is
version 8.4.7 on Ubuntu 14.01.

Why does HTCondor do this? Is this a bug?

Reading the source code, it looks like OsProc::StartJob() is deliberately
replacing argv[0] with condor_exec.exe. Can someone explain this behaviour?

A better question would be, whether there is a way to turn it off?
Under 99% of our use cases i don't really care that argv[0] is
replaced, except when GPU's are concerned.

when you run nvidia-smi, instead of seeing which program is attached
to which gpu, it only shows the condor exec strings, which is
annoying, but doesn't actually impact anything
_______________________________________________
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/