Editing
Installation
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
[[Image:Fotolia_4727725_XS.jpg|right|]] Madagascar has been installed and is periodically tested on different platforms *Linux distributions (Fedora, RedHat, Ubuntu, etc.) *MacOS X *Windows under the [http://www.cygwin.com/ Cygwin] environment. ==Precompiled binary packages== See the [[Download|Madagascar download page]] for the availability of binary packages. ==Installation from source== ===Platform-specific instructions=== [[Windows|Specific instructions are provided]] for '''Windows''' users. Please consult the [[Advanced Installation#Platform-specific_installation_advice|Advanced Installation]] guide for other platform-specific instructions. ===Prerequisites=== #C compiler. Any ANSI-compliant compiler such as [http://gcc.gnu.org/ GCC] should work. GCC usually comes pre-installed on Linux machines. #Python interpreter. [http://www.python.org/ Python] is an interpretable programming language. It is used in Madagascar installation scripts and project management scripts. Python comes pre-installed on some platforms. Madagascar supports Python 3. Each API option has [[Advanced Installation#Dependencies|its own prerequisites]]. Prerequisites for optional add-on functionality are [[Advanced Installation#Platform specific installation advice|platform-specific]]. [[Windows|Building under cygwin on Windows]] requires several preparatory steps. ===General instructions=== # '''Configuration:''' Open a terminal window, change to the top Madagascar source directory, and run <syntaxhighlight lang="bash">./configure --prefix=/directory/where/you/want/madagascar/installed</syntaxhighlight> You can examine the <tt>config.py</tt> file that this command generates. Additional options are available. You can obtain a full list of customizable variables by running <tt>scons -h</tt>. For example, to install Fortran-90 API bindings in addition to the basic package, run <syntaxhighlight lang="bash">./configure API=f90 --prefix=/directory/where/you/want/madagascar/installed</syntaxhighlight> After running <tt>./configure</tt> you may see a list of dependencies that your system does not have installed (the items that have "no" next to them). Most of them are optional. If you decide to install additional packages for your platform, rerun the <tt>./configure</tt> command. # '''Building and installing the package:''' Run <syntaxhighlight lang="bash">make install</syntaxhighlight> If you need "root" privileges for installing under <tt>$RSFROOT</tt>, you may need to run <syntaxhighlight lang="bash">make; su; make install</syntaxhighlight> or <syntaxhighlight lang="bash">make; sudo make install</syntaxhighlight> If <tt>make</tt> does not exist on your system, an alternative procedure can be found in the [[#Troubleshooting|Troubleshooting]] section. # '''User setup:''' If your shell is <tt>sh</tt> or <tt>bash</tt>, add to your <tt>$HOME/.bashrc</tt> and <tt>$HOME/.profile</tt> files the line <syntaxhighlight lang="bash">source ~/RSFSRC/share/madagascar/etc/env.sh</syntaxhighlight> (if used something different in the <tt>--prefix</tt> option to <tt>./configure</tt>, use that instead of ~/RSFSRC). If your shell is <tt>(t)csh</tt>, add to your <tt>$HOME/.cshrc</tt> file the line <syntaxhighlight lang="bash">source ~/RSFSRC/share/madagascar/etc/env.csh</syntaxhighlight> (if used something different in the <tt>--prefix</tt> option to <tt>./configure</tt>, use that instead of ~/RSFSRC.) Please be aware that, on some systems, the default value for DATAPATH set in the script above may get automatically cleaned at some intervals, so if you want to keep your data binaries for a long time, set <tt>DATAPATH</tt> in your resource file to another location where you have write access and that allows large files. Remember that the value of DATAPATH should have a slash at the end. e.g. add <syntaxhighlight lang="bash">export DATAPATH=~/RSFDATA/ </syntaxhighlight> to ~/.bashrc and ~/.profile . ==Uninstall== To clean all intermediate files and all installed files, run <pre>scons -c install</pre> or <pre>make distclean</pre> in the source code directory. ==Troubleshooting== ===Alternative build/install procedure=== # '''Set the environment variables:''' If your shell is <tt>sh</tt> or <tt>bash</tt>, type <syntaxhighlight lang="bash">source env.sh</syntaxhighlight> Else, if your shell is <tt>csh</tt> or <tt>tcsh</tt>, type <syntaxhighlight lang="bash">source env.csh</syntaxhighlight> # '''Build:''' Type <tt>scons</tt> # '''Install:''' Run <tt>scons install</tt> . If you need "root" privileges for installing under <tt>$RSFROOT</tt>, you may need to run <syntaxhighlight lang="bash">su; scons install </syntaxhighlight> or <syntaxhighlight lang="bash">sudo scons install</syntaxhighlight> ===Other issues=== Note that <tt>scons</tt> does not inherit your environmental variables including <tt>PATH</tt>. If the configuration part ends with the message like <pre> checking if cc works ... failed </pre> the problem may be that your compiler is in an unusual place. Try <pre> ./configure CC=/full/path/to/cc </pre> or <pre> ./configure CC=`which cc` </pre> On Windows under SFU, use the <tt>gcc</tt> compiler <pre> ./configure CC=/opt/gcc.3.3/bin/gcc </pre> Please consult the [[Advanced Installation]] guide for more information. ==Testing and quick start== Here are a few simple tests and a brief introduction to Madagascar: Typing any Madagascar command in a terminal window without parameters should generate brief documentation. Try one of the following: <pre> sfin sfattr sfspike sfbandpass sfwiggle </pre> If you get an error like "Command not found," you may not have your <tt>$PATH</tt> environment variable set correctly, or you may need to issue the <tt>rehash</tt> command. Now try making a simple Madagascar data file: <pre> sfspike n1=1000 k1=300 > spike.rsf </pre> This command generates a one-dimensional list of 1000 numbers, all zero except for a spike equal to one at position 300. If this generates an error like <pre> Cannot write to data file /path/spike.rsf@: Bad file descriptor </pre> you may need to create the directory pointed to by your <tt>$DATAPATH</tt> environment variable. The file <tt>spike.rsf</tt> is a text header. The actual data are stored in the binary file pointed to by the <tt>in=</tt> parameter in the header. You can look at the header file directly with <tt>more</tt>, or better, examine the file properties with <pre> sfin spike.rsf </pre> You can learn more about the contents of <tt>spike.rsf</tt> with <pre> sfattr < spike.rsf </pre> The following command applies a bandpass filter to <tt>spike.rsf</tt> and puts the result in <tt>filter.rsf</tt>: <pre> sfbandpass fhi=2 phase=y < spike.rsf > filter.rsf </pre> The following command makes a graphics file from <tt>filter.rsf</tt>: <pre> sfwiggle clip=0.02 title="Welcome to Madagascar" < filter.rsf > filter.vpl </pre> If you have an X11 display program running, and your <tt>$DISPLAY</tt> environment variable is set correctly, you can display the graphics file with: <pre> sfpen < filter.vpl </pre> You can pipe Madagascar commands together and do the whole thing at once like this: <pre> sfspike n1=1000 k1=300 | sfbandpass fhi=2 phase=y | \ sfwiggle clip=0.02 title="Welcome to Madagascar" | sfpen </pre> If you have SCons installed, you can use it to automate Madagascar processing. Here is a simple <tt>SConstruct</tt> file to make <tt>filter.rsf</tt> and <tt>filter.vpl</tt>: <syntaxhighlight lang="python"> # # Setting up # from rsf.proj import * # # Make filter.rsf # Flow('filter',None,'spike n1=1000 k1=300 | bandpass fhi=2 phase=y') # # Make filter.vpl # Result('filter','wiggle clip=0.02 title="Welcome to Madagascar"') End() </syntaxhighlight> Put the file in an empty directory, give it the name <tt>SConstruct</tt>, <tt>cd</tt> to that directory, and issue the command: <pre> scons </pre> The graphics file is now stored in the <tt>Fig</tt> subdirectory. You can view it manually with: <pre> sfpen Fig/filter.vpl </pre> ... or you can use: <pre> scons view </pre> When a SConstruct file makes more than one graphics file, the <tt>scons view</tt> command will display all of them in sequence. [[Image:filter.png|frame|center|Welcome to Madagascar.]] Now edit the <tt>SConstruct</tt> file: change the title string on the <tt>Result</tt> line to "Hello World!", save the file, and rerun the scons command. You will see that scons has figured out that the file <tt>filter.rsf</tt> does not need to be rebuilt because nothing that affects it has changed. Only the file <tt>filter.vpl</tt> is rebuilt.
Summary:
Please note that all contributions to Madagascar are considered to be released under the GNU Free Documentation License 1.3 or later (see
My wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
English
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Getting Madagascar
download
Installation
GitHub repository
SEGTeX
Introduction
Package overview
Tutorial
Hands-on tour
Reproducible documents
Hall of Fame
User Documentation
List of programs
Common programs
Popular programs
The RSF file format
Reproducibility with SCons
Developer documentation
Adding programs
Contributing programs
API demo: clipping data
API demo: explicit finite differences
Community
Conferences
User mailing list
Developer mailing list
GitHub organization
LinkedIn group
Development blog
Twitter
Slack
Tools
What links here
Related changes
Special pages
Page information