cd mpi4py-1.3.1
pip install .
</source>
== Scripts to run relax ==
See [[Installation_linux#mpi4py | linux mpi4py installtion]] if you want to run multi processor mode.
Here we have one computer, with 24 cores, called '''haddock'''.
We want to have the users logon on to haddock, when they want to do multi-core calculations.
For private single computer
<source lang="bash">
#!/bin/tcsh
# Set the lax version used for this script.
set RELAX=/sbinlab2/software/NMR-relax/relax_trunk/relax
# Run relax in multi processor mode.
set RELAXRUN="$RELAX $argv"
# Activate python
ap
$RELAX $argv
</source>
For multi core computations.
<source lang="bash">
#!/bin/tcsh
# Set the lax version used for this script.
set RELAX=/sbinlab2/software/NMR-relax/relax_trunk/relax
# Set number of available CPUs.
#set NPROC=`nproc`
set NPROC=5
set NP=`echo $NPROC + 1 | bc `
# Run relax in multi processor mode.
set RELAXRUN="/usr/lib64/openmpi/bin/mpirun -np $NP $RELAX --multi='mpi4py' $argv"
# Check machine, since only machine haddock have openmpi-devel installed
if ( $HOST != "haddock") then
echo "You have to run on haddock. I do it for you"
ssh haddock -Y -t "cd $PWD; ap; $RELAXRUN; /bin/tcsh"
else
# Activate python
ap
/usr/lib64/openmpi/bin/mpirun -np $NP $RELAX --multi='mpi4py' $argv
endif
</source>