나를 위해 결국 효과가있는 것이 해결책 (1)이었습니다. 여기에 내 condor 제출 파일 및 작업자 셸 스크립트에서 구현 한 방법 (1)에 대해 설명합니다.
다음은 쉘 스크립트입니다. 중요한 변화는 R이 계산 노드에 설치되어 있는지 확인하는 것입니다 : if [ -f /usr/bin/R ]
. R이 발견되면 반환 값 0으로 끝나는 경로로 이동합니다. R이 없으면 1을 반환합니다 (라인 exit 0
및 exit 1
의 의미입니다).
mkdir output
if [ -f /usr/bin/R ]
then
if $(uname -m |grep '64')
then
Rscript code/simulations-x86_64.r $*
else
Rscript code/simulations-i386.r $*
fi
tar -zcvf output/output-$1-$2.tgz2 output/*.csv
exit 0
else
exit 1
fi
이제 콘도 제출 파일. 결정적인 변화는 두 번째 - 마지막 줄 (on_exit_remove = (ExitBySignal == False) && (ExitCode == 0)
)이었습니다. 계산 노드에서 각 작업의 반환 값을 확인합니다. 반환 값이 0이 아닌 경우 (즉, 계산 노드에서 R을 찾지 못한 경우) 작업을 다시 실행하기 위해 대기열에 넣습니다. 그렇지 않으면 작업이 완료된 것으로 간주되어 대기열에서 제거됩니다.
universe = vanilla
log = logs/log_$(Cluster)_$(Process).log
error = logs/err_$(Cluster)_$(Process).err
output = logs/out_$(Cluster)_$(Process).out
executable = condor/worker.sh
arguments = $(Cluster) $(Process)
requirements = (Target.OpSys=="LINUX" && regexp("stat", Machine))
should_transfer_files = YES
when_to_transfer_output = ON_EXIT_OR_EVICT
transfer_input_files = code, R-libs, condor, seeds.csv
transfer_output_files = output
notification = Never
on_exit_remove = (ExitBySignal == False) && (ExitCode == 0)
queue 1800
2 들어 https://github.com/viking/Renv 도움이 될 수 – hadley
[세이 (http://www.sagemath.org/)가 경로 생성에서 (많은 다른 사람들) R 번들 독립적 인 패션.아마도 당신은 그들이 그것을하는 것처럼 들여다 볼 수 있습니다. 대부분의 경우, 라이브러리가있는 디렉토리에'LD_LIBRARY_PATH'를 내보내는 것으로 충분할 것입니다. – MvG
감사합니다, 여러분. @MvG : 나는 현자가 R을 묶는다는 것을 알지 못했습니다. 아마 계산 노드에 sage를 보냄으로써 그것을 활용할 수 있습니다. – Wesley