Revision 24d2dc18e53205337a4bb9bc2dd1f9faa17798e3 authored by Lionel Muller on 07 October 2011, 09:58:47 UTC, committed by Lionel Muller on 07 October 2011, 09:58:47 UTC
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/cado-nfs/trunk@957 3eaf19af-ecc0-40f6-b43f-672aa0c71c71
1 parent 171f670
Raw File
factor_from_rels
#!/bin/bash
# shell-script to automate the (re)factorization of reference numbers
# Usage: factor_from_rels name <parameters>

# You may tweak the choice of default parameters on the command line. If
# variables d, tmp, cado, or mt are defined in the environment, then the
# values for the environment are preferred over the default values which
# can be read below for these parameters.

# update if necessary, or better autoselect directory from site (LORIA/LIX)
: ${d:=/net/tiramisu/cado1/cado/Examples}
: ${tmp:=/localdisk/tmp}
# $cado should point to the ../dist/src directory
: ${cado:="`dirname $0`"}
: ${maxlevel:=15}
: ${cwmax:=100}
: ${rwmax:=100}
# number of processors
: ${mt:=2}

name=$1

if ! [ -d "$d/$name" ] ; then
    echo "No directory $d/$name found" >&2
    exit 1
fi

echo "Using temporary directory $tmp"

tmp=`mktemp -d`
rsync -a "$d/$name/" "$tmp/"

cp $d/$name/$name.poly $tmp
# $cado/sieve/makefb -poly $tmp/$name.poly > $tmp/$name.roots
# we assume now the relations are complete
# $cado/postsieve/checknorms/checknorms -poly $tmp/$name.poly $d/$name/$name.rels >> $tmp/rels.0
cp $d/$name/$name.rels $tmp/rels.0
$cado/linalg/freerel -poly $tmp/$name.poly $d/$name/$name.rels > $tmp/rels.free
echo "cado=$cado" > $tmp/params
echo "root=$tmp/$name" >> $tmp/params
echo "keeppurge=160" >> $tmp/params
echo "maxlevel=$maxlevel" >> $tmp/params
echo "cwmax=$cwmax" >> $tmp/params
echo "rwmax=$rwmax" >> $tmp/params
echo "mt=$mt" >> $tmp/params
echo "bwstrat=0" >> $tmp/params
echo "ratio=1.2" >> $tmp/params
echo "skip=32" >> $tmp/params
$cado/merge_linalg_sqrt2.sh $tmp/params
if [ "$CADO_DEBUG" ] ; then
    echo "(debug mode -- keeping $tmp)"
else
    echo Removing $tmp
    /bin/rm -fr $tmp
fi
back to top