[bwc] Write a tutorial to use several sequences
Imported issue: Initially reported by @gaudry in https://gforge.inria.fr/tracker/?group_id=2065&aid=16857
Bwc has support to make use of several sequences running in parallel on independent clusters.
This is currently not available in an automatic way from bwc.pl (not sure it will be, since in such a context, a manual intervention is almost surely necessary anyway).
We should however provide a Howto or Tutorial, or whatever Readme to make this nice feature easy to use without too much knowledge of the internals of bwc.
As a start, here is a list of commands that worked for me. The goal was to split the linalg computation in two sequences, each of them running on 4 nodes, each node having 16 cores (this was suboptimal for the c180 that was to be factored, but it provided a good matrix size for a test). The beginning of the computation was done with the cadofactor.py script. I also put the characters and sqrt lines, because it is pointless to use again the script after the linear algebra: the last steps are really easy to run manually.
##################################################################
export WDIR=/home/pgaudry/c180_sw/bwc
export MATFILE=/home/pgaudry/c180_sw/c180.merge.small.bin
export BALANCING=$WDIR/c180.merge.small.8x8.d6eee301.bin
export OPTS=""mn=128 wdir=WDIR thr=4x4 mpi=2x2 nullspace=left matrix=
MATFILE balancing=$BALANCING""
export MPI_OPT1=""--machinefile machfile1 --mca plm_rsh_agent oarsh -n 4""
export MPI_OPT2=""--machinefile machfile2 --mca plm_rsh_agent oarsh -n 4""
export BWC_BIN=""/home/pgaudry/cado-nfs/build/catrel-nodes/linalg/bwc""
mf_bal
BWC_BIN/mf_bal --shuffled-product mfile=
MATFILE out=$WDIR/ 8 8
cat > machfile1 <<EOF
catrel-42
catrel-41
catrel-40
catrel-39
EOF
cat > machfile2 <<EOF
...
EOF
dispatch
/usr/bin/mpiexec $MPI_OPT1 $BWC_BIN/dispatch $OPTS ys=0..128 sequential_cache_build=1 sanity_check_vector=H1 ys=0..64
prep
/usr/bin/mpiexec $MPI_OPT1 $BWC_BIN/prep $OPTS
secure
/usr/bin/mpiexec $MPI_OPT1 $BWC_BIN/secure $OPTS
split
$BWC_BIN/split $OPTS splits=0,64,128 --split-y
krylov
/usr/bin/mpiexec $MPI_OPT1 $BWC_BIN/krylov $OPTS ys=0..64
/usr/bin/mpiexec $MPI_OPT2 $BWC_BIN/krylov $OPTS ys=64..128
make a copy of the data because acollect needs --remove-old
mkdir -p $WDIR/save_A
cp $WDIR/A* $WDIR/save_A/
acollect
$BWC_BIN/acollect $OPTS --remove-old
lingen
$BWC_BIN/lingen $OPTS --lingen-threshold 64
split again
$BWC_BIN/split $OPTS splits=0,64,128 --split-f
mksol
/usr/bin/mpiexec $MPI_OPT1 $BWC_BIN/mksol $OPTS ys=0..64
/usr/bin/mpiexec $MPI_OPT2 $BWC_BIN/mksol $OPTS ys=64..128
gather
/usr/bin/mpiexec $MPI_OPT1 $BWC_BIN/gather $OPTS
###########################################################################
characters
characters -poly $DIR/c180.polyselect.poly -purged $DIR/c180.purge.purged.gz -index $DIR/c180.merge.index.gz -heavyblock $DIR/c180.merge.small.dense.bin -out $DIR/c180.characters.kernel -ker $DIR/c180.bwc.W -lpbr 32 -lpba 32 -nchar 50 -t 2
sqrt
sqrt -poly $DIR/c180.polyselect.poly -prefix $DIR/c180.dep -purged $DIR/c180.purge.purged.gz -index $DIR/c180.merge.index.gz -ker $DIR/c180.characters.kernel -ab
sqrt -poly $DIR/c180.polyselect.poly -prefix $DIR/c180.dep -purged $DIR/c180.purge.purged.gz -index $DIR/c180.merge.index.gz -ker $DIR/c180.characters.kernel -dep 0 -rat -alg -gcd
sqrt -poly $DIR/c180.polyselect.poly -prefix $DIR/c180.dep -purged $DIR/c180.purge.purged.gz -index $DIR/c180.merge.index.gz -ker $DIR/c180.characters.kernel -dep 1 -rat -alg -gcd