Automatizando a instalação do BLAS/LAPACK no Linux

Publicado por Iago Lira (última atualização em 23/02/2017)

[ Hits: 2.804 ]

Homepage: https://notabug.org/iagolira/

Download install-lapack.sh

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ões atualizadas deste script

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


Esconder código-fonte

#!/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

Scripts recomendados

simulado lpi

Conversor do VMware para o VirtualBox

Backup com TAR em LOG usando FITA LTO/DLT com filtro de arquivos

Remover kernels antigos com zenity

Reconexão automática para internet ADSL


  

Comentários

Nenhum comentário foi encontrado.


Contribuir com comentário




Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts