Create index files for the experiments
This commit is contained in:
parent
efd7df068e
commit
5e2797bcde
@ -17,7 +17,7 @@ env=(
|
|||||||
PATH="@nixPrefix@@busybox@/bin:@busybox@/bin:@extraPath@"
|
PATH="@nixPrefix@@busybox@/bin:@busybox@/bin:@extraPath@"
|
||||||
$(env | grep ^SLURM || true)
|
$(env | grep ^SLURM || true)
|
||||||
$(env | grep ^PMI || true)
|
$(env | grep ^PMI || true)
|
||||||
$(env | grep ^GARLIC_OUT || true)
|
$(env | grep ^GARLIC || true)
|
||||||
$(env | grep ^USER || true)
|
$(env | grep ^USER || true)
|
||||||
HOME="/homeless-shelter"
|
HOME="/homeless-shelter"
|
||||||
)
|
)
|
||||||
|
@ -13,6 +13,9 @@ group=$(id -gn)
|
|||||||
|
|
||||||
export GARLIC_OUT="/gpfs/projects/bsc15/garlic/out/$user"
|
export GARLIC_OUT="/gpfs/projects/bsc15/garlic/out/$user"
|
||||||
mkdir -p "$GARLIC_OUT"
|
mkdir -p "$GARLIC_OUT"
|
||||||
|
export GARLIC_INDEX="/gpfs/projects/bsc15/garlic/index/$user"
|
||||||
|
mkdir -p "$GARLIC_INDEX"
|
||||||
|
export GARLIC_USER="$user"
|
||||||
cd "$GARLIC_OUT"
|
cd "$GARLIC_OUT"
|
||||||
|
|
||||||
exec @nixPrefix@@program@
|
exec @nixPrefix@@program@
|
||||||
|
@ -55,11 +55,31 @@ stdenv.mkDerivation {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "\$GARLIC_EXPERIMENT" ]; then
|
||||||
|
>&2 echo "GARLIC_EXPERIMENT not defined, aborting"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "\$GARLIC_INDEX" ]; then
|
||||||
|
>&2 echo "GARLIC_INDEX not defined, aborting"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
cd "\$GARLIC_OUT"
|
cd "\$GARLIC_OUT"
|
||||||
|
|
||||||
# Set the experiment unit in the environment
|
# Set the experiment unit in the environment
|
||||||
export GARLIC_UNIT=$(basename $out)
|
export GARLIC_UNIT=$(basename $out)
|
||||||
|
|
||||||
|
# Create an index entry
|
||||||
|
rm -f "\$GARLIC_INDEX/${conf.unitName}" \
|
||||||
|
"\$GARLIC_INDEX/${conf.expName}"
|
||||||
|
|
||||||
|
ln -Tfs "../../out/\$GARLIC_UNIT" \
|
||||||
|
"\$GARLIC_INDEX/${conf.unitName}"
|
||||||
|
|
||||||
|
ln -Tfs "../../out/\$GARLIC_EXPERIMENT" \
|
||||||
|
"\$GARLIC_INDEX/${conf.expName}"
|
||||||
|
|
||||||
if [ -e "\$GARLIC_UNIT" ]; then
|
if [ -e "\$GARLIC_UNIT" ]; then
|
||||||
>&2 echo "skipping, unit path already exists: \$GARLIC_UNIT"
|
>&2 echo "skipping, unit path already exists: \$GARLIC_UNIT"
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user