Thursday, February 18, 2016

Running parallel VisIt

VisIt is a very general purpose data visualization software. One can create a wide range of visualizations using this such as drawing pseudo color, 3D vector plot, etc.

When there is a large dataset one needs to run it parallelly. Compiling VisIt from source is a bit tricky. Luckily they provide binaries for Ubuntu and RHEL.

Downloads

They provide sequential VisIt for Ubuntu and parallel VisIt for RHEL. Though the parallel build for RHEL works in Ubuntu as well. It provides mpich along with the binary build.

When we run VisIt parallely, is PATH variable is not set properly it uses the system-wide installed MPI library or one installed by user in some other location. Setting permanently the PATH variable to use VisIt's mpich could break existing mpi-compiled codes.

It can be solved in two ways. The following scripts are made for VisIt-2.10.0. For other versions, replacing the version number should work.

1) create a shell script to export PATH variable only when using VisIT.

visit-source.sh

export PATH=/home/<user>/visit2_10_0.linux-x86_64/bin:/home/<user>/visit2_10_0.linux-x86_64/2.10.0/linux-x86_64/bin:$PATH



and use


source /path/to/visit-source.sh


everytime.


A better solution is given below

2) modify visit script for export this path automatically

goto  /home/<user>/visit2_10_0.linux-x86_64/bin/


gedit visit


step 1: replace line 1 from


#!/bin/sh

to


#!/bin/bash

step 2: add this script after the commented section in the top at around line 30.



##################################################
# http://stackoverflow.com/a/246128
##################################################
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
  DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
  SOURCE="$(readlink "$SOURCE")"
  [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
export PATH=$DIR/../2.10.0/linux-x86_64/bin/:$PATH
##################################################


This should get the work done.



No comments: