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

Re: [Condor-users] _CONDOR_SLOTID always 1 when using hooks?



On 01/22/2010 11:38 AM, Ian Chesal wrote:
> Anyone else using hooks notice this? The _CONDOR_SLOTID environment
> variable in my hook jobs seems to always be set to 1 no matter which
> slot a job runs in on the machine.
> 
> - Ian

I hadn't noticed, but I can see why...

      // slot identifier
   env_name = base.Value();
   env_name += "SLOT";
   int slot = getMySlotNumber();
   if (!slot) {
      slot = 1;
   }
   proc_env->SetEnv(env_name.Value(), slot);

...which is creepy given that getMySlotNumber tries to guess the number by which STARTER_LOG is being written to, and the logic from getMySlotNumber seems to be in more than one place. If the starter is logging to .../StarterLog.slotX the _CONDOR_SLOT=X.

Are you doing anything to make all the slots log to the same file?

BTW, I also don't see a _CONDOR_SLOTID as much as a _CONDOR_SLOT.

Best,


matt