Upload
miladh1
View
215
Download
0
Embed Size (px)
Citation preview
7/27/2019 assimulo_home_installation.pdf
1/3
InstallationInstallationInstallationInstallation
Dependencies:
Python-2.6 / 2.7
Numpy (>1.6.1 for the solver DASP3)
Scipy
Pylab
Additional dependencies for compiling from source:
Python-2.6 / 2.7 with headers (python-dev package for Ubuntu)
Sundials-2.4/2.5 (for 64bits machines, install Sundials using -fPIC)
Cython 0.15
C compiler
Fortran compiler
BLAS (only needed for the solver GLIMDA)
LAPACK (only needed for the solver GLIMDA)
Assimulo is found on the Downloadpage.
Installation flagsInstallation flagsInstallation flagsInstallation flags
When installing Assimulo from source there are a number of available flags that can be specified in order
to point to dependencies and which should be provided after the install command:
python setup.py install ...
The available flags are:
- "--sundials-home=..." - Point to an Sundials installation
- "--blas-home=..." - Point to an BLAS installation
- "--lapack-home=..." - Point to an LAPACK installation
Example:
python setup.py install --sundials-home=/home/chria/Sundials --blas-home=/home/chria/Blas
UbuntuUbuntuUbuntuUbuntu
Once all the dependencies are satisfied an installation is done by:
python setup.py install
After a successful installation, the package will be located in Pythons dist-packages folder. For
troubleshooting see Troubleshooting.
NoteNoteNoteNote
If Sundials has been installed on a different location then the default, use the sundials flag:
Page 1 of 3Installation Assimulo 2.4 documentation
10/15/2013http://www.jmodelica.org/assimulo_home/installation.html
7/27/2019 assimulo_home_installation.pdf
2/3
--sundials-home=/path/to/sundials
NoteNoteNoteNote
To test Assimulo, go into the tests folder and type:
nosetests
Which requires python-nose.
WindowsWindowsWindowsWindows
For installing on Windows it is recommended to download the binary installers from the Downloadpage
which includes all the solvers available. The below instructions are for installing Assimulo on Windows
from source.
NoteNoteNoteNote
Assimulo is also dependent on the Windows redistributable package for Windows.
Installing Sundials on Windows can be a bit tricky but here is a link for installing Sundials using cmake
together with Visual Studio, http://sundials.wikidot.com/installation-cmake-vs . However I would
recommend using Mingw instead of Visual Studio, here is link for installing Mingw on Windows and
setting up Cython to use it, http://docs.cython.org/src/tutorial/appendix.html . If you would like to use
Mingw instead of Visual Studio, just follow the above guide for installing Sundials until the step where
Visual Studio is used. Instead of following those instructions, browse to Sundials build catalogue using
the command prompt and type:
make
make install
Once Sundials and the rest of the packages are installed just install Assimulo by browsing to the folder in
the command prompt and type:
python setup.py install --sundials-home=/path/to/sundials
After a successful installation, the package will be located in pythons dist-packages folder.
NoteNoteNoteNote
To test Assimulo, go into the tests folder and type:
nosetests
Which requires python-nose.
TroubleshootingTroubleshootingTroubleshootingTroubleshooting
Ubuntu 64bitsUbuntu 64bitsUbuntu 64bitsUbuntu 64bits
There have been some problems installing Assimulo on Ubuntu 64bits machines when Sundials has been
installed with the default options. The problem generates the following error printout:
Page 2 of 3Installation Assimulo 2.4 documentation
10/15/2013http://www.jmodelica.org/assimulo_home/installation.html
7/27/2019 assimulo_home_installation.pdf
3/3
/usr/bin/ld: /home/chria/sundialscode/lib/libsundials_cvodes.a(cvodes.o): relocation R_X86_64
against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
> /home/chria/sundialscode/lib/libsundials_cvodes.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> error: command 'gcc' failed with exit status 1
To solve this problem, Sundials has to be installed with the CFLAGS=-fPIC.
Page 3 of 3Installation Assimulo 2.4 documentation
10/15/2013http://www jmodelica org/assimulo home/installation html