Difference between revisions of "Install relax cloud.sagemath.com"

From relax wiki
Jump to navigation Jump to search
Line 198: Line 198:
 
pip install .
 
pip install .
 
cd ..
 
cd ..
 +
</source>
 +
 +
===Test python packages===
 +
Paste in
 +
<source lang="python">
 +
try:
 +
    import bmrblib
 +
    print bmrblib.__file__
 +
    print bmrblib.__version__
 +
except ImportError:
 +
    print "no bmrblib module"
 +
 +
 +
try:
 +
    import minfx
 +
    print minfx.__file__
 +
    print minfx.__version__
 +
except ImportError:
 +
    print "no minfx module"
 +
 +
 +
try:
 +
    import mpi4py
 +
    print mpi4py.__file__
 +
    print mpi4py.__version__
 +
except ImportError:
 +
    print "no mpi4py module"
 +
</source>
 +
 +
Output
 +
<source lang="python">
 +
>>> try:
 +
...    import bmrblib
 +
...    print bmrblib.__file__
 +
...    print bmrblib.__version__
 +
... except ImportError:
 +
...    print "no bmrblib module"
 +
...
 +
/projects/9cd9d431-3eb2-4cde-a03a-4b9c6b49a1c2/.local/lib/python2.7/site-packages/bmrblib/__init__.pyc
 +
1.0.4
 +
>>> try:
 +
...    import minfx
 +
...    print minfx.__file__
 +
...    print minfx.__version__
 +
... except ImportError:
 +
...    print "no minfx module"
 +
...
 +
/projects/9cd9d431-3eb2-4cde-a03a-4b9c6b49a1c2/.local/lib/python2.7/site-packages/minfx/__init__.pyc
 +
1.0.12
 +
>>> try:
 +
...    import mpi4py
 +
...    print mpi4py.__file__
 +
...    print mpi4py.__version__
 +
... except ImportError:
 +
...    print "no mpi4py module"
 +
...
 +
/projects/9cd9d431-3eb2-4cde-a03a-4b9c6b49a1c2/.local/lib/python2.7/site-packages/mpi4py/__init__.pyc
 +
2.0.0
 
</source>
 
</source>
  
 
== See also ==
 
== See also ==
 
[[Category:Devel tutorial]]
 
[[Category:Devel tutorial]]

Revision as of 08:28, 24 November 2015


The test project at cloud.sagemath.com

This audit was performed: 2015/11/24

Project location

https://cloud.sagemath.com/projects/9cd9d431-3eb2-4cde-a03a-4b9c6b49a1c2/files/test%20ipyth.ipynb

Project resources

Disk space: 3000 MB disk space available - 59 MB used    3000 MB given by free project
Memory: 1000 MB RAM memory available - 133 MB used    1000 MB given by free project
CPU cores:1 core    1 core given by free project
CPU shares: 1 share    1 share given by free project
Idle timeout: 1 hour of non-interactive use before project stops    1 hour given by free project
Network access: Yes    1 upgrade given by free project
Member hosting: No    0 upgrades given by free project

Software at cloud.sagemath.com

Is subversion available

~$ svn --version
svn, version 1.8.10 (r1615264)

Is scons available

~$ which scons
/usr/bin/scons

~$ scons --version
SCons by Steven Knight et al.:
        script: v2.3.1, 2014/03/02 14:18:15, by garyo on lubuntu
        engine: v2.3.1, 2014/03/02 14:18:15, by garyo on lubuntu
        engine path: ['/usr/lib/scons/SCons']

Is xmgrace available

~$ xmgrace
The program 'xmgrace' is currently not installed. To run 'xmgrace' please ask your administrator to install the package 'grace'
~$ grace
The program 'grace' is currently not installed. To run 'grace' please ask your administrator to install the package 'grace'

Is mpirun available

~$ which mpicc
/usr/bin/mpicc

~$ which mpiexec
/usr/bin/mpiexec

~$ which mpirun
/usr/bin/mpirun

~$ mpirun --version
mpirun (Open MPI) 1.6.5
 
Report bugs to http://www.open-mpi.org/community/help/

~$ mpirun --report-bindings -np 4 echo "hello world"
hello world
hello world
hello world
hello world

python packages at cloud.sagemath.com

Start python

python

Version of python

Python 2.7.9 (default, Apr  2 2015, 15:33:21)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

Paste in

try:
    import wx
    print wx.__file__
    print wx.version()
    print wx.__version__
except ImportError:
    print "no wx module"


try:
    import bmrblib
    print bmrblib.__file__
    print bmrblib.__version__
except ImportError:
    print "no bmrblib module"


try:
    import minfx
    print minfx.__file__
    print minfx.__version__
except ImportError:
    print "no minfx module"


try:
    import mpi4py
    print mpi4py.__file__
    print mpi4py.__version__
except ImportError:
    print "no mpi4py module"

Output

>>> try:
...     import wx
...     print wx.__file__
...     print wx.version()
...     print wx.__version__
... except ImportError:
...     print "no wx module"
...
no wx module
>>> try:
...     import bmrblib
...     print bmrblib.__file__
...     print bmrblib.__version__
... except ImportError:
...     print "no bmrblib module"
...
no bmrblib module
>>> try:
...     import minfx
...     print minfx.__file__
...     print minfx.__version__
... except ImportError:
...     print "no minfx module"
...
no minfx module
>>> try:
...     import mpi4py
...     print mpi4py.__file__
...     print mpi4py.__version__
... except ImportError:
...     print "no mpi4py module"
...
no mpi4py module

Scripts to install

python modules

Bmrblib

See Bmrblib

v=1.0.4

mkdir -p $HOME/Downloads
cd $HOME/Downloads
curl http://download.gna.org/bmrblib/bmrblib-$v.tar.gz -o bmrblib-$v.tar.gz
tar -xzf bmrblib-$v.tar.gz
cd bmrblib-$v
pip install .
cd ..

minfx

See Minfx

v=1.0.12

mkdir -p $HOME/Downloads
cd $HOME/Downloads
curl http://download.gna.org/minfx/minfx-$v.tar.gz -o minfx-$v.tar.gz
tar -xzf minfx-$v.tar.gz
cd minfx-$v
pip install .
cd ..

mpi4py

See OpenMPI#Install_mpi4py

v=2.0.0

mkdir -p $HOME/Downloads
cd $HOME/Downloads
wget https://bitbucket.org/mpi4py/mpi4py/downloads/mpi4py-$v.tar.gz
tar -xzf mpi4py-$v.tar.gz
cd mpi4py-$v
pip install .
cd ..

Test python packages

Paste in

try:
    import bmrblib
    print bmrblib.__file__
    print bmrblib.__version__
except ImportError:
    print "no bmrblib module"


try:
    import minfx
    print minfx.__file__
    print minfx.__version__
except ImportError:
    print "no minfx module"


try:
    import mpi4py
    print mpi4py.__file__
    print mpi4py.__version__
except ImportError:
    print "no mpi4py module"

Output

>>> try:
...     import bmrblib
...     print bmrblib.__file__
...     print bmrblib.__version__
... except ImportError:
...     print "no bmrblib module"
...
/projects/9cd9d431-3eb2-4cde-a03a-4b9c6b49a1c2/.local/lib/python2.7/site-packages/bmrblib/__init__.pyc
1.0.4
>>> try:
...     import minfx
...     print minfx.__file__
...     print minfx.__version__
... except ImportError:
...     print "no minfx module"
...
/projects/9cd9d431-3eb2-4cde-a03a-4b9c6b49a1c2/.local/lib/python2.7/site-packages/minfx/__init__.pyc
1.0.12
>>> try:
...     import mpi4py
...     print mpi4py.__file__
...     print mpi4py.__version__
... except ImportError:
...     print "no mpi4py module"
...
/projects/9cd9d431-3eb2-4cde-a03a-4b9c6b49a1c2/.local/lib/python2.7/site-packages/mpi4py/__init__.pyc
2.0.0

See also