<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://ahay.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=R-swindeman</id>
	<title>Madagascar - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://ahay.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=R-swindeman"/>
	<link rel="alternate" type="text/html" href="https://ahay.org/wiki/Special:Contributions/R-swindeman"/>
	<updated>2026-05-05T14:36:53Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.7</generator>
	<entry>
		<id>https://ahay.org/index.php?title=Installation&amp;diff=2791</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://ahay.org/index.php?title=Installation&amp;diff=2791"/>
		<updated>2014-03-31T20:09:14Z</updated>

		<summary type="html">&lt;p&gt;R-swindeman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Fotolia_4727725_XS.jpg|right|]]&lt;br /&gt;
Madagascar has been installed and is periodically tested on&lt;br /&gt;
*Different Linux distributions (Fedora, RedHat, Ubuntu, etc.) &lt;br /&gt;
*Solaris &lt;br /&gt;
*MacOS X &lt;br /&gt;
*Windows under the [http://www.cygwin.com/ Cygwin] environment.&lt;br /&gt;
&lt;br /&gt;
It was previously tested on&lt;br /&gt;
*FreeBSD &lt;br /&gt;
*HP-UX&lt;br /&gt;
*SGI Irix&lt;br /&gt;
*Windows under Microsoft&#039;s Services for UNIX environment.&lt;br /&gt;
&lt;br /&gt;
==Precompiled binary packages==&lt;br /&gt;
&lt;br /&gt;
See the [[Download|Madagascar download page]] for availability of binary packages.&lt;br /&gt;
&lt;br /&gt;
==Installation from source==&lt;br /&gt;
&lt;br /&gt;
===Platform-specific instructions===&lt;br /&gt;
&lt;br /&gt;
[[Windows|Specific instructions are provided]] for &#039;&#039;&#039;Windows&#039;&#039;&#039; users.&lt;br /&gt;
&lt;br /&gt;
For other platform-specific instructions, please consult the [[Advanced Installation#Platform-specific_installation_advice|Advanced Installation]] guide.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
  &lt;br /&gt;
#C compiler. Any ANSI-compliant compiler such as [http://gcc.gnu.org/ GCC] should work. GCC usually comes pre-installed on Linux machines. &lt;br /&gt;
#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 currently attempts to support Python versions 2.2 through 2.6.  Versions before 2.2 are not common, but if you experience problems and you have an earlier version you should probably upgrade.&lt;br /&gt;
#SCons is also required, but it is included with Madagascar and the configure scripts will attempt to install it for you if you don&#039;t have it already. Alternatively you can get it through yum with &amp;quot;yum install scons&amp;quot; in a terminal window. For more information see the [[Advanced Installation#Prerequisites|Advanced Installation]] guide.&lt;br /&gt;
&lt;br /&gt;
Each API option has [[Advanced Installation#Dependencies|its own prerequisites]].&lt;br /&gt;
&lt;br /&gt;
Prerequisites for optional add-on functionality are [[Advanced Installation#Platform specific installation advice|platform-specific]]. &lt;br /&gt;
&lt;br /&gt;
[[Windows|Building under cygwin on Windows]] requires several preparatory steps.&lt;br /&gt;
&lt;br /&gt;
===General instructions===&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Configuration:&#039;&#039;&#039; Open a terminal window and change to the top source directory (sometimes called &amp;quot;RSFSRC&amp;quot;). Next, you&#039;ll have to make some changes to your .bashrc file, so open it in you&#039;re favorite editor, e.g. &amp;lt;bash&amp;gt; vim ~/.bashrc &amp;lt;/bash&amp;gt; or &amp;lt;bash&amp;gt; gedit ~/.bashrc &amp;lt;/bash&amp;gt; Now simply append these lines to the bottom of the .bashrc file:&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;bash&amp;gt;export DATAPATH=$HOME/scratch/&lt;br /&gt;
export EDITOR=nedit&lt;br /&gt;
export OMP_NUM_THREADS=2&lt;br /&gt;
export LATEX2HTML=$HOME/texmf/latex2html&lt;br /&gt;
export RSFROOT=~/madagascar&lt;br /&gt;
#source $HOME/Desktop/RSFSRC/env.sh&lt;br /&gt;
&amp;lt;/bash&amp;gt;Notice that the &amp;quot;source&amp;quot; line of this file is commented out for now. After this directory is created during the install, we&#039;ll come back here to fix this. Another tweak you make elect to implement is changing the OMP_NUM_THREADS line to a number greater than 2 but less than or equal to the number of cores on your machine (2 is the max for a dual-core processor). Incrementing this environment variable will have benefits when running parallelized code. I also assume that you want Madagascar installed to a directory called &amp;quot;madagascar&amp;quot;. Feel free to adjust the second to last line accordingly. To have the changes you just made to the file take effect, type &amp;lt;pre&amp;gt;bash&amp;lt;/pre&amp;gt; into your terminal window. Now you&#039;re ready to run &amp;lt;bash&amp;gt;./configure --prefix=/directory/where/you/want/madagascar/installed&amp;lt;/bash&amp;gt; You can examine the &amp;lt;tt&amp;gt;config.py&amp;lt;/tt&amp;gt; file that this command generates.  Additional options are available. You can obtain a full list of customizable variables by running &amp;lt;tt&amp;gt;scons -h&amp;lt;/tt&amp;gt;. For example, to install C++ and Fortran-90 API bindings in addition to the basic package, run &amp;lt;bash&amp;gt;./configure API=c++,f90 --prefix=/directory/where/you/want/madagascar/installed&amp;lt;/bash&amp;gt; Oftentimes after running &amp;quot;./configure ...&amp;quot; you&#039;ll see a list of things that your system may not have installed (the items that have &amp;quot;no&amp;quot; next to them). Usually they are optional, but for the best experience with Madagascar, it is strongly recommended that you install these packages using a package manager such as yum. Example syntax is used here. Just change the name from &amp;quot;python-devel&amp;quot; to whatever you might be missing.&amp;lt;bash&amp;gt;yum install python-devel&amp;lt;/bash&amp;gt;After installing this dependency, rerun the .configure command above and repeat this step until you have all of the desired packages installed.&amp;lt;/ol&amp;gt;&lt;br /&gt;
# &#039;&#039;&#039;Building and installing the package:&#039;&#039;&#039; Run &amp;lt;bash&amp;gt;make install&amp;lt;/bash&amp;gt; If you need &amp;quot;root&amp;quot; privileges for installing under &amp;lt;tt&amp;gt;&amp;amp;#36;RSFROOT&amp;lt;/tt&amp;gt;, you may need to run &amp;lt;bash&amp;gt;make; su; make install&amp;lt;/bash&amp;gt; or &amp;lt;bash&amp;gt;make; sudo make install&amp;lt;/bash&amp;gt; If &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt; does not exist on your system, an alternative procedure can be found in the [[#Troubleshooting|Troubleshooting]] section. &lt;br /&gt;
# &#039;&#039;&#039;User setup:&#039;&#039;&#039; If your shell is &amp;lt;tt&amp;gt;sh&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;bash&amp;lt;/tt&amp;gt;, add to your &amp;lt;tt&amp;gt;$HOME/.bashrc&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;$HOME/.bash_profile&amp;lt;/tt&amp;gt; files the line &amp;lt;bash&amp;gt;source $RSFROOT/share/madagascar/etc/env.sh&amp;lt;/bash&amp;gt; where RSFROOT is the install directory you specified in the &amp;lt;tt&amp;gt;--prefix&amp;lt;/tt&amp;gt; option to &amp;lt;tt&amp;gt;./configure&amp;lt;/tt&amp;gt;. If your shell is &amp;lt;tt&amp;gt;(t)csh&amp;lt;/tt&amp;gt;, add to your &amp;lt;tt&amp;gt;$HOME/.cshrc&amp;lt;/tt&amp;gt; file the line &amp;lt;bash&amp;gt;source $RSFROOT/share/madagascar/etc/env.csh&amp;lt;/bash&amp;gt; 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 &amp;lt;tt&amp;gt;DATAPATH&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Uninstall==&lt;br /&gt;
To clean all intermediate files and all installed files, run &amp;lt;pre&amp;gt;scons -c install&amp;lt;/pre&amp;gt; or &amp;lt;pre&amp;gt;make distclean&amp;lt;/pre&amp;gt; in the source code directory.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
===Alternative build/install procedure===&lt;br /&gt;
# &#039;&#039;&#039;Set the environment variables:&#039;&#039;&#039; If your shell is &amp;lt;tt&amp;gt;sh&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;bash&amp;lt;/tt&amp;gt;, type (or uncomment) &amp;lt;bash&amp;gt;source env.sh&amp;lt;/bash&amp;gt; Else, if your shell is &amp;lt;tt&amp;gt;csh&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;tcsh&amp;lt;/tt&amp;gt;, type &amp;lt;bash&amp;gt;source env.csh&amp;lt;/bash&amp;gt;&lt;br /&gt;
# &#039;&#039;&#039;Build:&#039;&#039;&#039; Type &amp;lt;tt&amp;gt;scons&amp;lt;/tt&amp;gt;&lt;br /&gt;
# &#039;&#039;&#039;Install:&#039;&#039;&#039;  Run &amp;lt;tt&amp;gt;scons install&amp;lt;/tt&amp;gt; . If you need &amp;quot;root&amp;quot; privileges for installing under &amp;lt;tt&amp;gt;&amp;amp;#36;RSFROOT&amp;lt;/tt&amp;gt;, you may need to run &amp;lt;bash&amp;gt;su; scons install &amp;lt;/bash&amp;gt; or &amp;lt;bash&amp;gt;sudo scons install&amp;lt;/bash&amp;gt;&lt;br /&gt;
===Other issues===&lt;br /&gt;
Note that &amp;lt;tt&amp;gt;scons&amp;lt;/tt&amp;gt; does not inherit your environmental variables including &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt;. &lt;br /&gt;
If the configuration part ends with the message like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
checking if cc works ... failed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
the problem may be that your compiler is in unusual place. Try&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure CC=/full/path/to/cc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure CC=`which cc`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On Windows under SFU, use the &amp;lt;tt&amp;gt;gcc&amp;lt;/tt&amp;gt; compiler&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure CC=/opt/gcc.3.3/bin/gcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information, please consult the [[Advanced Installation]] guide.&lt;br /&gt;
&lt;br /&gt;
==Testing and quick start==&lt;br /&gt;
&lt;br /&gt;
Here are a few simple tests and and a brief introduction to Madagascar:&lt;br /&gt;
&lt;br /&gt;
Typing any Madagascar command in a terminal window without parameters should generate a brief documentation on that command. Try one of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfin&lt;br /&gt;
sfattr&lt;br /&gt;
sfspike&lt;br /&gt;
sfbandpass&lt;br /&gt;
sfwiggle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you get an error like &amp;quot;Command not found&amp;quot;, you may not have your &amp;lt;tt&amp;gt;&amp;amp;#36;PATH&amp;lt;/tt&amp;gt; environment variable set correctly, or you may need to issue the &amp;lt;tt&amp;gt;rehash&amp;lt;/tt&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Now try making a simple Madagascar data file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfspike n1=1000 k1=300 &amp;gt; spike.rsf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Cannot write to data file /path/spike.rsf@: Bad file descriptor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
you may need to create the directory pointed to by your &amp;lt;tt&amp;gt;&amp;amp;#36;DATAPATH&amp;lt;/tt&amp;gt; environment variable.&lt;br /&gt;
&lt;br /&gt;
The file &amp;lt;tt&amp;gt;spike.rsf&amp;lt;/tt&amp;gt; is a text header.  The actual data are stored in the binary file pointed to by the &amp;lt;tt&amp;gt;in=&amp;lt;/tt&amp;gt; parameter in the header.  You can look at the header file directly with &amp;lt;tt&amp;gt;more&amp;lt;/tt&amp;gt;, or better, examine the file properties with&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfin spike.rsf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can learn more about the contents of &amp;lt;tt&amp;gt;spike.rsf&amp;lt;/tt&amp;gt; with&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfattr &amp;lt; spike.rsf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following command applies a bandpass filter to &amp;lt;tt&amp;gt;spike.rsf&amp;lt;/tt&amp;gt; and puts the result in &amp;lt;tt&amp;gt;filter.rsf&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfbandpass fhi=2 phase=y &amp;lt; spike.rsf &amp;gt; filter.rsf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following command makes a graphics file from &amp;lt;tt&amp;gt;filter.rsf&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfwiggle clip=0.02 title=&amp;quot;Welcome to Madagascar&amp;quot; &amp;lt; filter.rsf &amp;gt; filter.vpl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have an X11 display program running, and your &amp;lt;tt&amp;gt;&amp;amp;#36;DISPLAY&amp;lt;/tt&amp;gt; environment variable is set correctly, you can display the graphics file with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfpen &amp;lt; filter.vpl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can pipe Madagascar commands together and do the whole thing at once like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfspike n1=1000 k1=300 | sfbandpass fhi=2 phase=y | \&lt;br /&gt;
sfwiggle clip=0.02 title=&amp;quot;Welcome to Madagascar&amp;quot; | sfpen&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have SCons installed, you can use it to automate Madagascar processing.  Here is a simple &amp;lt;tt&amp;gt;SConstruct&amp;lt;/tt&amp;gt; file to make &amp;lt;tt&amp;gt;filter.rsf&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;filter.vpl&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;python&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# Setting up&lt;br /&gt;
#&lt;br /&gt;
from rsf.proj import *&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Make filter.rsf&lt;br /&gt;
#&lt;br /&gt;
Flow(&#039;filter&#039;,None,&#039;spike n1=1000 k1=300 | bandpass fhi=2 phase=y&#039;)&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Make filter.vpl&lt;br /&gt;
#&lt;br /&gt;
Result(&#039;filter&#039;,&#039;wiggle clip=0.02 title=&amp;quot;Welcome to Madagascar&amp;quot;&#039;)&lt;br /&gt;
&lt;br /&gt;
End()&lt;br /&gt;
&amp;lt;/python&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Put the file in an empty directory, give it the name &amp;lt;tt&amp;gt;SConstruct&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;cd&amp;lt;/tt&amp;gt; to that directory, and issue the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
scons&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The graphics file is now stored in the &amp;lt;tt&amp;gt;Fig&amp;lt;/tt&amp;gt; subdirectory.  You can view it manually with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfpen Fig/filter.vpl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
... or you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
scons view&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When an SConstruct file makes more than one graphics file, the  &amp;lt;tt&amp;gt;scons view&amp;lt;/tt&amp;gt; command will display all of them in sequence. &lt;br /&gt;
[[Image:filter.png|frame|center|Welcome to Madagascar.]]&lt;br /&gt;
Now edit the &amp;lt;tt&amp;gt;SConstruct&amp;lt;/tt&amp;gt; file: change the title string on the &amp;lt;tt&amp;gt;Result&amp;lt;/tt&amp;gt; line to &amp;quot;Hello World!&amp;quot;, save the file, and rerun the scons command. You will see that scons has figured out that the file &amp;lt;tt&amp;gt;filter.rsf&amp;lt;/tt&amp;gt; does not need to be rebuilt because nothing that affects it has changed. Only the file &amp;lt;tt&amp;gt;filter.vpl&amp;lt;/tt&amp;gt; is rebuilt.&lt;/div&gt;</summary>
		<author><name>R-swindeman</name></author>
	</entry>
	<entry>
		<id>https://ahay.org/index.php?title=Installation&amp;diff=2790</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://ahay.org/index.php?title=Installation&amp;diff=2790"/>
		<updated>2014-03-31T19:52:13Z</updated>

		<summary type="html">&lt;p&gt;R-swindeman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Fotolia_4727725_XS.jpg|right|]]&lt;br /&gt;
Madagascar has been installed and is periodically tested on&lt;br /&gt;
*Different Linux distributions (Fedora, RedHat, Ubuntu, etc.) &lt;br /&gt;
*Solaris &lt;br /&gt;
*MacOS X &lt;br /&gt;
*Windows under the [http://www.cygwin.com/ Cygwin] environment.&lt;br /&gt;
&lt;br /&gt;
It was previously tested on&lt;br /&gt;
*FreeBSD &lt;br /&gt;
*HP-UX&lt;br /&gt;
*SGI Irix&lt;br /&gt;
*Windows under Microsoft&#039;s Services for UNIX environment.&lt;br /&gt;
&lt;br /&gt;
==Precompiled binary packages==&lt;br /&gt;
&lt;br /&gt;
See the [[Download|Madagascar download page]] for availability of binary packages.&lt;br /&gt;
&lt;br /&gt;
==Installation from source==&lt;br /&gt;
&lt;br /&gt;
===Platform-specific instructions===&lt;br /&gt;
&lt;br /&gt;
[[Windows|Specific instructions are provided]] for &#039;&#039;&#039;Windows&#039;&#039;&#039; users.&lt;br /&gt;
&lt;br /&gt;
For other platform-specific instructions, please consult the [[Advanced Installation#Platform-specific_installation_advice|Advanced Installation]] guide.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
  &lt;br /&gt;
#C compiler. Any ANSI-compliant compiler such as [http://gcc.gnu.org/ GCC] should work. GCC usually comes pre-installed on Linux machines. &lt;br /&gt;
#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 currently attempts to support Python versions 2.2 through 2.6.  Versions before 2.2 are not common, but if you experience problems and you have an earlier version you should probably upgrade.&lt;br /&gt;
&lt;br /&gt;
SCons is also required, but it is included with Madagascar and the configure scripts will attempt to install it for you if you don&#039;t have it already. Alternatively you can get it through yum with &amp;quot;yum install scons&amp;quot; in a terminal window. For more information see the [[Advanced Installation#Prerequisites|Advanced Installation]] guide.&lt;br /&gt;
&lt;br /&gt;
Each API option has [[Advanced Installation#Dependencies|its own prerequisites]].&lt;br /&gt;
&lt;br /&gt;
Prerequisites for optional add-on functionality are [[Advanced Installation#Platform specific installation advice|platform-specific]]. &lt;br /&gt;
&lt;br /&gt;
[[Windows|Building under cygwin on Windows]] requires several preparatory steps.&lt;br /&gt;
&lt;br /&gt;
===General instructions===&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Configuration:&#039;&#039;&#039; Open a terminal window and change to the top source directory (sometimes called &amp;quot;RSFSRC&amp;quot;). Next, you&#039;ll have to make some changes to your .bashrc file, so open it in you&#039;re favorite editor, e.g. &amp;lt;bash&amp;gt; vim ~/.bashrc &amp;lt;/bash&amp;gt; or &amp;lt;bash&amp;gt; gedit ~/.bashrc &amp;lt;/bash&amp;gt; Now simply append these lines to the bottom of the .bashrc file:&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;bash&amp;gt;export DATAPATH=$HOME/scratch/&lt;br /&gt;
export EDITOR=nedit&lt;br /&gt;
export OMP_NUM_THREADS=2&lt;br /&gt;
export LATEX2HTML=$HOME/texmf/latex2html&lt;br /&gt;
export RSFROOT=~/madagascar&lt;br /&gt;
#source $HOME/Desktop/RSFSRC/env.sh&lt;br /&gt;
&amp;lt;/bash&amp;gt;Notice that the &amp;quot;source&amp;quot; line of this file is commented out for now. After this directory is created during the install, we&#039;ll come back here to fix this. Another tweak you make elect to implement is changing the OMP_NUM_THREADS line to a number greater than 2 but less than or equal to the number of cores on your machine (2 is the max for a dual-core processor). Incrementing this environment variable will have benefits when running parallelized code. I also assume that you want Madagascar installed to a directory called &amp;quot;madagascar&amp;quot;. Feel free to adjust the second to last line accordingly. To have the changes you just made to the file take effect, type &amp;lt;pre&amp;gt;bash&amp;lt;/pre&amp;gt; into your terminal window. Now you&#039;re ready to run &amp;lt;bash&amp;gt;./configure --prefix=/directory/where/you/want/madagascar/installed&amp;lt;/bash&amp;gt; You can examine the &amp;lt;tt&amp;gt;config.py&amp;lt;/tt&amp;gt; file that this command generates.  Additional options are available. You can obtain a full list of customizable variables by running &amp;lt;tt&amp;gt;scons -h&amp;lt;/tt&amp;gt;. For example, to install C++ and Fortran-90 API bindings in addition to the basic package, run &amp;lt;bash&amp;gt;./configure API=c++,f90 --prefix=/directory/where/you/want/madagascar/installed&amp;lt;/bash&amp;gt; Oftentimes after running &amp;quot;./configure ...&amp;quot; you&#039;ll see a list of things that your system may not have installed (the items that have &amp;quot;no&amp;quot; next to them). Usually they are optional, but for the best experience with Madagascar, it is strongly recommended that you install these packages using a package manager such as yum. Example syntax is used here. Just change the name from &amp;quot;python-devel&amp;quot; to whatever you might be missing.&amp;lt;bash&amp;gt;yum install python-devel&amp;lt;/bash&amp;gt;After installing this dependency, rerun the .configure command above and repeat this step until you have all of the desired packages installed.&amp;lt;/ol&amp;gt;&lt;br /&gt;
# &#039;&#039;&#039;Building and installing the package:&#039;&#039;&#039; Run &amp;lt;bash&amp;gt;make install&amp;lt;/bash&amp;gt; If you need &amp;quot;root&amp;quot; privileges for installing under &amp;lt;tt&amp;gt;&amp;amp;#36;RSFROOT&amp;lt;/tt&amp;gt;, you may need to run &amp;lt;bash&amp;gt;make; su; make install&amp;lt;/bash&amp;gt; or &amp;lt;bash&amp;gt;make; sudo make install&amp;lt;/bash&amp;gt; If &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt; does not exist on your system, an alternative procedure can be found in the [[#Troubleshooting|Troubleshooting]] section. &lt;br /&gt;
# &#039;&#039;&#039;User setup:&#039;&#039;&#039; If your shell is &amp;lt;tt&amp;gt;sh&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;bash&amp;lt;/tt&amp;gt;, add to your &amp;lt;tt&amp;gt;$HOME/.bashrc&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;$HOME/.bash_profile&amp;lt;/tt&amp;gt; files the line &amp;lt;bash&amp;gt;source $RSFROOT/share/madagascar/etc/env.sh&amp;lt;/bash&amp;gt; where RSFROOT is the install directory you specified in the &amp;lt;tt&amp;gt;--prefix&amp;lt;/tt&amp;gt; option to &amp;lt;tt&amp;gt;./configure&amp;lt;/tt&amp;gt;. If your shell is &amp;lt;tt&amp;gt;(t)csh&amp;lt;/tt&amp;gt;, add to your &amp;lt;tt&amp;gt;$HOME/.cshrc&amp;lt;/tt&amp;gt; file the line &amp;lt;bash&amp;gt;source $RSFROOT/share/madagascar/etc/env.csh&amp;lt;/bash&amp;gt; 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 &amp;lt;tt&amp;gt;DATAPATH&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Uninstall==&lt;br /&gt;
To clean all intermediate files and all installed files, run &amp;lt;pre&amp;gt;scons -c install&amp;lt;/pre&amp;gt; or &amp;lt;pre&amp;gt;make distclean&amp;lt;/pre&amp;gt; in the source code directory.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
===Alternative build/install procedure===&lt;br /&gt;
# &#039;&#039;&#039;Set the environment variables:&#039;&#039;&#039; If your shell is &amp;lt;tt&amp;gt;sh&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;bash&amp;lt;/tt&amp;gt;, type (or uncomment) &amp;lt;bash&amp;gt;source env.sh&amp;lt;/bash&amp;gt; Else, if your shell is &amp;lt;tt&amp;gt;csh&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;tcsh&amp;lt;/tt&amp;gt;, type &amp;lt;bash&amp;gt;source env.csh&amp;lt;/bash&amp;gt;&lt;br /&gt;
# &#039;&#039;&#039;Build:&#039;&#039;&#039; Type &amp;lt;tt&amp;gt;scons&amp;lt;/tt&amp;gt;&lt;br /&gt;
# &#039;&#039;&#039;Install:&#039;&#039;&#039;  Run &amp;lt;tt&amp;gt;scons install&amp;lt;/tt&amp;gt; . If you need &amp;quot;root&amp;quot; privileges for installing under &amp;lt;tt&amp;gt;&amp;amp;#36;RSFROOT&amp;lt;/tt&amp;gt;, you may need to run &amp;lt;bash&amp;gt;su; scons install &amp;lt;/bash&amp;gt; or &amp;lt;bash&amp;gt;sudo scons install&amp;lt;/bash&amp;gt;&lt;br /&gt;
===Other issues===&lt;br /&gt;
Note that &amp;lt;tt&amp;gt;scons&amp;lt;/tt&amp;gt; does not inherit your environmental variables including &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt;. &lt;br /&gt;
If the configuration part ends with the message like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
checking if cc works ... failed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
the problem may be that your compiler is in unusual place. Try&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure CC=/full/path/to/cc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure CC=`which cc`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On Windows under SFU, use the &amp;lt;tt&amp;gt;gcc&amp;lt;/tt&amp;gt; compiler&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure CC=/opt/gcc.3.3/bin/gcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information, please consult the [[Advanced Installation]] guide.&lt;br /&gt;
&lt;br /&gt;
==Testing and quick start==&lt;br /&gt;
&lt;br /&gt;
Here are a few simple tests and and a brief introduction to Madagascar:&lt;br /&gt;
&lt;br /&gt;
Typing any Madagascar command in a terminal window without parameters should generate a brief documentation on that command. Try one of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfin&lt;br /&gt;
sfattr&lt;br /&gt;
sfspike&lt;br /&gt;
sfbandpass&lt;br /&gt;
sfwiggle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you get an error like &amp;quot;Command not found&amp;quot;, you may not have your &amp;lt;tt&amp;gt;&amp;amp;#36;PATH&amp;lt;/tt&amp;gt; environment variable set correctly, or you may need to issue the &amp;lt;tt&amp;gt;rehash&amp;lt;/tt&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Now try making a simple Madagascar data file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfspike n1=1000 k1=300 &amp;gt; spike.rsf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Cannot write to data file /path/spike.rsf@: Bad file descriptor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
you may need to create the directory pointed to by your &amp;lt;tt&amp;gt;&amp;amp;#36;DATAPATH&amp;lt;/tt&amp;gt; environment variable.&lt;br /&gt;
&lt;br /&gt;
The file &amp;lt;tt&amp;gt;spike.rsf&amp;lt;/tt&amp;gt; is a text header.  The actual data are stored in the binary file pointed to by the &amp;lt;tt&amp;gt;in=&amp;lt;/tt&amp;gt; parameter in the header.  You can look at the header file directly with &amp;lt;tt&amp;gt;more&amp;lt;/tt&amp;gt;, or better, examine the file properties with&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfin spike.rsf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can learn more about the contents of &amp;lt;tt&amp;gt;spike.rsf&amp;lt;/tt&amp;gt; with&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfattr &amp;lt; spike.rsf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following command applies a bandpass filter to &amp;lt;tt&amp;gt;spike.rsf&amp;lt;/tt&amp;gt; and puts the result in &amp;lt;tt&amp;gt;filter.rsf&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfbandpass fhi=2 phase=y &amp;lt; spike.rsf &amp;gt; filter.rsf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following command makes a graphics file from &amp;lt;tt&amp;gt;filter.rsf&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfwiggle clip=0.02 title=&amp;quot;Welcome to Madagascar&amp;quot; &amp;lt; filter.rsf &amp;gt; filter.vpl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have an X11 display program running, and your &amp;lt;tt&amp;gt;&amp;amp;#36;DISPLAY&amp;lt;/tt&amp;gt; environment variable is set correctly, you can display the graphics file with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfpen &amp;lt; filter.vpl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can pipe Madagascar commands together and do the whole thing at once like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfspike n1=1000 k1=300 | sfbandpass fhi=2 phase=y | \&lt;br /&gt;
sfwiggle clip=0.02 title=&amp;quot;Welcome to Madagascar&amp;quot; | sfpen&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have SCons installed, you can use it to automate Madagascar processing.  Here is a simple &amp;lt;tt&amp;gt;SConstruct&amp;lt;/tt&amp;gt; file to make &amp;lt;tt&amp;gt;filter.rsf&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;filter.vpl&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;python&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# Setting up&lt;br /&gt;
#&lt;br /&gt;
from rsf.proj import *&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Make filter.rsf&lt;br /&gt;
#&lt;br /&gt;
Flow(&#039;filter&#039;,None,&#039;spike n1=1000 k1=300 | bandpass fhi=2 phase=y&#039;)&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Make filter.vpl&lt;br /&gt;
#&lt;br /&gt;
Result(&#039;filter&#039;,&#039;wiggle clip=0.02 title=&amp;quot;Welcome to Madagascar&amp;quot;&#039;)&lt;br /&gt;
&lt;br /&gt;
End()&lt;br /&gt;
&amp;lt;/python&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Put the file in an empty directory, give it the name &amp;lt;tt&amp;gt;SConstruct&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;cd&amp;lt;/tt&amp;gt; to that directory, and issue the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
scons&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The graphics file is now stored in the &amp;lt;tt&amp;gt;Fig&amp;lt;/tt&amp;gt; subdirectory.  You can view it manually with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfpen Fig/filter.vpl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
... or you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
scons view&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When an SConstruct file makes more than one graphics file, the  &amp;lt;tt&amp;gt;scons view&amp;lt;/tt&amp;gt; command will display all of them in sequence. &lt;br /&gt;
[[Image:filter.png|frame|center|Welcome to Madagascar.]]&lt;br /&gt;
Now edit the &amp;lt;tt&amp;gt;SConstruct&amp;lt;/tt&amp;gt; file: change the title string on the &amp;lt;tt&amp;gt;Result&amp;lt;/tt&amp;gt; line to &amp;quot;Hello World!&amp;quot;, save the file, and rerun the scons command. You will see that scons has figured out that the file &amp;lt;tt&amp;gt;filter.rsf&amp;lt;/tt&amp;gt; does not need to be rebuilt because nothing that affects it has changed. Only the file &amp;lt;tt&amp;gt;filter.vpl&amp;lt;/tt&amp;gt; is rebuilt.&lt;/div&gt;</summary>
		<author><name>R-swindeman</name></author>
	</entry>
	<entry>
		<id>https://ahay.org/index.php?title=Installation&amp;diff=2789</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://ahay.org/index.php?title=Installation&amp;diff=2789"/>
		<updated>2014-03-31T00:29:04Z</updated>

		<summary type="html">&lt;p&gt;R-swindeman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Fotolia_4727725_XS.jpg|right|]]&lt;br /&gt;
Madagascar has been installed and is periodically tested on&lt;br /&gt;
*Different Linux distributions (Fedora, RedHat, Ubuntu, etc.) &lt;br /&gt;
*Solaris &lt;br /&gt;
*MacOS X &lt;br /&gt;
*Windows under the [http://www.cygwin.com/ Cygwin] environment.&lt;br /&gt;
&lt;br /&gt;
It was previously tested on&lt;br /&gt;
*FreeBSD &lt;br /&gt;
*HP-UX&lt;br /&gt;
*SGI Irix&lt;br /&gt;
*Windows under Microsoft&#039;s Services for UNIX environment.&lt;br /&gt;
&lt;br /&gt;
==Precompiled binary packages==&lt;br /&gt;
&lt;br /&gt;
See the [[Download|Madagascar download page]] for availability of binary packages.&lt;br /&gt;
&lt;br /&gt;
==Installation from source==&lt;br /&gt;
&lt;br /&gt;
===Platform-specific instructions===&lt;br /&gt;
&lt;br /&gt;
[[Windows|Specific instructions are provided]] for &#039;&#039;&#039;Windows&#039;&#039;&#039; users.&lt;br /&gt;
&lt;br /&gt;
For other platform-specific instructions, please consult the [[Advanced Installation#Platform-specific_installation_advice|Advanced Installation]] guide.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
  &lt;br /&gt;
#C compiler. Any ANSI-compliant compiler such as [http://gcc.gnu.org/ GCC] should work. GCC usually comes pre-installed on Linux machines. &lt;br /&gt;
#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 currently attempts to support Python versions 2.2 through 2.6.  Versions before 2.2 are not common, but if you experience problems and you have an earlier version you should probably upgrade.&lt;br /&gt;
&lt;br /&gt;
SCons is also required, but it is included with Madagascar and the configure scripts will attempt to install it for you if you don&#039;t have it already. Alternatively you can get it through yum with &amp;quot;yum install scons&amp;quot; in a terminal window. For more information see the [[Advanced Installation#Prerequisites|Advanced Installation]] guide.&lt;br /&gt;
&lt;br /&gt;
Each API option has [[Advanced Installation#Dependencies|its own prerequisites]].&lt;br /&gt;
&lt;br /&gt;
Prerequisites for optional add-on functionality are [[Advanced Installation#Platform specific installation advice|platform-specific]]. &lt;br /&gt;
&lt;br /&gt;
[[Windows|Building under cygwin on Windows]] requires several preparatory steps.&lt;br /&gt;
&lt;br /&gt;
===General instructions===&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Configuration:&#039;&#039;&#039; Open a terminal window and change to the top source directory (sometimes called &amp;quot;RSFSRC&amp;quot;). Next, you&#039;ll have to make some changes to your .bashrc file, so open it in you&#039;re favorite editor, e.g. &amp;lt;bash&amp;gt; vim ~/.bashrc &amp;lt;/bash&amp;gt; or &amp;lt;bash&amp;gt; gedit ~/.bashrc &amp;lt;/bash&amp;gt; Now simply append these lines to the bottom of the .bashrc file:&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
export DATAPATH=$HOME/scratch/&lt;br /&gt;
export EDITOR=nedit&lt;br /&gt;
export OMP_NUM_THREADS=2&lt;br /&gt;
export LATEX2HTML=$HOME/texmf/latex2html&lt;br /&gt;
export RSFROOT=~/madagascar&lt;br /&gt;
#source $HOME/Desktop/RSFSRC/env.sh&lt;br /&gt;
&amp;lt;/bash&amp;gt;Notice that the &amp;quot;source&amp;quot; line of this file is commented out for now. After this directory is created during the install, we&#039;ll come back here to fix this. Another tweak you make elect to implement is changing the OMP_NUM_THREADS line to a number greater than 2 but less than or equal to the number of cores on your machine (2 is the max for a dual-core processor). Incrementing this environment variable will have benefits when running parallelized code. I also assume that you want Madagascar installed to a directory called &amp;quot;madagascar&amp;quot;. Feel free to adjust the second to last line accordingly. To have the changes you just made to the file take effect, type &amp;lt;pre&amp;gt;bash&amp;lt;/pre&amp;gt; into your terminal window. Now you&#039;re ready to run &amp;lt;bash&amp;gt;./configure --prefix=/directory/where/you/want/madagascar/installed&amp;lt;/bash&amp;gt; You can examine the &amp;lt;tt&amp;gt;config.py&amp;lt;/tt&amp;gt; file that this command generates.  Additional options are available. You can obtain a full list of customizable variables by running &amp;lt;tt&amp;gt;scons -h&amp;lt;/tt&amp;gt;. For example, to install C++ and Fortran-90 API bindings in addition to the basic package, run &amp;lt;bash&amp;gt;./configure API=c++,f90 --prefix=/directory/where/you/want/madagascar/installed&amp;lt;/bash&amp;gt; Oftentimes after running &amp;quot;./configure ...&amp;quot; you&#039;ll see a list of things that your system may not have installed (the items that have &amp;quot;no&amp;quot; next to them). Usually they are optional, but for the best experience with Madagascar, it is strongly recommended that you install these packages using a package manager such as yum. Example syntax is used here. Just change the name from &amp;quot;python-devel&amp;quot; to whatever you might be missing.&amp;lt;bash&amp;gt;yum install python-devel&amp;lt;/bash&amp;gt;After installing this dependency, rerun the .configure command above and repeat this step until you have all of the desired packages installed.&lt;br /&gt;
# &#039;&#039;&#039;Building and installing the package:&#039;&#039;&#039; Run &amp;lt;bash&amp;gt;make install&amp;lt;/bash&amp;gt; If you need &amp;quot;root&amp;quot; privileges for installing under &amp;lt;tt&amp;gt;&amp;amp;#36;RSFROOT&amp;lt;/tt&amp;gt;, you may need to run &amp;lt;bash&amp;gt;make; su; make install&amp;lt;/bash&amp;gt; or &amp;lt;bash&amp;gt;make; sudo make install&amp;lt;/bash&amp;gt; If &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt; does not exist on your system, an alternative procedure can be found in the [[#Troubleshooting|Troubleshooting]] section. &lt;br /&gt;
# &#039;&#039;&#039;User setup:&#039;&#039;&#039; If your shell is &amp;lt;tt&amp;gt;sh&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;bash&amp;lt;/tt&amp;gt;, add to your &amp;lt;tt&amp;gt;$HOME/.bashrc&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;$HOME/.bash_profile&amp;lt;/tt&amp;gt; files the line &amp;lt;bash&amp;gt;source $RSFROOT/share/madagascar/etc/env.sh&amp;lt;/bash&amp;gt; where RSFROOT is the install directory you specified in the &amp;lt;tt&amp;gt;--prefix&amp;lt;/tt&amp;gt; option to &amp;lt;tt&amp;gt;./configure&amp;lt;/tt&amp;gt;. If your shell is &amp;lt;tt&amp;gt;(t)csh&amp;lt;/tt&amp;gt;, add to your &amp;lt;tt&amp;gt;$HOME/.cshrc&amp;lt;/tt&amp;gt; file the line &amp;lt;bash&amp;gt;source $RSFROOT/share/madagascar/etc/env.csh&amp;lt;/bash&amp;gt; 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 &amp;lt;tt&amp;gt;DATAPATH&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Uninstall==&lt;br /&gt;
To clean all intermediate files and all installed files, run &amp;lt;pre&amp;gt;scons -c install&amp;lt;/pre&amp;gt; or &amp;lt;pre&amp;gt;make distclean&amp;lt;/pre&amp;gt; in the source code directory.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
===Alternative build/install procedure===&lt;br /&gt;
# &#039;&#039;&#039;Set the environment variables:&#039;&#039;&#039; If your shell is &amp;lt;tt&amp;gt;sh&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;bash&amp;lt;/tt&amp;gt;, type (or uncomment) &amp;lt;bash&amp;gt;source env.sh&amp;lt;/bash&amp;gt; Else, if your shell is &amp;lt;tt&amp;gt;csh&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;tcsh&amp;lt;/tt&amp;gt;, type &amp;lt;bash&amp;gt;source env.csh&amp;lt;/bash&amp;gt;&lt;br /&gt;
# &#039;&#039;&#039;Build:&#039;&#039;&#039; Type &amp;lt;tt&amp;gt;scons&amp;lt;/tt&amp;gt;&lt;br /&gt;
# &#039;&#039;&#039;Install:&#039;&#039;&#039;  Run &amp;lt;tt&amp;gt;scons install&amp;lt;/tt&amp;gt; . If you need &amp;quot;root&amp;quot; privileges for installing under &amp;lt;tt&amp;gt;&amp;amp;#36;RSFROOT&amp;lt;/tt&amp;gt;, you may need to run &amp;lt;bash&amp;gt;su; scons install &amp;lt;/bash&amp;gt; or &amp;lt;bash&amp;gt;sudo scons install&amp;lt;/bash&amp;gt;&lt;br /&gt;
===Other issues===&lt;br /&gt;
Note that &amp;lt;tt&amp;gt;scons&amp;lt;/tt&amp;gt; does not inherit your environmental variables including &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt;. &lt;br /&gt;
If the configuration part ends with the message like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
checking if cc works ... failed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
the problem may be that your compiler is in unusual place. Try&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure CC=/full/path/to/cc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure CC=`which cc`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On Windows under SFU, use the &amp;lt;tt&amp;gt;gcc&amp;lt;/tt&amp;gt; compiler&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure CC=/opt/gcc.3.3/bin/gcc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information, please consult the [[Advanced Installation]] guide.&lt;br /&gt;
&lt;br /&gt;
==Testing and quick start==&lt;br /&gt;
&lt;br /&gt;
Here are a few simple tests and and a brief introduction to Madagascar:&lt;br /&gt;
&lt;br /&gt;
Typing any Madagascar command in a terminal window without parameters should generate a brief documentation on that command. Try one of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfin&lt;br /&gt;
sfattr&lt;br /&gt;
sfspike&lt;br /&gt;
sfbandpass&lt;br /&gt;
sfwiggle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you get an error like &amp;quot;Command not found&amp;quot;, you may not have your &amp;lt;tt&amp;gt;&amp;amp;#36;PATH&amp;lt;/tt&amp;gt; environment variable set correctly, or you may need to issue the &amp;lt;tt&amp;gt;rehash&amp;lt;/tt&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Now try making a simple Madagascar data file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfspike n1=1000 k1=300 &amp;gt; spike.rsf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Cannot write to data file /path/spike.rsf@: Bad file descriptor&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
you may need to create the directory pointed to by your &amp;lt;tt&amp;gt;&amp;amp;#36;DATAPATH&amp;lt;/tt&amp;gt; environment variable.&lt;br /&gt;
&lt;br /&gt;
The file &amp;lt;tt&amp;gt;spike.rsf&amp;lt;/tt&amp;gt; is a text header.  The actual data are stored in the binary file pointed to by the &amp;lt;tt&amp;gt;in=&amp;lt;/tt&amp;gt; parameter in the header.  You can look at the header file directly with &amp;lt;tt&amp;gt;more&amp;lt;/tt&amp;gt;, or better, examine the file properties with&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfin spike.rsf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can learn more about the contents of &amp;lt;tt&amp;gt;spike.rsf&amp;lt;/tt&amp;gt; with&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfattr &amp;lt; spike.rsf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following command applies a bandpass filter to &amp;lt;tt&amp;gt;spike.rsf&amp;lt;/tt&amp;gt; and puts the result in &amp;lt;tt&amp;gt;filter.rsf&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfbandpass fhi=2 phase=y &amp;lt; spike.rsf &amp;gt; filter.rsf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following command makes a graphics file from &amp;lt;tt&amp;gt;filter.rsf&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfwiggle clip=0.02 title=&amp;quot;Welcome to Madagascar&amp;quot; &amp;lt; filter.rsf &amp;gt; filter.vpl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have an X11 display program running, and your &amp;lt;tt&amp;gt;&amp;amp;#36;DISPLAY&amp;lt;/tt&amp;gt; environment variable is set correctly, you can display the graphics file with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfpen &amp;lt; filter.vpl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can pipe Madagascar commands together and do the whole thing at once like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfspike n1=1000 k1=300 | sfbandpass fhi=2 phase=y | \&lt;br /&gt;
sfwiggle clip=0.02 title=&amp;quot;Welcome to Madagascar&amp;quot; | sfpen&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have SCons installed, you can use it to automate Madagascar processing.  Here is a simple &amp;lt;tt&amp;gt;SConstruct&amp;lt;/tt&amp;gt; file to make &amp;lt;tt&amp;gt;filter.rsf&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;filter.vpl&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;python&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# Setting up&lt;br /&gt;
#&lt;br /&gt;
from rsf.proj import *&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Make filter.rsf&lt;br /&gt;
#&lt;br /&gt;
Flow(&#039;filter&#039;,None,&#039;spike n1=1000 k1=300 | bandpass fhi=2 phase=y&#039;)&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Make filter.vpl&lt;br /&gt;
#&lt;br /&gt;
Result(&#039;filter&#039;,&#039;wiggle clip=0.02 title=&amp;quot;Welcome to Madagascar&amp;quot;&#039;)&lt;br /&gt;
&lt;br /&gt;
End()&lt;br /&gt;
&amp;lt;/python&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Put the file in an empty directory, give it the name &amp;lt;tt&amp;gt;SConstruct&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;cd&amp;lt;/tt&amp;gt; to that directory, and issue the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
scons&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The graphics file is now stored in the &amp;lt;tt&amp;gt;Fig&amp;lt;/tt&amp;gt; subdirectory.  You can view it manually with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sfpen Fig/filter.vpl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
... or you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
scons view&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When an SConstruct file makes more than one graphics file, the  &amp;lt;tt&amp;gt;scons view&amp;lt;/tt&amp;gt; command will display all of them in sequence. &lt;br /&gt;
[[Image:filter.png|frame|center|Welcome to Madagascar.]]&lt;br /&gt;
Now edit the &amp;lt;tt&amp;gt;SConstruct&amp;lt;/tt&amp;gt; file: change the title string on the &amp;lt;tt&amp;gt;Result&amp;lt;/tt&amp;gt; line to &amp;quot;Hello World!&amp;quot;, save the file, and rerun the scons command. You will see that scons has figured out that the file &amp;lt;tt&amp;gt;filter.rsf&amp;lt;/tt&amp;gt; does not need to be rebuilt because nothing that affects it has changed. Only the file &amp;lt;tt&amp;gt;filter.vpl&amp;lt;/tt&amp;gt; is rebuilt.&lt;/div&gt;</summary>
		<author><name>R-swindeman</name></author>
	</entry>
	<entry>
		<id>https://ahay.org/index.php?title=Download&amp;diff=2785</id>
		<title>Download</title>
		<link rel="alternate" type="text/html" href="https://ahay.org/index.php?title=Download&amp;diff=2785"/>
		<updated>2014-03-28T21:38:43Z</updated>

		<summary type="html">&lt;p&gt;R-swindeman: /* LATEX package */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Fotolia_2043821_XS.jpg|right|]]&lt;br /&gt;
You can choose to download either the latest stable release, or the current development version (frequently updated).&lt;br /&gt;
&lt;br /&gt;
==Stable release==&lt;br /&gt;
&lt;br /&gt;
[http://sourceforge.net/projects/rsf/files/ Download the source code distribution from Sourceforge], then unpack the directory with &lt;br /&gt;
&amp;lt;pre&amp;gt;gunzip &amp;lt; madagascar-*.tar.gz | tar xvf -&amp;lt;/pre&amp;gt;&lt;br /&gt;
or &lt;br /&gt;
&amp;lt;pre&amp;gt;bunzip2 &amp;lt; madagascar-*.tar.bz2 | tar xvf -&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;tt&amp;gt;bz2&amp;lt;/tt&amp;gt; file is a bit smaller, but takes longer to unpack. &lt;br /&gt;
&lt;br /&gt;
Next, follow [[Installation|Installation instructions]] to install.&lt;br /&gt;
&lt;br /&gt;
==Current development version==&lt;br /&gt;
&lt;br /&gt;
To download the most recent Madagascar source code, you need to have a [http://subversion.apache.org/ Subversion client] (&amp;lt;tt&amp;gt;svn&amp;lt;/tt&amp;gt;) installed. If you want to download it read-only, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co &amp;lt;nowiki&amp;gt;http://svn.code.sf.net/p/rsf/code/trunk&amp;lt;/nowiki&amp;gt; RSFSRC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace &amp;lt;tt&amp;gt;RSFSRC&amp;lt;/tt&amp;gt; with the path where you want to put the Madagascar source code.&lt;br /&gt;
If you are a Madagascar project contributor and you want to download it in read-write mode, use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co \&lt;br /&gt;
--username=&amp;lt;your_sourceforge_username&amp;gt; \&lt;br /&gt;
&amp;lt;nowiki&amp;gt;https://svn.code.sf.net/p/rsf/code/trunk&amp;lt;/nowiki&amp;gt; RSFSRC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, follow [[Installation|Installation instructions]] to install.&lt;br /&gt;
&lt;br /&gt;
You can also [http://sourceforge.net/p/rsf/code/HEAD/tree/trunk browse the Subversion repository].&lt;br /&gt;
&lt;br /&gt;
===Updating===&lt;br /&gt;
&lt;br /&gt;
To update the Madagascar source code on your computer with the changes made by developers, &amp;lt;tt&amp;gt;cd&amp;lt;/tt&amp;gt; to the directory where you placed the sources and run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
  &lt;br /&gt;
*If, after running the &amp;lt;tt&amp;gt;svn co...&amp;lt;/tt&amp;gt; command, nothing happens, no message, no return to the command line: you may be behind a proxy. This is especially likely if your computer is on a corporate Intranet.  To get past a proxy, you need to tell Subversion: (1) The IP number or URL of the proxy and (2) the port that will allow &amp;lt;tt&amp;gt;svn&amp;lt;/tt&amp;gt; through &amp;amp;ndash; most likely 80, the standard HTTP port. Open your &amp;lt;tt&amp;gt;~/.subversion/servers&amp;lt;/tt&amp;gt; file in a text editor. If this file does not exist, running any &amp;lt;tt&amp;gt;svn&amp;lt;/tt&amp;gt; command (even an unsuccessful one, like the one above) will automatically create the file. In the &amp;lt;tt&amp;gt;[global]&amp;lt;/tt&amp;gt; section, add the following lines, with your own proxy URL and port names instead of the dummy ones below: &lt;br /&gt;
&amp;lt;pre&amp;gt;http-proxy-host = www-proxy.yourcompany.com&lt;br /&gt;
http-proxy-port = 80&lt;br /&gt;
&amp;lt;/pre&amp;gt; Now your &amp;lt;tt&amp;gt;svn&amp;lt;/tt&amp;gt; commands should work. You can find more details [http://subversion.tigris.org/faq.html#proxy in the Subversion documentation]. It would also be a good idea to set in your &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;.cshrc&amp;lt;/tt&amp;gt; the environment variable &amp;lt;tt&amp;gt;HTTP_PROXY&amp;lt;/tt&amp;gt; to your adaptation of &amp;lt;pre&amp;gt;http://www-proxy.yourcompany.com:80&amp;lt;/pre&amp;gt; so that input datasets for reproducible figures can be downloaded automatically when you need them.&lt;br /&gt;
&lt;br /&gt;
*If you get a &amp;quot;is already a working copy for a different URL&amp;quot; error, this means you have an existing directory downloaded from another server. Run &amp;lt;tt&amp;gt;svn switch --relocate&amp;lt;/tt&amp;gt; to switch servers.&lt;br /&gt;
&lt;br /&gt;
*If you are using an old Linux distribution (e.g. RedHat 9), the version of Subversion included with your distribution may need to be updated to handle the secure URL (&amp;lt;nowiki&amp;gt;https://&amp;lt;/nowiki&amp;gt;).  If &amp;lt;tt&amp;gt;svn&amp;lt;/tt&amp;gt; complains about an &amp;quot;unrecognized URL scheme&amp;quot; (and you&#039;ve given it the correctly formatted URL), then you need to update it.&lt;br /&gt;
&lt;br /&gt;
*If you are behind a firewall, you may need to set up more variables in your file &amp;lt;tt&amp;gt;~/.subversion/servers&amp;lt;/tt&amp;gt; (check with your IT support for all the required variables to get past the proxy) as for example&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[global]&lt;br /&gt;
http-proxy-host = proxy-host-company.site.corp &lt;br /&gt;
http-proxy-port = 1111&lt;br /&gt;
http-proxy-username = Yourusernameforproxy&lt;br /&gt;
http-proxy-password = Yourpasswordforproxy &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
It would be a good idea then to protect your file &amp;lt;tt&amp;gt;~/.subversion/servers&amp;lt;/tt&amp;gt; from being read by others.&lt;br /&gt;
&lt;br /&gt;
==Other packages==&lt;br /&gt;
There are two other packages that might be useful in conjunction with RSF:&lt;br /&gt;
===Reproducible figures===&lt;br /&gt;
  &lt;br /&gt;
Using Subversion, run &lt;br /&gt;
&amp;lt;pre&amp;gt;svn co http://svn.code.sf.net/p/rsf/code/figs $RSFROOT/share/madagascar/figs &amp;lt;/pre&amp;gt; &lt;br /&gt;
This installs a wide collection of more than 5,000 reproducible figures. It may take a long time to download and more than 6 Gb of disk space.&lt;br /&gt;
The figures are preserved with the purpose of regression testing whenever the software or the environment change.&lt;br /&gt;
&lt;br /&gt;
You can reproduce the figures (excluding those generated with proprietary data or additional software) by running &amp;lt;tt&amp;gt;scons lock&amp;lt;/tt&amp;gt; in individual project directories or by going to &amp;lt;tt&amp;gt;RSFSRC&amp;lt;/tt&amp;gt; and running &lt;br /&gt;
&amp;lt;pre&amp;gt;sfbooklist command=&amp;quot;scons lock&amp;quot; book&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LaTeX package===&lt;br /&gt;
  &lt;br /&gt;
[[SEGTeX]] is a LaTeX package for geophysical publications. It can be used with madagascar for writing [[Reproducible Documents|reproducible papers]].&lt;/div&gt;</summary>
		<author><name>R-swindeman</name></author>
	</entry>
</feed>