<?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=Alessandro+Frigeri</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=Alessandro+Frigeri"/>
	<link rel="alternate" type="text/html" href="https://ahay.org/wiki/Special:Contributions/Alessandro_Frigeri"/>
	<updated>2026-06-21T04:02:31Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.7</generator>
	<entry>
		<id>https://ahay.org/index.php?title=Installation&amp;diff=1840</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://ahay.org/index.php?title=Installation&amp;diff=1840"/>
		<updated>2011-06-27T08:49:52Z</updated>

		<summary type="html">&lt;p&gt;Alessandro Frigeri: /* Installation from source */&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;
  &lt;br /&gt;
*Different Linux distributions (Fedora, RedHat, SuSE, Debian, Ubuntu, Oracle, Mandriva, YellowDog) &lt;br /&gt;
*FreeBSD &lt;br /&gt;
*Solaris &lt;br /&gt;
*HP-UX&lt;br /&gt;
*SGI Irix&lt;br /&gt;
*MacOS X &lt;br /&gt;
*Windows under the [http://www.cygwin.com/ Cygwin] environment and under Microsoft&#039;s [http://technet.microsoft.com/en-us/library/bb496506.aspx Services for UNIX] environment.&lt;br /&gt;
&lt;br /&gt;
==Precompiled binary packages==&lt;br /&gt;
&lt;br /&gt;
A precompiled binary package of the latest Madagascar stable release exists for Mac OS X.  See the [[Download|Madagascar download page]] for details.&lt;br /&gt;
&lt;br /&gt;
==Installation from source==&lt;br /&gt;
&lt;br /&gt;
These instructions apply to 1.0 and later versions. For old (0.9.9 and earlier) versions, see [[Advanced Installation]].&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Configuration:&#039;&#039;&#039; Change to the top source directory and 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; &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/etc/madagascar/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/etc/madagascar/env.csh&amp;lt;/bash&amp;gt; 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;
==Platform-specific instructions==&lt;br /&gt;
&lt;br /&gt;
For platform-specific instructions, please consult the [[Advanced Installation#Platform-specific_installation_advice|Advanced Installation]] guide.&lt;br /&gt;
&lt;br /&gt;
Specific instructions are provided for [[Windows]] users.&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 &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;
===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. 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;
==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=1 &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=1 | \&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,&lt;br /&gt;
     &#039;spike n1=1000 k1=300 | bandpass fhi=2 phase=1&#039;)&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Make filter.vpl&lt;br /&gt;
#&lt;br /&gt;
Result(&#039;filter&#039;,&lt;br /&gt;
       &#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>Alessandro Frigeri</name></author>
	</entry>
</feed>