How to install XPPAUT in Ubuntu-11.04, Ubuntu-12.04 and higher versions.

How to install XPPAUT in Ubuntu-11.04, Ubuntu-12.04 and higher versions. 

(i.e. Ubuntu-11.04, 11.10, 12.04, 12.10, 13.04, 13.10, 14.04, 14.10, 15.04 and higher)

XPPAUT is a tool for solving differential equations, difference equations, delay equations, functional equations, boundary value problems, and stochastic equations. It is very easy to use and can solve any non-linear differential equation that is very difficult by analytic method. Also unlike other low level and high level languages, it is VERY EASY TO WRITE THE CODE for differential or any other dynamic equation in XPPAUT. THE EQUATIONS ARE WRITTEN AS WE WRITE ANALYTICALLY. It can also make animation or movie of your dynamic system. It is considered as best friend of researchers working in the field of Non-linear Dynamics.

XPPAUT was very easy to install in Ubuntu-10.10 or lower versions, but in
2010 Ubuntu has modified it's architecture and has introduced one new directory named as x86_64-linux-gnu (for 64 bit computers and x86_32-linux-gnu in 32 bit computers) in the location at /usr/include. 
This has made me write this post to tell you all that how can we handle this issue.

So to install xppaut do the following:
(1) Before you begin to install do this first, make three directories "sys", "bits" and "gnu" with following commands in terminal
sudo mkdir /usr/include/sys
sudo mkdir /usr/include/bits
sudo mkdir /usr/include/gnu

(2)  type the following in terminal
(a) sudo ln -s /usr/include/x86_64-linux-gnu/sys/types.h   /usr/include/sys/
(b) sudo ln -s /usr/include/x86_64-linux-gnu/bits/predefs.h   /usr/include/bits/
(c) sudo ln -s /usr/include/x86_64-linux-gnu/sys/cdefs.h   /usr/include/sys
(d) sudo ln -s /usr/include/x86_64-linux-gnu/bits/wordsize.h   /usr/include/bits/
(e) sudo ln -s /usr/include/x86_64-linux-gnu/gnu/stubs.h   /usr/include/gnu/

(3) Get the latest source code of xppaut from here and extract it.

(4) Type in the terminal

cd location/to/xppau_latest/

Now if you have a 64 bit computer then open the Makefile and do the following change:

(a) In makefile uncomment the line no. 41 and line no. 44 and comment the line no. 43 and line no. 45

Now if you have a 32 bit computer then 

(a) Don't do 4(a) but replace x86_64-linux-gnu with x86_32-linux-gnu for 2(a) to 2(e)

(5) type in terminal
     make 

It will create an executable binary file file "xppaut"

(6) type in terminal
     sudo cp xppaut /usr/bin/

And there you are XPPAUT is installed!

To try XPPAUT do the following
Download the a "shm.ode"  file solving the simple harmonic oscillator from here
(1) Now open the terminal and type the following

 xppaut shm.ode

It will open the xppaut window and type "ig"  to get the plot between x and t.
You can also get the data file by following command

xppaut shm.ode -silent -outfile filename.dat

It will create a output data file name "filename.dat" containing 6 columns in which col.1 to col6. are
time, velocity, position, potential energy, kinetic energy, and total energy.
 You can use any plotter (e.g. gnuplot) to plot the data from the file "filename.dat". 

You can find a short tutorial for XPPAUT from here .


Comments

  1. Thank you so much for addressing this issue.
    I am beginner with ode .

    However, i have some issues regarding your software XPP_ Solution .

    1.I already had installed with the old version of Makefile without modif, i had also changed the uncommenting today after seeing your page.

    However , it still does not "move ".

    2.By me, it was line 40 and 43 with CFLAGS and LDFLAGS that i could uncomment .

    However, that does not change anything in the program after make is done.
    3.Just a question , what actually the sigbnificance of the line 41 CFLAGS -g pedantic ........ and LDFLAGS = -m32 /-L ..lib ?

    4.Can you suggest a file besides README (not understandable<)that also address the use of xpp ?

    I am quite frustrated after filling down the vars in the bars and do not see anything changing.
    Thanks,

    Regards,
    ada deh aka Wili

    ReplyDelete

Post a Comment

Popular posts from this blog

How to Embed mp4 movie in beamer latex presentation

How to install ifort compiler in you personal directory on University cluster/workstation

How Install XGRAFIX in Ubuntu-12.04