2,722
edits
(run xds in a container) |
|||
Line 83: | Line 83: | ||
export PATH=$PATH | export PATH=$PATH | ||
echo $SGE_TASK_ID | $JOB | echo $SGE_TASK_ID | $JOB | ||
</pre> | |||
== setup of XDS for a containerized system == | |||
In order to setup XDS for a container system, the ''forkxds'' script needs to be changed. Emilio Centeno <ecenteno@cells.es> created a "container-friendly" forkxds. This is the piece of code affected, with just one changed line: | |||
<pre> | |||
do | |||
if [ $nhosts -gt 1 ] #distribute jobs among the cluster nodes | |||
then | |||
j=$(( (itask -1) % nhosts )) #changed from % nhosts + 1 to nhosts | |||
# Original line | |||
# echo "$itask" | ssh -x ${rhosts[$j]} "cd $PWD && $amain && sync" & | |||
# Image in file (.sif) | |||
# echo "$itask" | ssh -o StrictHostKeyChecking=no -x ${rhosts[$j]} "cd $PWD && ml Apptainer && apptainer exec /container_path/my_xds_container.sif $amain && sync" & | |||
# Image already loaded in an instance | |||
echo "$itask" | ssh -o StrictHostKeyChecking=no -x ${rhosts[$j]} "cd $PWD && ml Apptainer && apptainer exec instance://my_xds_instance $amain && sync" & | |||
else | |||
echo "$itask" | $amain && sync & #submit all jobs to the peer node | |||
fi | |||
pids="$pids $!" #append id of the new background process | |||
itask=`expr $itask + 1` | |||
# NOTE: sync after $amain complete pending disk writes on each node | |||
done | |||
</pre> | </pre> | ||