Airavata Usecases from SEAGrid Applications and Workflows Sudhakar Pamidighantam 4 Oct 2015.

Slides:



Advertisements
Similar presentations
Illinois Campus Cluster Program User Forum April 24, 2012 NCSA Room :00 AM - 11:00 AM.
Advertisements

MIMOS Berhad. All Rights Reserved. Nazarudin Wijee Mohd Sidek Salleh Grid Computing Lab MIMOS Berhad Blender Job Submission in P-GRADE.
ISG We build general capability Job Submission on the Olympus Cluster J. DePasse; S. Brown, PhD; T. Maiden Pittsburgh Supercomputing Center Public Health.
CS 497C – Introduction to UNIX Lecture 34: - Shell Programming Chin-Chih Chang
Introduction to Unix – CS 21 Lecture 13. Lecture Overview Finding files and programs which whereis find xargs Putting it all together for some complex.
Submit Host Setup (user) Tc.data file Pool.config file Properties file Vdl-gen file Input file Exitcode checking script.
Introduction to Linux and Shell Scripting Jacob Chan.
Understanding the Basics of Computational Informatics Summer School, Hungary, Szeged Methos L. Müller.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
7/17/2009 rwjBROOKDALE COMMUNITY COLLEGE1 Unix Comp-145 C HAPTER 2.
ISG We build general capability Purpose After this tutorial, you should: Be comfortable submitting work to the batch queuing system of olympus and be familiar.
Introduction to UNIX/Linux Exercises Dan Stanzione.
Christian Kocks April 3, 2012 High-Performance Computing Cluster in Aachen.
Sponsored by the National Science Foundation Configuration Management For Experimenters: Ansible Hands-On Sarah Edwards, GPO.
VIPBG LINUX CLUSTER By Helen Wang March 29th, 2013.
Bigben Pittsburgh Supercomputing Center J. Ray Scott
Sharif University of technology, Parallel Processing course, MPI & ADA Server Introduction By Shervin Daneshpajouh.
UNIX Shell Script (1) Dr. Tran, Van Hoai Faculty of Computer Science and Engineering HCMC Uni. of Technology
UNIX Commands. Why UNIX Commands Are Noninteractive Command may take input from the output of another command (filters). May be scheduled to run at specific.
1 System Administration Introduction to Scripting, Perl Session 3 – Sat 10 Nov 2007 References:  chapter 1, The Unix Programming Environment, Kernighan.
Agenda Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Review next lab assignments Break Out Problems.
1 Operating Systems Lecture 2 UNIX and Shell Scripts.
HPC for Statistics Grad Students. A Cluster Not just a bunch of computers Linked CPUs managed by queuing software – Cluster – Node – CPU.
L&T Infotech1 UNIX – Getting Started - Aneesh Ramani.
Lecture 24CS311 – Operating Systems 1 1 CS311 – Lecture 24 Outline Final Exam Study Guide Note: These lecture notes are not intended replace your notes.
40 Years and Still Rocking the Terminal!
CS252: Systems Programming Ninghui Li Slides by Prof. Gustavo Rodriguez-Rivera Topic 7: Unix Tools and Shell Scripts.
The Gateway Computational Web Portal Marlon Pierce Indiana University March 15, 2002.
Advanced topics Cluster Training Center for Simulation and Modeling September 4, 2015.
Getting Started: XSEDE Comet Shahzeb Siddiqui - Software Systems Engineer Office: 222A Computer Building Institute of CyberScience May.
Parallel MATLAB jobs on Biowulf Dave Godlove, NIH February 17, 2016 While waiting for the class to begin, log onto Helix.
Modules, Compiling WRF, and Running on CHPC Clusters Adam Varble WRF Users Meeting 10/26/15.
Debugging Lab Antonio Gómez-Iglesias Texas Advanced Computing Center.
NUMA Control for Hybrid Applications Kent Milfeld TACC May 5, 2015.
Scaling up R computation with high performance computing resources.
NREL is a national laboratory of the U.S. Department of Energy, Office of Energy Efficiency and Renewable Energy, operated by the Alliance for Sustainable.
CLS 集群 2015 年. 登录 teachcqb ssh /6 testpkuhpc 命令行登录 下载:
Introduction to Scripting Workshop February 23, 2016.
INTRODUCTION TO SHELL SCRIPTING By Byamukama Frank
Setting up visualization. Make output folder for visualization files Log into vieques $ ssh
INTRODUCTION TO XSEDE. INTRODUCTION  Extreme Science and Engineering Discovery Environment (XSEDE)  “most advanced, powerful, and robust collection.
Advanced Computing Facility Introduction
Hackinars in Bioinformatics
Hands on training session for core skills
GRID COMPUTING.
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
PARADOX Cluster job management
Unix Scripts and PBS on BioU
HPC usage and software packages
Using Unix Shell Scripts to Manage Large Data
Prepared by: Eng. Maryam Adel Abdel-Hady
Linux 101 Training Module Linux Basics.
Part 1: Basic Commands/Utilities
INTRODUCTION TO UNIX: The Shell Command Interface
Tutorial of Unix Command & shell scriptS 5027
Introduction to UNIX.
Tutorial of Unix Command & shell scriptS 5027
What is Bash Shell Scripting?
LING 408/508: Computational Techniques for Linguists
College of Engineering
CCR Advanced Seminar: Running CPLEX Computations on the ISE Cluster
Tutorial of Unix Command & shell scriptS 5027
UNIX Reference Sheets CSE 2031 Fall 2010.
High Performance Computing in Bioinformatics
Parallel computation with R & Python on TACC HPC server
gLite Job Management Christos Theodosiou
Working in The IITJ HPC System
Maxwell Compute Cluster
Presentation transcript:

Airavata Usecases from SEAGrid Applications and Workflows Sudhakar Pamidighantam 4 Oct 2015

Some SEAGrid Supported Workflows Multiple jobs – Highthrough-put Application specific Post-processing on monitor prompt Lammps-DS Workflows Paramchem Workflows Nek5000 Workflows QuantmEspresso Workflows

Script Based high-throughput Job Creation

Monitoring QM Optimization/Frequency run

Workflow and Visualization For large memory calculations a workflow is required to use the appropriate XSEDE resource o TACC Stampede: Atomistic simulation of alumina o SDSC Gordon: Calculation of diffraction intensities + Visualization Workflow implemented through SEAGrid Science gateway o Supports a private “DS” LAMMPS build o Supports single jobID handle for multiresource job submission o Supports the development of a XML script for high throughput job submission o Compatible with parallel VisIt executions so that diffraction pattern generation is automated Workflow to run on TACC resources only

Lammps-DS Workflow Steps Lammps MD Check for successful creation of dump files Diffraction Compute Vis input setup Execute Visit (local) (if all nodes can be used) Execute Visit-Diffraction Compute –on Gordon from stampede Execute Visit – as a separate job on Vis queue on stampede

Variables for programs in the workflow # Step 1 - Variables for running LAMMPS MD PWD=`pwd` export MPI1=`echo "$Nodes*16" | bc ` # Step 2 - Variables for running LAMMPS diffraction export Diffraction_Base=DiffFromDumpLoop.in export Find_Suffix1=dump export Input=tmp_Input export OpenMP=16 export MPI2=$Nodes export MIC=240 # Step 3 - Variables for running VisIt export MPI3=`echo "$Nodes*16" | bc ` export Find_Suffix2=vtk # MVM: changed this # MVM: render.py is a link to the most recent version export Vis_Script="/home1/00421/ccguser/apps/ds_lammps/bin/render.py" # MVM: changed this # MVM: these are here because of CCG's file upload limits export Vis_Session="/home1/00421/ccguser/apps/ds_lammps/data/*session" # Step 1- LAMMPS MD simulation # Step 2- Create unique LAMMPS jobs that run diffraction on each *.dump file # Step 3- Multiple VisIt sessions creating images from *vtk files

Lammps MD Step # Step 1 LAMMPS MD echo "ibrun ~/apps/ds_lammps/bin/lmp_stampede ${job}.out" >> $qsubin # if no dump files were created by lmp_stampede, # then skip trying to submit a vis job # on Gordon (or Stampede) /bin/cat >> $qsubin << EOF Ndumps=\`find. -type f -name \*dump | wc -l\` if [ \$Ndumps -eq "0" ] then echo "No dump files were generated, skipping vis job." ; else echo "dump files generated, creating vis job." fi ### New loopdiffraction.sh with MIC outputs

Lammps Diffraction Step # Step 2 LAMMPS Diffraction Copute Ndumps=\`ls -l *$Find_Suffix1 |wc -l\` if [ \$Ndumps -eq "0" ]; then ; echo " No dump files found in $PWD ”; exit; fi n=0 for i in *.$Find_Suffix1 do D=\`echo \${i}\`; P=\`echo \${i%.$Find_Suffix1}\` tmp=\`echo \${i%.$Find_Suffix1} | sed 's#^.*/##' | rev\` N=\`echo "\${tmp%_*}" | rev\`; sed 's/XXXXX/'\$N'/g' $Diffraction_Base > $Input.\$n sed -i 's/DUMPFILE/'\$D'/g' $Input.\$n; sed -i 's/PREFIX/'\$P'/g' $Input.\$n n=\$((\$n+1)) done # Setting up environment variables export SLURM_NNODES=$MPI2; export SLURM_TACC_NODES=$MPI2; export SLURM_NTASKS=$MPI2; export SLURM_TASKS_PER_NODE='1(x$MPI2)' export SLURM_NPROCS=$MPI2; export SLURM_JOB_CPUS_PER_NODE='16(x$MPI2)’; export SLURM_JOB_NUM_NODES=$MPI2 export SLURM_TACC_CORES=$MPI2; export SLURM_TACC_NNODES_SET=1; export OMP_NUM_THREADS=$OpenMP export MIC_OMP_NUM_THREADS=$MIC; export LAMMPS=/home1/00421/ccguser/apps/ds_lammps/bin/lmp_stampede # Run LAMMPS Jobs for i in \$(seq 0 \$n) do #ibrun tacc_affinity \$LAMMPS $PWD/$Input.\$i.out ibrun tacc_affinity \$LAMMPS $Input.\$i.out done

Step 3 Visit setup # Step 3 (On vis queue) # Run multiple VisIt sessions for each *.vtk #module load visit/2.7 # We will use visit from ccguser export visit=/work/00421/ccguser/VisIt/visit2.7.2/src/bin/visit Nvtk=\`ls -l *$Find_Suffix2 |wc -l\` if [ \$Nvtk -eq "0" ]; then echo " No vtk files found in $PWD " exit fi Nmin=\`echo \$((\$Nvtk<$MPI3?\$Nvtk:$MPI3))\` for i in \$(seq 1 \$Nmin ) do mkdir tmp.\$i cp $Vis_Script $Vis_Session tmp.\$i/ done n=1 for i in *.vtk do cp \${i} tmp.\$n/ n=\$((\$n+1)) if [ \$n -gt \$Nmin ]; then n=1 fi done

Visit execution and file management for i in \$(seq 1 \$Nmin ) do #cd $PWD/tmp.\$i cd tmp.\$i ibrun -o \$i -n 1 \$visit -cli -nowin -quiet -s $Vis_Script & cd.. done #cd $PWD/ jobs -p > JOB for i in \$(seq 1 \$Nmin ) do fg \`sed "\$i!d" JOB \` done wait #mv -f $PWD/tmp.*/*png $PWD/ mv -f tmp.*/*png. #rm -rf $PWD/tmp.* $PWD/JOB $PWD/$Input.* rename.0.vtk.. *png rename.session *png #### End of new loopDiffraction EOF # Create the Vis specific files here qsubin_vis="$TEMPDIR1/qsubin$$_vis" test -f "$qsubin_vis" && /bin/rm $qsubin_vis touch $qsubin_vis chmod 700 $qsubin_vis qsubin_uberftp_vis1=qsubin$$_uberftp_vis1 qsubin_uberftp_vis1="$TEMPDIR1/$qsubin_uberftp_vis1" test -f "$qsubin_uberftp_vis1" && /bin/rm $qsubin_uberftp_vis1 touch $qsubin_uberftp_vis1 chmod 700 $qsubin_uberftp_vis1

Dependent Vis batch job #echo "MVM: vis batch is being created based on $jobid" >> $qsubin # MVM - create the qsubin_vis script # MVM this is the Stampede vis job VIS_BATCH="#!/bin/bash #SBATCH -J ${job} #SBATCH -p vis #SBATCH -o ${job}.o%j #SBATCH -N 1 #SBATCH -n 1 #SBATCH -t 00:05:00 #SBATCH --mail-user=$ _addresses #SBATCH --mail-type=ALL #SBATCH -A TG-CHE080068N" eval "echo \"$VIS_BATCH\" " >> $qsubin_vis echo "set -x" >> $qsubin_vis echo "echo \"copying render.py to pwd\" " >> $qsubin_vis echo "jobdir=\"$job.$clustername.$jobid.$date_YYMMDD\" " >> $qsubin_vis echo "export OutDir=/home1/00421/$USER/scratch/$GridchemUserid/$ResearchProject/\$jobdir" >> $qsubin_vis echo "# SCRATCH_BATCH=\"/home/00421/$USER/$OutDir\" " >> $qsubin_vis echo "#cd \$SCRATCH_BATCH" >> $qsubin_vis echo "cd \$OutDir" >> $qsubin_vis echo "cp /home1/00421/ccguser/apps/ds_lammps/bin/render.py." >> $qsubin_vis echo "echo \"loading visit module\" " >> $qsubin_vis echo "module load visit" >> $qsubin_vis echo "echo \"timing visit run\" " >> $qsubin_vis echo "time visit -cli -nowin -quiet -s render.py >> ${job}.out 2>&1" >> $qsubin_vis echo "cp * \$OutDir " >> $qsubin_vis echo ". $qsubin_uberftp_vis1" >> $qsubin_vis echo "exit" >> $qsubin_vis # MVM - submit the qsubin_vis script # eval "$qsub --dependency=afterok:$jobid $qsubin_vis"

Gordon Offloading for Vis Compute # MVM: Commenting this section out as we're returning to # doing both compute and vis on stampede. # qsubin_uberftp_gordon_vis=qsubin$$_uberftp_gordon_vis # qsubin_uberftp_gordon_vis="$TEMPDIR1/$qsubin_uberftp_gordon_vis" # test -f "$qsubin_uberftp_gordon_vis" && /bin/rm $qsubin_uberftp_gordon_vis # touch $qsubin_uberftp_gordon_vis # chmod 700 $qsubin_uberftp_gordon_vis # ssh_gordon_sh=ssh$$_gordon_sh # ssh_gordon_sh="$TEMPDIR1/$ssh_gordon_sh" # test -f "$ssh_gordon_sh" && /bin/rm $ssh_gordon_sh # touch $ssh_gordon_sh # chmod 700 $ssh_gordon_sh #TODO - create gordon cleanup script here. # START of script that ssh on login1.stampede will use to copy files to Gordon # echo "#!/bin/bash" >> $ssh_gordon_sh # echo "set +x" >> $ssh_gordon_sh # echo "module load GLOBUS-5.0" >> $ssh_gordon_sh # # mvm: note to self, this confuses me, $X509_USER_PROXY exists, but I still have to # # export it? # echo "echo X509_USER_PROXY: $X509_USER_PROXY" >> $ssh_gordon_sh # echo "export X509_USER_PROXY=$X509_USER_PROXY" >> $ssh_gordon_sh # echo "grid-proxy-info" >> $ssh_gordon_sh # echo "gsissh gordon.sdsc.edu mkdir $GridchemUserid/$ResearchProject/\$jobdir" >> $ssh_gordon_sh # # echo "cd \$OutDir" >> $ssh_gordon_sh # echo "for f in *" >> $ssh_gordon_sh # echo "do" >> $ssh_gordon_sh # echo " gsiscp \$f gordon.sdsc.edu:$GridchemUserid/$ResearchProject/\$jobdir" >> $ssh_gordon_sh # echo "done" >> $ssh_gordon_sh # # # LoopDiffraction_normal.sh creates the PBS job script, SubmitScript, only; it still has to be submitted. # echo "gsissh gordon.sdsc.edu <<EOF # cp apps/ds_lammps_hybrid/bin/LoopDiffraction_normal.sh $GridchemUserid/$ResearchProject/\$jobdir # cd $GridchemUserid/$ResearchProject/\$jobdir ## # sed -i \"s%^EOF%gsiscp./images.tar.gz $mss_machine:mss/$topdir_name/$GridchemUserid/$ResearchProject/\$jobdir\nEOF%\"./LoopDiffraction_normal.sh # sed -i \"s%^EOF%gsiscp./*.xrd $mss_machine:mss/$topdir_name/$GridchemUserid/$ResearchProject/\$jobdir\nEOF%\"./LoopDiffraction_normal.sh # sed -i \"s%^EOF%gsiscp./*.vtk $mss_machine:mss/$topdir_name/$GridchemUserid/$ResearchProject/\$jobdir\nEOF%\"./LoopDiffraction_normal.sh # #./LoopDiffraction_normal.sh

Gordon job submission # qsub SubmitScript #EOF" >> $ssh_gordon_sh # #echo "gsiscp $qsubin_uberftp_gordon_vis gordon.sdsc.edu:$GridchemUserid/$ResearchProject" >> $ssh_gordon_sh # # END of scrpt # This starts the process of connecting to Gordon # Define $jobdir with current information in the script before running # /bin/cat >> $qsubin << EOF # export jobdir=\$jobdir # export OutDir=\$OutDir # sed -i "s/export/export jobdir=\$jobdir \nexport/" $ssh_gordon_sh # sed -i "s%export%export OutDir=\$OutDir \nexport%" $ssh_gordon_sh # ssh login1.stampede.tacc.utexas.edu $ssh_gordon_sh > ssh_gordon.out 2>&1 #fi #end of Ndump conditional #EOF fi # closes check for gordon clustername fi # closes check for $PROGRAM_TO_RUN

Workflow Monitor and Validation of the dihedral parameters "lsfitpar" program for robust fitting of bonded parameters:

Nek5000 Based Vortex Shedding Workflow Arne Pearlstein UIUC Workflow Contains multiple steps 1.Multiple File staging 2.Extraction of base name and creating additional inputs 3.Prepare mapfile - prepare genmap input 4. Run genmap 5. Compile nek5000 with user subroutines and parameters 6. Run nek5000 for production 7. Prepare Visit inputs and Environment 8. Run Visit for individual images 9. Run ffmpeg for making a movie

Running Nek5000 workflow Steps 1-4 Basename=${Diskinputfile%.*} #Get basename (remove extension) echo "export Basename=${Diskinputfile%.*}" >> $qsubin echo "cp -p $Diskinputdir/$Basename.*." >> $qsubin echo "cp -p $Diskinputdir/*.usr." >> $qsubin echo "cp -p $Diskinputdir/SIZE." >> $qsubin echo "echo $Basename >./SESSION.NAME" >> $qsubin echo "echo \`pwd\`'/' >>./SESSION.NAME" >> $qsubin #Prepare mapfile #prepare genmap input echo "$Basename" > genmap.in echo "0.2" >> genmap.in #Run genmap /home/gridchem/bin/genmap < genmap.in

Running nek5000 workflow Steps 5-9 # compile nek5000 cp -r /home/gridchem/apps/nek5000/nek5/trunk/nek/makenek. chmod 755 makenek./makenek $Basename #Run nek mpirun -np 24./nek5000 $Basename > session.log sleep 2 ln $Basename.log logfile ln $Basename.log $Basename.out /home/gridchem/apps/nek5000/nek5/trunk/tools/scripts/visnek # MVM VisIt for Nek5000 module unload mvapich2_ib module unload intel Module load gnu openmpi_ib li export NODE_MEMORY=`free -k | grep ^Mem: | awk '{ print $2; }'` NODE_MEMORY_LIMIT=\`echo 0.95*\$NODE_MEMORY / 1 | bc\` ulimit -v \$NODE_MEMORY_LIMIT -m \$NODE_MEMORY_LIMIT # launch visit to run our script render.py as batch process /opt/visit/bin/visit -nowin -cli -s /home/gridchem/render.py #Set ffmpeg environments and run to create the movie export LD_LIBRARY_PATH=/home/gridchem/apps/ffmpeg/2.7.2/lib:\$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/home/gridchem/apps/x264/ /lib:\$LD_LIBRARY_PATH /home/gridchem/apps/ffmpeg/2.7.2/bin/ffmpeg -r 30 -f image2 -s 1280x720 -i "$Basename"_%04d.png -vcodec libx264 -qp 0 $Basename.mp4

QuantumEspresso Workflows Multiple modules in QuantumEspresso Extract prefix (basename) from input If job is a continuation of previous run get the previous JobID Run pw scf run (pw.x) Run non scf single point run Run Bands Run 3d plot of wavefunctions for Xcrysden

QuantumEspresso environments module load qe export SCRATCH=\$SCRATCH_BATCH export PSEUDO_DIR=/home/gridchem/apps/QEspresso/ upf_files export TMP_DIR=\$SCRATCH export PW_EXE=\$QEHOME/bin/pw.x export PP_EXE=\$QEHOME/bin/pp.x export BANDS_EXE=\$QEHOME/bin/bands.x export PL_BAND_EXE=\$QEHOME/bin/plotband.x export QE_PREFIX=`grep -i prefix $Diskinputfile | awk -F= '{print $2}'| sed "s/'//g;s/ //g;s/^M//g"`

Slurm node setup #Generate a hostfile from the slurm node list export SLURM_NODEFILE=\`generate_pbs_nodefile\` #Find the unique hosts and copy data to the local scratch #Check copytoscratch.sh file and change source location if needed cat \$SLURM_NODEFILE > nodes.list uniq nodes.list > nodes.unq.list export NNODES=\`cat nodes.unq.list |wc -l\` cp ~/bin/copytoscratch.sh. #Change to the scratch directory #mpirun_rsh -export -hostfile./nodes.unq.list -np \$NNODES./copytoscratch.sh #cd /scratch/$USER/$SLURM_JOBID/ESPRESSO

Non SCF and Dependent Bands execution if [ $PROGRAM_TO_RUN = "nscfwb" -o $PROGRAM_TO_RUN = "bandsqe" ]; then export PJobID=`grep -i localjobid $Diskinputfile | awk -F= '{print $2}' | sed "s/^M//"` >> $qsubin /bin/cat >> $qsubin << HERE2 #export PJobID=`grep -i localjobid $Diskinputfile | awk -F= '{print $2}' | sed "s/^M//"` cd /oasis/scratch/comet/gridchem/temp_project/$PJobID cp \$SCRATCH/$Diskinputfile. export OMP_NUM_THREADS=1 HERE2 fi if [ $PROGRAM_TO_RUN != "bandsqe" ]; then mpirun_rsh -hostfile \$SLURM_NODEFILE -np $cpus \$PW_EXE | \$Diskoutputfile_with_dir >> $qsubin fi /bin/cat >> $qsubin << HERE3 if [ -d \$QE_PREFIX.save ]; then #cd out # post-processing for band structure cat > \$QE_PREFIX.bands.in << EOF &bands prefix = '\$QE_PREFIX' outdir = './' filband = '\$QE_PREFIX.bands.dat' / EOF which \$BANDS_EXE mpirun_rsh -hostfile \$SLURM_NODEFILE -np $cpus \$BANDS_EXE | \$QE_PREFIX.bands.out #cd.. else echo "Error in pw scf run. Bands not executed." fi HERE3