Author: tlinnet
Date: Sun Oct  2 23:13:08 2016
New Revision: 28240

URL: http://svn.gna.org/viewcvs/relax?rev=28240&view=rev
Log:
Adding scripts to test openmpi installation and deploy in redhat.

Modified:
    
trunk/devel_scripts/deploy_scripts/deploy_google_computing_redhat_6_86_x64.sh
    
trunk/devel_scripts/deploy_scripts/deploy_google_computing_redhat_6_86_x64_upgrade_python.sh
    trunk/devel_scripts/openmpi_test_install.sh

Modified: 
trunk/devel_scripts/deploy_scripts/deploy_google_computing_redhat_6_86_x64.sh
URL: 
http://svn.gna.org/viewcvs/relax/trunk/devel_scripts/deploy_scripts/deploy_google_computing_redhat_6_86_x64.sh?rev=28240&r1=28239&r2=28240&view=diff
==============================================================================
--- 
trunk/devel_scripts/deploy_scripts/deploy_google_computing_redhat_6_86_x64.sh   
    (original)
+++ 
trunk/devel_scripts/deploy_scripts/deploy_google_computing_redhat_6_86_x64.sh   
    Sun Oct  2 23:13:08 2016
@@ -10,10 +10,6 @@
   # Install for running relax in multiple CPU mode
   sudo yum -y install openmpi-devel
   echo "module load openmpi-1.10-x86_64" >> $HOME/.bash_profile
-  #bash --init-file <(echo 'mpirun --report-bindings -np 2 echo "hello world"; 
exit')
-
-  # mpi4py
-  sudo yum -y install mpi4py-openmpi
 
   # Install dependencies
   sudo yum -y install numpy
@@ -26,6 +22,10 @@
   wget 
http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
   sudo rpm -ivh epel-release-6-8.noarch.rpm
   sudo yum -y install grace
+
+  # mpi4py
+  sudo yum -y install mpi4py-openmpi
+  sudo yum info mpi4py-openmpi
 }
 
 # Install python packages

Modified: 
trunk/devel_scripts/deploy_scripts/deploy_google_computing_redhat_6_86_x64_upgrade_python.sh
URL: 
http://svn.gna.org/viewcvs/relax/trunk/devel_scripts/deploy_scripts/deploy_google_computing_redhat_6_86_x64_upgrade_python.sh?rev=28240&r1=28239&r2=28240&view=diff
==============================================================================
--- 
trunk/devel_scripts/deploy_scripts/deploy_google_computing_redhat_6_86_x64_upgrade_python.sh
        (original)
+++ 
trunk/devel_scripts/deploy_scripts/deploy_google_computing_redhat_6_86_x64_upgrade_python.sh
        Sun Oct  2 23:13:08 2016
@@ -10,13 +10,8 @@
   # Install for running relax in multiple CPU mode
   sudo yum -y install openmpi-devel
   echo "module load openmpi-1.10-x86_64" >> $HOME/.bash_profile
-  #bash --init-file <(echo 'mpirun --report-bindings -np 2 echo "hello world"; 
exit')
-
-  # mpi4py
-  sudo yum -y install mpi4py-openmpi
 
   # Install dependencies
-  sudo yum -y install numpy
   sudo yum -y install scipy python-matplotlib
 
   # For trunk checkout and graphs
@@ -28,11 +23,38 @@
   sudo yum -y install grace
 }
 
-# Install python packages
-function dopip {
-  # Install python pip
-  sudo easy_install pip
-  sudo pip install epydoc
+# Install python
+function dopython {
+  # Install python 2.7 packages
+  sudo yum list python27\* | grep -E 'numpy|scipy|matplotlib|mpi4py' 
+  sudo yum -y install python27-numpy python27-scipy
+
+  # Python 2.7 scl (short for “Software Collection”) 
+  scl -l
+
+  # Instead of using a subshell, we will source dire  
+  #scl enable python27 bash
+  #cat /opt/rh/python27/enable
+  source scl_source enable python27
+  echo "source scl_source enable python27" >> $HOME/.bash_profile
+
+  # Test for sudo and sourcing
+  python --version
+  sudo python --version
+  sudo -- sh -c 'source scl_source enable python27; python --version'
+
+  # Pip and packages
+  sudo -- sh -c 'source scl_source enable python27; easy_install pip'
+  pip --version
+  sudo -- sh -c 'source scl_source enable python27; pip install --upgrade pip'
+  pip --version
+
+  # mpi4py
+  sudo -- sh -c 'source scl_source enable python27; env 
MPICC=/usr/lib64/openmpi-1.10/bin/mpicc pip install mpi4py'
+  mpirun -np 2 python -c "import mpi4py; from mpi4py import MPI; print('Mpi4py 
%s process %d of %d on %s.' %(mpi4py.__version__, 
MPI.COMM_WORLD.Get_rank(),MPI.COMM_WORLD.Get_size(), MPI.Get_processor_name()))"
+
+  # Install python epydoc
+  sudo -- sh -c 'source scl_source enable python27; pip install epydoc'
 }
 
 function getversions {
@@ -123,7 +145,7 @@
 # Combine functions
 function installandcheck {
   doyum
-  dopip
+  dopython
   getversions
   dobin
   dopiplocal

Modified: trunk/devel_scripts/openmpi_test_install.sh
URL: 
http://svn.gna.org/viewcvs/relax/trunk/devel_scripts/openmpi_test_install.sh?rev=28240&r1=28239&r2=28240&view=diff
==============================================================================
--- trunk/devel_scripts/openmpi_test_install.sh (original)
+++ trunk/devel_scripts/openmpi_test_install.sh Sun Oct  2 23:13:08 2016
@@ -1,34 +1,59 @@
+#!/bin/bash
+# -*- coding: UTF-8 -*-
+# Script for deploying relax on Google Cloud Computing GCC
+
 echo 
'http://svn.gna.org/viewcvs/*checkout*/relax/trunk/devel_scripts/openmpi_test_install.sh'
-echo '#Run this script with: $SHELL test_openmpi.sh'
+echo 'Source the commands with: source test_openmpi.sh'
 echo ""
 
-echo "This script is to test relax and openmpi."
-echo ""
+function testopenmpi {
+  echo "This is functions to test openmpi, python and openmpi."
+  echo ""
 
-echo "Shell is: $SHELL"
-echo ""
+  echo "Shell is: $SHELL"
+  echo ""
 
-echo "> which mpirun"
-which mpirun
-echo ""
+  echo "> which mpirun"
+  which mpirun
+  echo ""
 
-echo "> module avail"
-module avail
-echo ""
+  echo "> module avail"
+  module avail
+  echo ""
 
-echo "> lscpu"
-lscpu
-echo ""
+  echo "> lscpu"
+  lscpu
+  echo ""
 
-echo "> mpirun --version"
-mpirun --version
-echo ""
+  echo "> mpirun --version"
+  mpirun --version
+  echo ""
 
-echo '> mpirun --report-bindings -np 2 echo "hello world"'
-mpirun --report-bindings -np 2 echo "hello world"
-echo ""
+  echo '> mpirun --report-bindings -np 2 echo "hello world"'
+  mpirun --report-bindings -np 2 echo "hello world"
+  echo ""
 
-echo "> mpirun --np 2 relax_trunk --multi='mpi4py'"
-mpirun --np 2 relax_trunk --multi='mpi4py'
-echo ""
+  A='"'
+  echo "> mpirun --report-bindings -np 2 python -c 'print $A Hello $A '"
+  mpirun --report-bindings -np 2 python -c 'print " Hello " '
+  echo ""
 
+  echo "> mpirun --report-bindings -np 2 python --version"
+  mpirun --report-bindings -np 2 python --version
+  echo ""
+
+  echo "> mpirun --report-bindings -np 2 /usr/bin/env python --version"
+  mpirun --report-bindings -np 2 /usr/bin/env python --version
+  echo ""
+
+  echo "Testing python, mpi4py and mpirun"
+  python --version
+  /usr/bin/env python --version
+  python -c "import mpi4py; print mpi4py.__version__"
+  mpirun -np 2 python -c "import mpi4py; from mpi4py import MPI; print('Mpi4py 
%s process %d of %d on %s.' %(mpi4py.__version__, 
MPI.COMM_WORLD.Get_rank(),MPI.COMM_WORLD.Get_size(), MPI.Get_processor_name()))"
+  echo ""
+
+  #echo "> mpirun --np 2 relax --multi='mpi4py'"
+  #mpirun --np 2 relax --multi='mpi4py'
+  #echo ""
+}


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits

Reply via email to