#!/bin/bash # pour utiliser la fonctionnalité 'array' de OAR: # OAR --array-param-file param.txt, où param.txt # a une syntaxe prédéfinie qui ne peut lancer # notre fonction matlab : # gradientconj('$n,$tol,$maxiter)' # Il faut donc passer par un script secondaire (ce script) # qui récupère les 3 arguments # - n = taille matrice # - tol = tolerance # - maxiter : nb iteration maximum source /nfs/opt/env/env.sh > /dev/null 2>&1 module load matlab if [[ $# -ne 3 ]] ; then echo '3 arguments obligatoires' exit 0 fi echo "params: $1, $2, $3" #straights_bench('$LDA,$TOL,$MATRICE,$SOLUTION)' matlab -nodesktop -nodisplay -nosplash -nojvm -r "gradientconj($1,$2,$3);exit"