[GUFSC] FAQ: porque usar GNU/Linux e Software Livre na Engenharia e nas Ciências Exata s

Ricardo Grützmacher gufsc@das.ufsc.br
Fri, 08 Nov 2002 04:25:02 -0200


Fonte: http://www.comsoc.org/vancouver/scieng.html


Please consider joining the IEEE/VanLUG Science and Engineering SIG and 
participating in both our mailing list and other events that we may 
schedule from time to time.  In the meantime, we hope that you'll find 
this list of Frequently Asked Questions about GNU/Linux in Science and 
Engineering to be useful.  While the target audience for this FAQ are 
scientists and engineers who are in the process of migrating to Linux, 
hopefully even those with lots of experience will find a few useful nuggets.

   1.  How do I convince our senior management to let the technical 
staff run Linux
        rather than a widely used (but deeply flawed) alternative?
   2.  What is the purpose of the IEEE/VanLUG Science and Engineering SIG?
   3.  How does one join the IEEE/VanLUG Science and Engineering SIG?
   4.  What are some free alternatives to proprietary software?
   5.  Which commercial Science and Engineering software has been ported 
to GNU/Linux?
   6.  Which commercial Science and Engineering software hasn't yet been 
ported to GNU/Linux?
   7.  Can I compile and run my existing Fortran code under Linux?
   8.  Is there a good mechanical CAD or drafting package for Linux?
   9.  How can one keep up to date with science and engineering software 
for GNU/Linux?
        (journals, mailing lists, websites)
10.  How is the Scientific Applications on Linux (SAL) website structured?
11.  What is Scilab?
12.  What is the Intel/ASCI Red Software?
13.  What is IBM techexplorer?
14.  What is Python?
15   What is PERL and why is it of interest to scientific programmers?
16.  What are ten good practices for scientific programming?

FAQ Contributors: Dave Michelson, Petar Knezevich, Andrew Daviel, Xavier 
Calbet, ...
1.  How do I convince our senior management to let the technical staff 
run Linux rather than a widely used (but deeply flawed) alternative? 
[back to FAQ ToC]
Explain that scientists and engineers tend to use their computers for 
different types of tasks than do conventional business users.  These 
tasks may include:

     * technical document processing (equations, complex graphs and 
diagrams),
     * symbolic mathematics,
     * mathematical modeling and numerical methods,
     * scientific visualization,
     * data acquisition and process control, and.
     * production and maintenance of scientific databases.

For these types of tasks, UNIX-derived operating systems have several 
advantages.  For example, they:

     * are generally more robust and reliable than the alternatives,
     * provide a flexible and convenient software development environment
     * have an open, modular, and extensible design,
     * have an network-oriented architecture (NFS, X, RPC, etc.), and,
     * are easily ported to high-performance machines.

While several manufacturers have (unsuccessfully) attempted to displace 
UNIX-derived operating systems in Science and Engineering applications 
over the years, none have succeeded.  This can undoubtedly be at least 
partly explained by Henry Spencer's observation that,
"Those who do not understand UNIX are condemned to re-invent it, poorly."
2.  What is the purpose of the IEEE/VanLUG Science and Engineering SIG? 
   [back to FAQ ToC]
Linux discussions and presentations often tend to focus on system 
configuration, system administration, network administration, Linux for 
the Enterprise, Linux in the Small Office/Home Office environment, and 
related topics.  This falls a bit short of addressing the specialized 
needs of scientists and engineers. Accordingly, the VanLUG Science and 
Engineering SIG seeks to fill that gap by:
# promoting awareness of the GNU Linux in Science and Engineering community,
# providing a focus for the exchange of information about GNU Linux in 
Science and Engineering,
# helping scientists and engineers promote GNU Linux to their employers, 
and,
# arranging for tutorials and presentations of interest to scientists 
and engineers,
without boring those who have no interest in these topics :-)
3.  How does one join the IEEE/VanLUG Science and Engineering SIG? 
[back to FAQ ToC]
Those who subscribe to the IEEE/VanLUG Sci/Eng mailing list are 
considered to be members of the SIG.  To join, please send a message to 
<scieng-request@gweep.bc.ca> with the words

     subscribe

(and nothing else) in the body of the message.

The list server will send you an authentication request to which you 
must respond before it will add you to the list.

If the list becomes very busy, we'll consider spawning an 
announcements-only list.  For now, a single list is both practical and 
appropriate.
4.  What are some freely available alternatives to proprietary software? 
   [back to FAQ ToC]
We're very enthusiastic about the freely available alternatives to 
proprietary software (especially those which have been released under 
the GNU GPL) that are available to scientists and engineers who use 
UNIX-derived operating systems such as Linux.  Some of these, such as 
Gnuplot, LaTeX, and the GNU programming tools are well known.  Others, 
such as Scilab, Octave, muPad, Python, and GRASS, are less well-known. 
In any case, these packages are all worth your serious consideration. 
We discuss Scilab and Python in greater detail in FAQ B8 and B11, 
respectively.
# Math: Scilab, Octave, muPad, Gnuplot, Physica, Python
# Document Processing: TeX, LaTeX, teTeX
# Spatial or Image Data: GRASS
# Fortran/C/C++ compilers: g77, gcc, g++
# Software Development: GNU programming tools
5.  Which proprietary Science and Engineering software has been ported 
to GNU Linux?   [back to FAQ ToC]
Many vendors of science and engineering software have ported their 
software to Linux in recent years.  Here are just a few examples:

     * Web: Netscape Navigator*, Adobe Acrobat Reader*, IBM 
techexplorer* (Netscape Navigator Plug-In)
     * Math: MATLAB (S), Maple V (S),  Mathematica (S), Macsyma, AXIOM, 
Intel ASCI/Red libraries*
     * Spatial or Image Data: IDL, ENVI, TNTmips, TNTlite*, PCI 
Imagehandler*
     * Fortran/C/C++ compilers:  Cygnus, Fujitsu, Absoft, NAG, Portland 
Group, Lahey,Compaq, others.
     * Lab Automation: National Instruments LabView
     * Document Processing: FrameMaker

* freely available;  (S) student versions available.

We don't necessarily promote the use of proprietary software given that 
the true strength of UNIX as a scientific and engineering platform lies 
in the great tradition of sharing source code and improvements to same. 
  However, we recognize that those migrating from other platforms 
require access to familiar tools and environments.  Also, free versions 
of some tools simply aren't available.
6.  Which commercial Science and Engineering software hasn't yet been 
ported to GNU Linux?   [back to FAQ ToC]
While many vendors have made a serious effort to port their products to 
Linux, a few short-sighted organizations have not.  A few packages that 
we're often asked about include:

     * Math: MathCAD
     * GIS and CAD: MapInfo, ArcInfo, AutoCAD
     * Electronic Design Automation (EDA) Software: EEsof, others.

MathCAD, MapInfo, AutoCAD are native Windows applications and porting 
them to UNIX and X would likely be rather time consuming.  However, 
ArcInfo, FrameMaker, and EEsof are already running under UNIX and X.  If 
the experience of Sybase, Informix, and others is any guide, porting 
them to Linux might not require much more than typing "make".
If you really need to run any of this software, a possible interim 
solution is to run them under a Windows Virtual Machine such as VMware 
and Win4Lin.  A better alternative, where possible, is to migrate to 
native Linux alternatives.
7.  Can I compile and run my existing Fortran code under Linux?   [back 
to FAQ ToC]
In a word, yes.

     * The GNU Project's g77 compiler works quite well for most 
purposes.  It is a standard component of Red Hat Linux, Caldera Open 
Linux, and most other Linux distributions.  Follow the highlighted link 
for more details.

     * A free Fortran 90 compiler for Linux plus other freely available 
compiler tools are available for personal use from Pacific-Sierra 
Research.  F is a subset of Fortran 90 without backward compatibility 
with Fortran 77.  A Linux version is freely available from Imagine1.

     * If performance is an issue, you might want to consider purchasing 
a commercial Fortran compiler.  Vendors include Fujitsu, Absoft, Lahey, 
Compaq, NAG, SNI, Portland Group, Pacific-Sierra Research, etc.  Check 
out the Information about running Fortran codes under Linux  website for 
further information about alternative Fortran compilers, both free and 
proprietary.  For general Fortran information, see also The Fortran 
Market  including The Fortran Information Page  and The Free Fortran 
Software Page.

     * UNIX for FORTRAN Programmers by Mike Loukides (O'Reilly & Assoc, 
1990; ISBN: 0-937175-51-X) is a very practical and useful reference for 
Fortran 77 programmers who are migrating to the UNIX/Linux programming 
environment.  The tools discussed include:
           o The FORTRAN compiler (f77).
           o UNIX interactive command languages, or shells (csh for 
interactive use, sh for shell programming).
           o vi, the standard UNIX editor.
           o Object library management tools (ar and ranlib).
           o The programming environment (I/O, basic system calls, error 
handling).
           o The adb and dbx debuggers.
           o prof, gprof, time, profiling tools.
           o make, a tool for automating complex compilations.
           o rcs, a source code management system for large projects.
           o Common porting problems.


       While it is out of print, copies can often be obtained from 
second-hand book dealers.  Tim O'Reilly also suggests that  "if you're 
desperate for a copy, try calling our customer service department at 
800-998-9938. We will often still have a few copies in stock, or can 
track one down and sell it to you."

       Much of the material concerning the GNU programming tools is also 
contained in Programming with GNU Software by Mike Loukides & Andy Oram 
(O'Reilly & Assoc, 1996; ISBN: 1-56592-112-7) but without any reference 
to either vi or Fortran.

If you need to include graphics routines in your Fortan code, we 
strongly recommend the PGPLOT package by Tim Pearson at Caltech.  See 
http://astro.caltech.edu/~tjp/pgplot/ for more details.

8.  Is there a good mechanical CAD or drafting package for Linux? 
[back to FAQ ToC]
This a very frequently asked question.  However, I'm not a user of 
mechanical CAD or drafting software (xfig satisfies all my drawing 
requirements quite handily) so I can't offer much personal insight.

However, there are certainly many CAD packages listed on the Scientific 
Applications on Linux website.  (They're given in the CAD, Drawing & 
Painting Tools  and Modelers  sections.)  They include GPL'd packages, 
ports of commercial packages (such as Bentley Microstation 95 and 
Varicad), and others.  I have no personal experience with any of them so 
would be most appreciative of any information that others might care to 
share.  Having said that, I would recommend one read the review by 
Thomas Wuest, P.E. before considering LinuxCAD, a product of a company 
called Software Forge.
9.  How can one keep up to date with Science and Engineering Software 
for GNU Linux?   [back to FAQ ToC]
a.  Two journals which often contain useful information are:

     * IEEE Computing in Science and Engineering
           o http://www.computer.org/cse/
     * Linux Journal
           o http://www.linuxjournal.com/

IEEE Computing in Science and Engineering is a joint venture of the IEEE 
Computer Society and the American Institute of Physics in technical 
cosponsorship with the IEEE Antennas and Propagation Society and the 
IEEE Signal Processing Society.  It combines IEEE Computational Science 
& Engineering (1995-1998) and AIP's Computers in Physics (1987-1998).

Linux Journal occasionally reports case studies of Linux applications in 
science and engineering in both regular and themed issues throughout the 
year.  In the past, it has also reviewed packages such as Scilab and 
Microstation.

b.  Relevant mailing lists including:

     * Scientific Applications on Linux mailing list
           o http://sal.kachinatech.com/
     * Linux Lab Project mailing lists
           o http://obelix.chemie.fu-berlin.de/
     * GNU Linux in Science and Engineering mailing list
           o http://www.linux.bc.ca/maillists/

c. Some useful websites include:

     * Scientific Applications on Linux  (SAL),
           o http://sal.kachinatech.com/
     * GNU Project,
           o http://www.gnu.org/
     * Linux Applications,
           o http://www.linuxapps.org/
     * Linux Labs Project,
           o http://obelix.chemie.fu-berlin.de/
     * Open Source Remote Sensing Effort,
           o http://www.remotesensing.org/
     * NetLib Repository,
           o http://www.netlib.org/
     * StatLib
           o http://lib.stat.cmu.edu/
     * Stat Codes
           o http://www.astro.psu.edu/statcodes/
     * Linux Resources for High Energy Physics
           o http://hepwww.ph.qmw.ac.uk/HEPpc/
     * Astronomical Software on Linux
           o http://bima.astro.umd.edu/nemo/linuxastro/
     * ACEDB - Genome Database Software
           o http://probe.nalusda.gov:8000/aboutacedbsoft.html
     * Linux at FERMI LAB
           o http://www-oss.fnal.gov/fss/documentation/linux/
     * Linux and Chemistry
           o http://chpc06.ch.unito.it/chem_linux.html
     * Linux4Chemistry
           o http://zeus.polsl.gliwice.pl/~nikodem/linux4chemistry.html
     * Linux for X-ray Astronomers
           o http://lheawww.gsfc.nasa.gov/users/ebisawa/linux.html

d.  A recent conference that was completely concerned with GNU Linux in 
Science and Engineering:

     * Open Source/Open Science'99
           o http://openscience.bnl.gov/

10.  How is the Scientific Applications on Linux (SAL) website 
structured?   [back to FAQ ToC]
The Scientific Applications on Linux website, 
http://sal.kachinatech.com/, has almost 2500 entries covering a wide 
range of applications.  In addition, each section and subsection of the 
SAL website carries links to specialized collections or information 
pages on other websites.

While the SAL website is superbly organized, there is no master index. 
The following list corrects that oversight:

     * Mathematics
           o Computer Algebra Systems   GAMS, Maple, Mathematica, MuPAD, 
Reduce, ...
           o Array-Oriented & Linear Algebra Systems   GAUSS, IDL, 
MATCOM, Matlab, Octave, Rlab, Scilab, TELA, ...
           o Statistics   |STAT, S-Plus, Stata, TSP, ViSta, xldlas, 
Xlisp-Stat, ...
           o Number Theory   KANT/KASH, LiDIA, NTL, Pari/GP, SIMATH, ...
           o Misc
     * Numerical Analysis
           o Source Code Repositories   GAMS, Netlib, MGNet, SLATEC, 
StatLib, ...
           o Discrete Methods & Related Tools   ADMesh, Diffpack, FElt, 
FEMLAB, GEOMPACK, KASKADE, QMG, ProPHLEX, ...
           o Optimization   Cplex, FSQP, LINDO, PCx, ...
           o Miscellaneous
     * Parallel Computing
           o Programming Languages & Systems   Charm/Charm++, CODE, 
Erlang, HPF, uC++, ...
           o Communication Libraries   BSPlib, LinuxThreads, MPI, 
Para++, PVM, TreadMarks, ...
           o Tools & Utilities   NetSolve, PETSc, PIM, PLAPACK, 
ScaLAPACK, ...
           o Miscellaneous
     * Data Processing & Visualization
           o Software Packages  ACE/gr, AVS5, DATAPLOT, Gnuplot, NCAR 
Graphics, P+owerGraph, PLOTMTV, PV-Wave, TecPlot, Vis5D, ...
           o Libraries   DISLIN, HDF, NetCDF, PGPLOT, PSPLOT, View3D, ...
     * Graphics, Images, and  Signals
           o Processing & Visualizations   3DVIEWNIX, daVinci, IRAF, 
Ptolemy, VTK, ...
           o CAD, Drawing & Painting Tools   GIMP, MicroStation, tgif, 
Xfig, Xpaint, YADE, ...
           o Modelers   BRL-CAD, GIG3DGO, Sced, VARKON, ...
           o Raytracers   BMRT, MasterPiece, Megahedron, Radiance, 
Polyray, POV-ray, ...
           o Image Viewers, Conversions & Manipulations   Ghostscript, 
ImageMagick, Liquid Reality, NetPBM, xanim, XV, ...
           o Geographic Information Systems   GrADS, GRASS, Zebra, 
Xmap8, ...
           o Miscellaneous
     * Programming
           o Languages & Compilers   Eiffel, Fortran, Java, Prolog, 
Python, Scheme, Tcl/Tk, ...
           o Tools & Utilities   CodeCheck, CodeWizard, DDD, IDEAFIX, 
PCCTS, PowerRPC, PRL, VBIX, YACL, ...
           o GLTM/OpenGLTM Related Libraries & Toolkits   GLUT, Mesa, 
OpenGL, TIGER, Ygl, ...
           o Other Graphic Libraries   Dore, EGR GF, EZWGL, XSDL, ...
           o X11 Libraries & Toolkits   AUIS, BXwidgets, 
EditTable/ChartObject, INTERACTER, MetaCard, Motif, Qt, XForms, ...
     * Office Software
           o Office Suites  ANGOSS SmartWare, Applixware, Caldera 
Internet Office Suite, StarOffice, ....
           o Typesetting & FormatingLyX, MathSpad, SGML-TOOLS, TeXShell, ...
           o Word Processing & PublishingPAPyRUS, SciTeXt, Thot, 
XCLAMATION, WAZO, WordPerfect, ...
           o Spreadsheets  NExS, Oleo, Wingz, Xess, XQUAD, ...
           o Text Editors  Edith Pro, Emacs, NEdit, Scriptum, SEDIT, 
SlickEdit, vi, ...
           o Miscellaneous
     * Database Systems
           o Relational DBMS   Informix, Just Logic/SQL, MySQL, Oracle, 
PostgreSQL, ...
           o Object-Oriented DBMS   H-PCTE, LINCKS, KE Texpress, ...
           o Utilities & Other DBMS
     * Other Scientific Fields
           o Electrical & Related Software   APLAC, FinSim, Chipmunk, 
interHDL, Magic, Ocean, Spice, Voyeur, ...
           o Chemistry, Biology & Related   Babel, GROMOS, MOLMOL, VMD, 
WHAT IF, XEASY, Xplor, ...
           o Artificial Intelligence   FOOL & FOX, HTK, nn/xnn, SNNS, 
WEKA, Xocr, ...
           o Physics & Astronomy   DDSCAT, DISCUS, Emu/fdtd, LightPipes, 
NEMO, XFDTD, ...
           o Miscellaneous

11.  What is Scilab?   [back to FAQ ToC]

     * a MATLAB-like software package for numerical computation
     * developed by INRIA in France
     * freely distributable and includes complete source code
     * features include:
           o Elaborate data structures (polynomial, rational and string 
matrices, lists, multivariable linear systems,...)
           o A sophisticated interpreter and programming language with 
MATLAB-like syntax
           o Hundreds of built-in math functions (new primitives can 
easily be added)
           o Stunning graphics (2d, 3d, animation)
           o Open structure (easy interfacing with Fortran and C modules 
via online dynamic link)
           o Many built-in libraries:
                 + Linear Algebra (including sparse matrices, Kronecker 
form, ordered Schur,...)
                 + Control (Classical, LQG, H-infinity,...)
                 + Package for LMI (Linear Matrix Inequalities) optimization
                 + Signal processing
                 + Simulation (various ode's, dassl,...)
                 + Optimization (differentiable and non-differentiable, 
LQ solver)
                 + Scicos, an interactive environment for modeling and 
simulation of hybrid systems
                 + Metanet (network analysis and optimization)
                 + Symbolic capabilities through an interface to Maple V
     * for more details and documentation, see the Scilab home page,
           o http://www-rocq.inria.fr/scilab/
           o Engineering and Scientific Computing with Scilab, C. Gomez, 
Ed. (Birkhauser, 1999; ISBN: 0-8176-4009-6 and 3-7643-4009-6)  (Most 
on-line booksellers carry this title.  However, Barnes and Noble 
currently offers the best price and the lowest shipping and handling 
charges for Canadian customers.)

12.  What is the Intel/ASCI Red Software? [back to FAQ ToC]

     * a collection of highly optimized Pentium II math routines for 
Intel-based Unix systems:
           o ASCI Red Pentium Pro BLAS version 1.2D for Pentium II (10 
December 1999)
           o 1D FFT's for single CPU's
           o Linux Hardware Performance Monitoring Utilities
           o Linux Extended Precision Math Primitives
     * jointly developed by Intel and the Accelerated Strategic 
Computing Initiative (ASCI)
     * for more details, see the Intel/ASCI Red Software for Linux home page
           o http://www.cs.utk.edu/~ghenry/distrib/

13.  What is IBM techexplorer? [back to FAQ ToC]

     * a plug-in for Netscape Navigator which enables
           o the display of TeX, LaTeX, and MathML documents, and
           o the publishing of  interactive mathematical and scientific 
material on the Web
     * for more details, see IBM techexplorer home page,
           o http://www-4.ibm.com/software/network/techexplorer/
     * Version 2.5, Preview Release 2 for Linux will be released shortly
     * for more details about MathML, see W3C Math home page,
           o http://www.w3c.org/Math/

14.  What is Python?   [back to FAQ ToC]

     * an object-oriented scripting language (an alternative to Perl)
     * rapidly becoming popular in the science and engineering community
           o for stand-alone computation
           o as a steering language for compiled object modules
     * has native support for complex numbers
     * NumPy extensions support fast, efficient numerical array computations
     * Fortran, C, C++ modules are easily linked
     * for more details, see the Python home page and the LLNL Python page,
           o http://www.python.org/
           o http://xfiles.llnl.gov/python.htm

15.  What is PERL and why is it of interest to scientific programmers? 
  [back to FAQ ToC]

     * Pathetically Eclectic Rubbish Lister?  Practical Extraction and 
Report Language?
     * a high-level scripting language that draws from C, sh, awk, sed, etc
     * very popular amongst UNIX system administrators
     * ported to MacOS and Windows
     * for more details, see the following pages
           o http://www.perl.com/
           o http://www.perl.org/
     * the PDL (``Perl Data Language'') provides standard perl with the 
ability to COMPACTLY store and SPEEDILY manipulate the large 
n-dimensional data arrays which are common in scientific computing.
           o http://www.aao.gov.au/local/www/kgb/perldl/
     * pgperl provides standard perl with the ability to generate 
PUBLICATION QUALITY graphics using the PGPLOT graphics library
           o http://www.aao.gov.au/local/www/kgb/pgperl/

16.  What are ten good practices for scientific programming?  [back to 
FAQ ToC]
(adapted from a list published by Paul F. Dubois of LLNL, and published 
in IEEE Computing in Science and Engineering, vol. 1, no. 1, pp. 7-11, 
Jan/Feb 1999)

     * Embrace your inner programmer!
     * Organize for change
     * Don't reinvent the wheel
     * Use a modern source-code management system
     * Steer your compute engine using an interpreted scripting language
     * For small jobs, write a script instead of a compiled program
     * Use "Design by Contract" to ensure that interfaces between 
modules are clean
     * Mix languages (wisely)
     * Use Fortran 9x rather than Fortran 77
     * Use C++ rather than C

I've re-organized the list slightly, but the emphasis remains the same: 
Many scientists and engineers spend much of their time writing code but 
few will admit to being professional programmers.  Paul Dubois argues 
that most scientists and engineers would be happier and more productive 
if they took care to better organize their efforts, employ modern 
software engineering practices, and generally "embrace their inner 
programmer".   (As one might suspect, Paul lives in California.)  There 
are three main themes:
# Science and engineering software is often used much longer than the 
original authors ever intended.  The task of updating and maintaining 
such packages is difficult (to say the least) unless care is taken to 
modularize, document, and manage the source code.  The urge to re-invent 
the wheel should be resisted.  Use of reliable and actively maintained 
software libraries, whether for graphics, numerical computation, or user 
interface design, is a great way to share the programming load with the 
rest of the community.
# User interfaces should be coded using an interpreted scripting 
languages such as Python, Perl, TCL, Scilab, or MATLAB.  This permits 
other users to modify the interfaces as required while preserving the 
integrity and performance of the compiled compute engine.  For small 
tasks, it is often much more efficient to use a scripting language 
entirely rather than conventional languages such as C or Fortran.  As 
Bertrand Meyer pointed out, "The problem with top-down structured design 
is that real problems have no top."  By replacing that all-too-volatile 
"top" with an interpreter, one enables significant change without 
requiring source modifications.

     * Object-oriented methods have attracted considerable interest 
because they give people an effective way of dealing with change.  Paul 
Dubois expresses a great deal of enthusiasm for the approach in the 
article. Even if one doesn't want to jump right in, he encourages 
scientists and engineers to use C++ and Fortran 9x rather than C and 
Fortran 77 so that they can start taking advantage of at least some of 
the new language features.  He also endorses Bertrand Meyer's "Design by 
Contract" method of realizing robust and reliable interfaces between 
software modules. Two books on the topic that he recommends are:
           o P.F. Dubois, Object Technology for Scientific Programming. 
  Prentice-Hall, 1997.
           o B. Meyer, Object-Oriented Software Construction, 2ed. 
Prentice-Hall, 1997.

While several commercial vendors have released Fortran 9x compilers for 
Linux, there is an urgent need for a GPL'd version as well.  If you can 
help, please visit the comp.lang.fortran newsgroup and let the powers 
that be know!