|
|
by George Ang
About Scilab and BLAS [from wikipedia]
Scilab is a numerical computational package developed by INRIA and ENPC in France. It is a high level programming language, loosely based on the C programming language, and similar in functionality to MATLAB and is freely available to download. The program enables users to compute a wide range of mathematical operations from relatively simple operations such as multiplication to high level operations such as correlation and complex arithmetic. The software is often used for signal processing, statistical analysis, image enhancement, fluid dynamics simulations etc.
asic Linear Algebra Subprograms (BLAS) are routines which perform basic linear algebra operations such as vector and matrix multiplication. They were first published in 1979, and are used to build larger packages such as LAPACK. BLAS routines are tuned by high performance computing, supercomputer hardware, and software vendors to run extremely fast under a variety of problem sizes. The LINPACK benchmark relies heavily on DGEMM, a BLAS subroutine, for its performance.
Installing blas-atlas
The BLAS API has many implementations. The top-two famous package implementing BLAS API are Atlas and Goto BLAS. In this howto we describe the Atlas whose source code would be completely generated according to the specific hardware platforms on the fly.
The easiest way of installing blas-atlas was supposed to be one-line command:
But this way might fail and you won't get a optimised installation.So it is suggested that we should use the 'interactive mode':- interactive=1 emerge blas-altas
复制代码
And here comes the first question:023
022
021
020
019
018
017
016
015
014
013
012
011
010
009
008
007
006
005
004
003
002
001
Enter number at top left of screen [0]:023 enter the number at top left of screen (here we enter 023),and press Enter.
The next question is a conformnation asking whether you've read the errata file online.we should say `y' (of course .:])。And then another `y' saying continue.Enter your machine type:
1. Other/UNKNOWN
2. AMD Athlon
3. 32 bit AMD Hammer
4. 64 bit AMD Hammer
5. Pentium PRO
6. Pentium II
7. Pentium III
8. Pentium 4
9. Pentium 4E (prescott)
10. Transmeta Efficeon
Enter machine number [1]:2 Now is the most important part. Skilled users who already setted up the -march parameter in /etc/make.conf would know exactly what to do. For non-skilled users, just see whether there is a AMD/INTEL trademark on your laptop or desktop cube,and choose 2 or 8, Which should work most of time.ATLAS has default parameters for OS='Linux' and system='ATHLON'.
If you want to just trust these default values, you can use express setup,
drastically reducing the amount of questions you are required to answer
use express setup? [y]: Press Enter to use the express setup。You need to choose a name which represents this architecture (eg. UltraSparc,
Dec21164, etc). Do not use a generic name (eg. solaris, linux), which might
apply to different hardware. This architecture name will be appended to the
name of the created make include file, and appear in all subdirectories, so
don't make it longer than you like to type. The name should follow the rules
for file names (so don't use punctuation and spaces, for instance).
Enter Architecture name (ARCH) [Linux_ATHLONSSE3]:
We left the default value here by pressing Enter, which would be just okay.
The ATLAS install process is heavily file-based, and this can cause major
reliability problems when interacting with an overloaded or malfunctioning
remotely mounted filesystem. ATLAS therefore has a mechanism in place to
allow for a delay before a file is declared to not be there, so that
slow NFS (i.e., waiting for amd timout) problems can be overcome, or for
handling slightly differing clocks between server/client. This problem is
magnified if doing cross-compilation. In the question below, we ask how
much of a delay, in seconds, ATLAS should tolerate between file creation
and appearance. If you are installing on a local filesystem (eg. /tmp) or
a smooth-running NFS system, answer 0; for a moderately loaded NFS server, you
may want a value in the 10 second range, and for cross-compiling systems or
NFS servers experiencing errors, you may want to go as high as a couple
of minutes (120).
Enter File creation delay in seconds [0]:
As it detailed , I should enter `0' or just Entry for the local filesystem.
Your architectural defaults do not include defaults for the
Level 1 BLAS. ATLAS now has the ability to tune the Level 1 BLAS to
your machine. However, this will add time to the install. If your
algorithm utilizes the Level 2 or Level 3 BLAS to any degree, the
the Level 1 BLAS will usually be a low order term, and thus only matter
for small problems. Therefore, if you don't think you need good performance
from the Level 1 BLAS, you can answer "no" to the question below, and ATLAS
will skip the Level 1 tuning. ATLAS will still provide Level 1 BLAS, but
their performance may be much worse than if tuning were allowed.
Tune the Level 1 BLAS? [y]: Full topics about Level 1/2/3 implementation of BLAS refers to this wiki entry:
http://en.wikipedia.org/wiki/Bas ... gebra%20Subprograms
If you don't want to understand what they are, just consider whether you want faster installation or higher performance. And decide y/n.(The Level 1 BLAS tuning may take hours to do, very boring).
Now goto the bar and date some girl, or anything just kidding time.
When you come back and got the prompt back,launch this to install lapack
:- interactive=1 emerge lapack-atlas
复制代码
The procedure is just the same as installing blas-atlas。Actually we are instaling different parts of one package-atlas。The rest of the jobs would be easy.
Unmasking Scilab
unmasking newest scilab in /etc/portage/package.keywords- echo "sci-mathematics/scilab ~x86" >> /etc/portage/package.keywords
复制代码
Installition
Now enjoy the painless installition. Compilation won't take long.
Using Scilab
to launch scilab,just invoke scilab in the terminal:
Enjoy computing and mathematics! |
|