Automatizando a instalação do BLAS/LAPACK no Linux
Publicado por Iago Lira (última atualização em 23/02/2017)
[ Hits: 3.194 ]
Homepage: https://notabug.org/iagolira/
Download 1482896123.install-lapack.sh (versão 2)
LAPACK é escrito em Fortran 90 e fornece as rotinas para resolver sistemas de equações lineares simultâneas, de mínimos quadrados e soluções de sistemas de equações lineares.
Fonte: http://www.netlib.org/lapack/
Versão 2 - Enviado por Iago Lira em 28/12/2016
Changelog: Fiz algumas melhorias e correção de alguns bugs.
Download 1482896123.install-lapack.sh
#!/bin/bash
##+------------------------------------------------------+
##| Autor: Francisco Iago Lira Passos |
##| Local: Teresina - PI |
##| Tags: BLAS/LAPACK install, instalação do BLAS/LAPACK |
##+------------------------------------------------------+
##Begin: Global variable
export site="http://www.netlib.org/lapack"
export choose
export nlist
export file
export dir
export dirs=`pwd`
##End: Global variable
##Begin: Access the source code of the site
wget $site -q -O - | grep -o -P '(?<=>).*(?=<\/a>)' | grep [0-9].tgz | sed '1d' > $dirs/tgz
##End: Access the source code of the site
##Begin: directory
function directory() {
clear
echo "----------------------------------------------------------------"
read -p "Where do you want to download the LAPACK? (ex: /home/user/)?: " dir
}
##End: directory
##Begin: Installer
function installer() {
clear
echo "------------------------------------"
read -p "What installer you use (apt/yum)? " inst
if [ "$inst" = "apt" ]; then
apt-get install --yes --force-yes liblapack-dev
else
yum install -y lapack-devel blas-devel
fi
}
##End: Installer
##Begin: Instalation
function install() {
nlist=`cat $dirs/tgz | wc -l`
[[ $choose -ge 1 && $choose -le $nlist ]] && { file=`cat $dirs/tgz | head -n $choose | tail -n 1`; } || menu
directory
nfile="`echo $file | sed 's/.tgz//g'`"
wget -c -P $dir $site/$file
cd $dir
tar xvzf $file
cd $nfile/
##installer ##Optional
mv make.inc.example make.inc
make blaslib
make
}
##End: Instalation
##Begin: Menu
function menu() {
clear
nlist=`cat tgz | wc -l`
i=2
tput cup 2 27
echo "(NEW)"
tput cup 1 1
echo "+--------------------------------+"
while read file
do
echo " | ($(($i-1))) -> $file"
tput cup $i 34
echo "|"
let i++
done < tgz
echo " +--------------------------------+"
read -p "Choose the version you want to install by number: " choose
[[ $choose -ge 1 && $choose -le $nlist ]] && install || menu
}
##End: Menu
##Begin: Chama o menu
menu
##End: Chama o menu
Acesso remoto via SSH sem senha
Nenhum comentário foi encontrado.
Bluefin - A nova geração de ambientes de trabalho Linux
Como atualizar sua versão estável do Debian
Cirurgia para acelerar o openSUSE em HD externo via USB
Quer auto-organizar janelas (tiling) no seu Linux? Veja como no Plasma 6 e no Gnome
Copiando caminho atual do terminal direto para o clipboard do teclado
Script de montagem de chroot automatica
Conky não mostra temperaturas da CPU no notebook (0)
Não estou conseguindo fazer funcionar meu Postfix na versão 2.4 no Deb... (0)









