Skip to content

Experiment Setup for XCSP3 Mini Track

Léo Boisvert edited this page May 19, 2023 · 15 revisions

Getting the Competition Instances

This script can be used to download and extract the instances for the mini track of the XCSP3 competition.

#!/bin/bash

wget https://www.cril.univ-artois.fr/~lecoutre/compets/instancesXCSP22.zip
unzip instancesXCSP22.zip 
rm -rf instancesXCSP22.zip
rm -rf instancesXCSP22/COP
rm -rf instancesXCSP22/CSP
cd instancesXCSP22
cd MiniCOP
for lzma_file in *.lzma; do xz --decompress "$lzma_file"; done
cd ../MiniCSP
for lzma_file in *.lzma; do xz --decompress "$lzma_file"; done
cd ../../

Setting up the env

  1. Connect to the host
  2. Load the julia module: module load julia - On the CIRRELT machines, this should load julia 1.7.2
  3. Git pull SeaPearl and complete the setup with the following bash script:
#!/bin/bash
git pull https://github.com/corail-research/SeaPearl.jl.git

# Check if Julia is already installed
if ! command -v julia &> /dev/null
then
    echo "Julia could not be found. Installing..."
    wget https://julialang-s3.julialang.org/bin/linux/x64/1.7/julia-1.7.0-linux-x86_64.tar.gz
    tar -xvzf julia-1.7.0-linux-x86_64.tar.gz
    sudo mv julia-1.7.0 /opt/
    sudo ln -s /opt/julia-1.7.0/bin/julia /usr/local/bin/julia
    echo "Julia 1.7.0 has been installed"
else
    echo "Julia is already installed"
fi

cd SeaPearl.jl

# Activate the project and add the packages
julia --eval 'using Pkg; Pkg.activate("."); Pkg.instantiate(); Pkg.precompile()'
  1. At this point, the setup should be complete. You can now evaluate the solver on the instances.