https://athena.brynmawr.edu/wiki/api.php?action=feedcontributions&user=Mrice+admin&feedformat=atomAthena Wiki - User contributions [en]2024-03-29T08:04:09ZUser contributionsMediaWiki 1.26.4https://athena.brynmawr.edu/wiki/index.php?title=Using_Gaussian&diff=8Using Gaussian2017-09-11T18:39:26Z<p>Mrice admin: Created page with "==General Information== This page describes how to submit Gaussian Jobs on the computer cluster. Two caveats: # The methods given on the Gaussian, Inc. official website are n..."</p>
<hr />
<div>==General Information==<br />
This page describes how to submit Gaussian Jobs on the computer cluster. <br />
Two caveats:<br />
# The methods given on the Gaussian, Inc. official website are not working on our system. The reason is that the job management system on our cluster is Torque which uses a different syntax from the original PBS system. <br />
# The method given below only supports parallel computing on a single node using the shared memory mechanism. For the parallel computing across different codes, Gaussian uses Linda, for which we did not buy the license, I think, instead of the common Message Parsing Interface (MPI) mechanism. <br />
<br />
==Job Submitting Script==<br />
Under your home directory, create a file with the following content. Let's call it '''q09'''. After the file is created, change its mode to be executable using the command, '''chmod +x g09'''.<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
cat <<EOF >$1.job<br />
#!/bin/csh<br />
#PBS -N $1<br />
#PBS -e $1.err<br />
#PBS -o $1.log<br />
#PBS -l nodes=1:ppn=12<br />
#PBS -l mem=60GB<br />
#PBS -l walltime=30:00<br />
#PBS -W group_list=gaussian<br />
source /usr/local/g09/bsd/gau-unlimit<br />
cd $PWD<br />
g09 <$1.gjf >& $1.out<br />
EOF<br />
<br />
qsub $1.job -q batch<br />
rm $1.job<br />
</pre><br />
In the above script, the following will be carried out in sequential mode.<br />
# Create a qsub job script. Here, the default values use all 12 processors on a single node and 60 GB memory. The wall time limit is set to 30 minutes. You are advised to change '''ppn''', '''walltime''' and '''mem''' values according to your needs but to leave the rest intact. <br />
<br />
#PBS -W group_list=gaussian sets the group under which the job will be run on the batch. If you do not set this, you may not have permission to use files in the gaussian directories<br />
<br />
# qsub submits the job to the system using the "batch" job sequence. You may change this value accordingly. <br />
# The qsub job script is removed. You may also remove *.err and *.log files safely as well since no valuable information is kept there.<br />
==Submit a Gaussian Job==<br />
Now you are ready to submit your jobs to the system as easy as it is used to be. You may use Link0 commands or Default. Route to specify the resource usage. <br />
For example, if your Gaussian input file is called test1.gjf, use the following command to submit the job.<br />
<pre><br />
q09 test1<br />
</pre> <br />
Please note:<br />
# No extension should be given while the input file should have a "gjf" extension. <br />
# '''q09''' should be in your binary search path. If it is not, use the full file name with the path information.<br />
# After the job is finished, you may just remove the *err and *log files.</div>Mrice adminhttps://athena.brynmawr.edu/wiki/index.php?title=Using_Screen&diff=7Using Screen2017-09-11T18:39:04Z<p>Mrice admin: Created page with "# Start a new screen session #* <tt>session</tt> # Start up programs # Detach from it #* <tt>Control+a Control+d</tt> # Exit # Later, log back in # Reattach to the previous sc..."</p>
<hr />
<div># Start a new screen session<br />
#* <tt>session</tt><br />
# Start up programs<br />
# Detach from it<br />
#* <tt>Control+a Control+d</tt><br />
# Exit<br />
# Later, log back in<br />
# Reattach to the previous screen session<br />
#* <tt>session -r</tt></div>Mrice adminhttps://athena.brynmawr.edu/wiki/index.php?title=Setting_up_a_webpage&diff=6Setting up a webpage2017-09-11T18:38:44Z<p>Mrice admin: Created page with " # Create a subdirectory named public_html #* <tt>mkdir public_html</tt> # Change permissions to make it readable #* <tt>chmod +r public_html</tt> # Make your home directory p..."</p>
<hr />
<div><br />
# Create a subdirectory named public_html<br />
#* <tt>mkdir public_html</tt><br />
# Change permissions to make it readable<br />
#* <tt>chmod +r public_html</tt><br />
# Make your home directory permissions executable<br />
#* <tt>chmod +x .</tt><br />
# Put data in an index.html file<br />
#* cd public_html<br />
#* emacs index.html<br />
# Visit the page at http://athena.brynmawr.edu/~yourid</div>Mrice adminhttps://athena.brynmawr.edu/wiki/index.php?title=Tutorial_on_using_Python_and_MPI&diff=5Tutorial on using Python and MPI2017-09-11T18:37:53Z<p>Mrice admin: Created page with "= Hello MPI in Python = This tutorial will demonstrate how to use [http://athena.brynmawr.edu Bryn Mawr College's Athena Cluster] with Python and MPI, the Message Passing Int..."</p>
<hr />
<div>= Hello MPI in Python =<br />
<br />
This tutorial will demonstrate how to use [http://athena.brynmawr.edu Bryn Mawr College's Athena Cluster] with Python and MPI, the Message Passing Interface.<br />
<br />
Here are the steps, briefly, for running a MPI Python Script on Athena<br />
<br />
# log into athena.brynmawr.edu<br />
# find out which /data path you have a shared directory (either /data1, or /data2) <br />
#* You should now have access to a $DATA variable<br />
#* echo $DATA<br />
# create a python program in your /dataN/userid/ directory<br />
# create a PBS script<br />
# submit the PBS script<br />
# check on status<br />
# see the results<br />
<br />
We will now go through each step in detail.<br />
<br />
== Step 1: Log into Athena ==<br />
<br />
If you do not have an Athena account, please email ... to request one. It can take up to one business day. <br />
<br />
After you have your account, you can log into the account from anywhere. You can use ssh on Linux and Mac, or putty on Windows.<br />
<br />
You can use the X-forwarding flag, -X, if you have X running:<br />
<br />
<pre><br />
ssh -X dblank@athena.brynmawr.edu<br />
</pre><br />
<br />
Using X-forwarding will allow you to use graphical programs, such as gedit.<br />
<br />
== Step 2: Where is my /data? ==<br />
<br />
Next, you need to find out where your /data directory (either /data1 or /data2) has been located. <br />
<br />
You should now have access to a $DATA variable:<br />
<br />
<pre><br />
echo $DATA<br />
</pre><br />
<br />
Another way to find your data directory is to list the files in the directories:<br />
<br />
<pre><br />
[dblank@powerwulf ~]$ ls /data1<br />
dblank gdavis n001.cluster.com n004.cluster.com pbrodfue<br />
dmtpc josh n002.cluster.com n005.cluster.com powerwulf.brynmawr.edu<br />
emaccorma mrice n003.cluster.com n006.cluster.com xwang<br />
[dblank@powerwulf ~]$ ls /data2<br />
dblank gdavis n001.cluster.com n004.cluster.com pbrodfue<br />
emaccorma josh n002.cluster.com n005.cluster.com powerwulf.brynmawr.edu<br />
galaxy mrice n003.cluster.com n006.cluster.com xwang<br />
[dblank@powerwulf ~]$ <br />
</pre><br />
<br />
== Step 3: Create a Python script ==<br />
<br />
Next, you will want to create a Python script in your /data directory.<br />
<br />
First, change to your directory:<br />
<br />
<pre><br />
cd /data1/dblank<br />
</pre><br />
<br />
Next, use a text editor (emacs, vi, gedit, or nano) to create a file in your /data directory. We use the /data directory because it is available to all of the nodes.<br />
<br />
Here is a sample program: <br />
<br />
<pre><br />
# More tutorials available at:<br />
# http://mpi4py.scipy.org/docs/usrman/tutorial.html<br />
<br />
from mpi4py import MPI<br />
import platform<br />
<br />
comm = MPI.COMM_WORLD<br />
rank = comm.Get_rank()<br />
size = comm.Get_size()<br />
machine = platform.node()<br />
<br />
print("Hello MPI from %s %d of %d" % (machine, rank, size))<br />
</pre><br />
<br />
Save the script to a file, such as: /data1/dblank/hellompi.py<br />
<br />
rank and size are two useful values from MPI. See http://mpi4py.scipy.org/docs/usrman/tutorial.html for more examples.<br />
<br />
== Step 4: Submit PBS script ==<br />
<br />
To submit a Python script, you will need a shell program to give to qsub. Here is a sample:<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
#PBS -q default<br />
#PBS -l nodes=6:ppn=12<br />
<br />
mpiexec -machinefile /opt/machinelist -n 10 python /data1/dblank/hellompi.py<br />
<br />
echo "end"<br />
</pre><br />
<br />
Save this in a file, such as /home/dblank/pbs/hellompi.sh.<br />
<br />
PBS is a language that allows you to set many aspects of your running program. For more details see ...<br />
<br />
In this example, we tell mpiexec to choose from the machines listed in /opt/machinelist (all of the nodes) and to create 10 instances of our running code across those machines.<br />
<br />
NOTE: the program will start in your home directory, so by default you will be in /home/dblank/. Use full pathnames to /data1/ for shared data.<br />
<br />
Finally you will submit this script to qsum, like so:<br />
<br />
<pre><br />
qsub hellompi.sh<br />
</pre><br />
<br />
NOTE: the results of qsub will appear here. Therefore, you may want to move your shell script to a folder before beginning.<br />
<br />
== Step 5: Check status ==<br />
<br />
When you start your program a number of things will happen:<br />
<br />
# your program will be scheduled to run<br />
# when qsub runs your script, the script be submitted to each of the machines, perhaps a number of times<br />
<br />
You can run "qstat -a" to see the status of your program.<br />
<br />
== Step 6: Get Results ==<br />
<br />
Finally, any output from your program will be saved in a file with the same name as your shell script, with a dot, the letter "o", and job number appended.<br />
<br />
<pre><br />
Hello MPI from n002.cluster.com 1 of 10<br />
Hello MPI from n002.cluster.com 7 of 10<br />
Hello MPI from n001.cluster.com 6 of 10<br />
Hello MPI from n001.cluster.com 0 of 10<br />
Hello MPI from n004.cluster.com 3 of 10<br />
Hello MPI from n004.cluster.com 9 of 10<br />
Hello MPI from n003.cluster.com 2 of 10<br />
Hello MPI from n003.cluster.com 8 of 10<br />
Hello MPI from n006.cluster.com 5 of 10<br />
Hello MPI from n005.cluster.com 4 of 10<br />
end<br />
</pre><br />
<br />
== Step 7: Where to go from here? ==<br />
<br />
* http://mpi4py.scipy.org/docs/usrman/tutorial.html<br />
* http://pympi.sourceforge.net/examples.html - slightly different from MPI4PY, but still Python and MPI ideas.<br />
* https://github.com/jbornschein/mpi4py-examples</div>Mrice adminhttps://athena.brynmawr.edu/wiki/index.php?title=Using_PBS&diff=4Using PBS2017-09-11T18:37:09Z<p>Mrice admin: Created page with "== Submit PBS script == To submit a script, you will need a shell program to give to qsub. Here is a sample: <pre> #!/bin/bash #PBS -q default DAY=`date +"%a %B %d, %Y..."</p>
<hr />
<div>== Submit PBS script ==<br />
<br />
To submit a script, you will need a shell program to give to qsub. Here is a sample:<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
#PBS -q default<br />
<br />
DAY=`date +"%a %B %d, %Y"`<br />
TIME=`date +"%r %Z"`<br />
<br />
echo "Hello from `hostname` on $DAY at $TIME"<br />
</pre><br />
<br />
Save this in a file, such as hello.sh.<br />
<br />
The script can then be submitted to the grid with qsub.<br />
<br />
<pre><br />
qsub hello.sh<br />
</pre><br />
<br />
If your jobs is submitted successfully, qsub will print the the name of the job:<br />
<pre><br />
1234.clusterhn.cluster.com<br />
</pre><br />
<br />
When the jobs runs, two output files will be created: hello.sh.o1234 and hello.sh.e1234 (where 1234 will be the job id number). These correspond to the standard output and standard error pipes from your program. For the script above, hello.sh.e1234 should be empty (no errors), and hello.sh.o1234 will contain a line something like: <br />
<br />
<pre><br />
Hello from n002.cluster.com on Tue May 13, 2014 at 11:44:05 AM EDT<br />
</pre><br />
<br />
<br />
<br />
A somewhat more complicated example, using MPI appears below:<br />
<pre><br />
#!/bin/bash<br />
<br />
#PBS -q default<br />
#PBS -l nodes=2:ppn=12<br />
<br />
mpiexec -machinefile /opt/machinelist -n 10 PROGRAM ARGUMENTS<br />
<br />
echo "end"<br />
</pre><br />
<br />
Replace the PROGRAM and ARGUMENTS with your own Unix program and command-line arguments.<br />
<br />
Save this in a file, such as /home/dblank/pbs/hellompi.sh.<br />
<br />
PBS is a language that allows you to set many aspects of your running program. For more details see ...<br />
<br />
In this example, we tell mpiexec to choose from the machines listed in /opt/machinelist (all of the nodes) and to create 2 instances of our running code across those machines.<br />
<br />
NOTE: the program will start in your home directory, so by default you will be in /home/dblank/. Use full pathnames to /data1/ for shared data.<br />
<br />
<br />
NOTE: the results of qsub will appear here. Therefore, you may want to move your shell script to a folder before beginning.<br />
<br />
Another example:<br />
<br />
<pre><br />
#!/bin/bash<br />
<br />
#PBS -l walltime=00:1:00<br />
#PBS -l nice=19<br />
#PBS -q default<br />
#PBS -l nodes=1:ppn=12<br />
#PBS -t 0-14<br />
<br />
hostname<br />
<br />
x=$PBS_ARRAYID<br />
echo $x squared is $(($x * $x))<br />
echo The square root of $x is $(echo "sqrt ( $x )" | bc -l)<br />
<br />
echo "end"<br />
</pre><br />
<br />
== Check status ==<br />
<br />
When PBS starts your program a number of things will happen:<br />
<br />
# your program will be scheduled to run<br />
# when qsub runs your script, the script be submitted to each of the machines, perhaps a number of times<br />
<br />
You can run "qstat -a" to see the status of your program.<br />
<br />
== Other Q Commands ==<br />
<br />
* qdel<br />
* qalter<br />
* qholde<br />
* qrls</div>Mrice adminhttps://athena.brynmawr.edu/wiki/index.php?title=Using_Jupyter&diff=3Using Jupyter2017-09-11T18:36:21Z<p>Mrice admin: Created page with "* https://athena.brynmawr.edu/jupyter/hub/dblank/public/Jupyter%20Help.ipynb * https://athena.brynmawr.edu/jupyter/hub/dblank/public/Jupyter%20Notebook%20Users%20Manual.ipynb"</p>
<hr />
<div>* https://athena.brynmawr.edu/jupyter/hub/dblank/public/Jupyter%20Help.ipynb<br />
* https://athena.brynmawr.edu/jupyter/hub/dblank/public/Jupyter%20Notebook%20Users%20Manual.ipynb</div>Mrice adminhttps://athena.brynmawr.edu/wiki/index.php?title=Main_Page&diff=2Main Page2017-09-11T18:33:09Z<p>Mrice admin: </p>
<hr />
<div>'''Athena at Bryn Mawr College'''<br />
<br />
This site hosts information for using Bryn Mawr College's [http://athena.brynmawr.edu/ Athena Supercomputer].<br />
<br />
== Athena Tools ==<br />
<br />
* [[Using Jupyter]] - Jupyter is the system for running code over the web<br />
* [[Using PBS]] - PBS is the system for submitting jobs to Athena<br />
* [[Tutorial on using Python and MPI]] - Python is an easy to use scripting language, and MPI is a library for writing parallel programs<br />
* [[Setting up a webpage]] - you can display information from your programs on your webpage<br />
* [[Using Screen]] - "screen" is a way to create a session that you can reconnect to later<br />
* [[Using Gaussian]] - How to submit Gaussian jobs using Torque <br />
* [http://www.clusterresources.com/torquedocs21/ Torque Documentation] - information on using the submission system<br />
* [//meta.wikimedia.org/wiki/Help:Contents Wiki User's Guide] - please help to make this documentation better by editing this wiki</div>Mrice admin