Dear Proof expert:
I set a crontab to submit proof jobs automatically:
[valtical00] /work/users/qing/dq2 > crontab -l | grep sam_proof.sh
*/10 * * * * source /data5/qing/SAM_proof/sam_proof.sh >/dev/null 2>&1
[valtical00] /data5/qing/SAM_proof > cat sam_proof.sh
#!/bin/bash
export rootpath=/data5/qing/SAM_proof
cd $rootpath
echo pwd
> /data5/qing/SAM_proof/log
source /etc/profile
source /afs/cern.ch/sw/lcg/contrib/gcc/4.3/x86_64-slc5-gcc43-opt/setup.sh
export ROOTSYS=/afs/cern.ch/sw/lcg/app/releases/ROOT/5.26.00/x86_64-slc5-gcc43-opt/root
export PATH=/afs/cern.ch/sw/lcg/external/Python/2.5.4p2/x86_64-slc5-gcc43-opt/bin:$ROOTSYS/bin:$PATH
export LD_LIBRARY_PATH=$ROOTSYS/lib:/afs/cern.ch/sw/lcg/external/Python/2.5.4p2/x86_64-slc5-gcc43-opt/lib:$LD_LIBRARY_PATH
export PYTHONPATH=$PYTHONPATH:$ROOTSYS/lib
export cmd=ps eux | grep 'python sam_proof.py' | grep -v grep | grep -v 'ps eux'
echo $cmd
if [ “$cmd” == “” ] ; then
echo 'Running sam_proof.py now’
python sam_proof.py >> /data5/qing/SAM_proof/log 2>&1
else
echo 'python sam_proof.py is already running’
fi
#echo “” >> $rootpath/log
cd $rootpath
When I run directly from the terminal, everything goes fine. But when run in crond, the following error appeared in the log file:
[valtical00] /data5/qing/SAM_proof > cat log
/data5/qing/SAM_proof
Error in TProof::AssertPath: could not create path /afs/cern.ch/user/q/qing/.proof
Error in TProof::Init: failure asserting directory /afs/cern.ch/user/q/qing/.proof
Error in TProof::Open: new session could not be created
Traceback (most recent call last):
File “sam_proof.py”, line 72, in
main()
File “sam_proof.py”, line 64, in main
submit_newjob()
File “sam_proof.py”, line 44, in submit_newjob
p.SetParameter(“PROOF_RateEstimation”,“average”)
TypeError: none of the 5 overloaded methods succeeded. Full details:
attempt to access a null-pointer
void TProof::SetParameter(const char* par, Int_t value) =>
could not convert argument 2 (Objects/longobject.c:225: bad argument to internal function)
void TProof::SetParameter(const char* par, Long_t value) =>
could not convert argument 2 (Objects/longobject.c:225: bad argument to internal function)
void TProof::SetParameter(const char* par, Long64_t value) =>
could not convert argument 2 (an integer is required)
void TProof::SetParameter(const char* par, Double_t value) =>
could not convert argument 2 (a float is required)
I am wondering why proof needs to create /afs/cern.ch/user/q/qing/.proof instead of /data5/qing/SAM_proof/.proof in crond?
Cheers,Gang