Automatizando a instalação do BLAS/LAPACK no Linux
Publicado por Iago Lira (última atualização em 23/02/2017)
[ Hits: 3.211 ]
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
Descobrir se um número é par ou impar
Baixe arquivos em pedaços com o DCDownloader
Gerenciador Simples de Empresa
Nenhum comentário foi encontrado.
KDE Plasma - porque pode ser a melhor opção de interface gráfica
Gentoo: detectando impressoras de rede e como fixar uma impressora por IP
Como o GNOME conseguiu o feito de ser preterido por outras interfaces gráficas
Por que sua empresa precisa de uma PKI (e como automatizar EMISSÕES de certificados via Web API)
Instalando NoMachine no Gentoo com Systemd (acesso Remoto em LAN)
Gentoo: Trocando wpa_supplicant pelo iwd no NetworkManager (Systemd)
Instalar Linux em notebook Sony Vaio VPCEG13EB (10)
Vou destruir sua infância:) (6)
Quando vocês pararam de testar distros? (24)









