Wednesday, June 24, 2015

R 3.2.1 to Byte

R 3.2.1
Version 3.2.1 (2015-06-18) -- "World-Famous Astronaut"
for Mac OS X 10.9 (Mavericks) and higher

This multi-package contains following main components:
- R Framework 3.2.1            - R.app GUI 1.66
- Tcl/Tk 8.6.0 for X11 (optional, needed for the tcltk R package)
- Texinfo 5.2 (optional, needed to build documentation in R packages from sources)

Requirements:
- Mac OS X 10.9 (Mavericks) or higher

Note: By default the installer upgrades previous Mavericks build of R if present. If you want to keep the previous version, use
pkgutil --forget org.r-project.R.mavericks.fw.pkg


The Cocoa GUI called R.app will be installed by default in your Applications folder,  R framework will be installed in /Library/Frameworks, Tcl/Tk and Texinfo will be installed in /usr/local

command line argument in R

http://stackoverflow.com/questions/2151212/how-can-i-read-command-line-parameters-from-an-r-script

Byte-2:R-args hqin$ 
Byte-2:R-args hqin$ cat R-args.R 
options(echo=TRUE) # if you want see commands in output file
args <- commandArgs(trailingOnly = TRUE)
print(args)
# trailingOnly=TRUE means that only your arguments are returned, check:
# print(commandsArgs(trailingOnly=FALSE))

i = as.integer(args[1])
j = as.integer(args[2])
x = seq(i, j)
print(x)



Byte-2:R-args hqin$ R -f R-args.R --args 2 5

R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin10.8.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> options(echo=TRUE) # if you want see commands in output file
> args <- commandArgs(trailingOnly = TRUE)
> print(args)
[1] "2" "5"
> # trailingOnly=TRUE means that only your arguments are returned, check:
> # print(commandsArgs(trailingOnly=FALSE))
> i = as.integer(args[1])
> j = as.integer(args[2])
> x = seq(i, j)
> print(x)

[1] 2 3 4 5

Tuesday, June 23, 2015

ROC curve

http://www.r-bloggers.com/illustrated-guide-to-roc-and-auc/

test github on blacklight (does not seem to work)



hqin2@tg-login1:/brashear/hqin2> mkdir blacklight
hqin2@tg-login1:/brashear/hqin2> cd blacklight/
hqin2@tg-login1:/brashear/hqin2/blacklight> touch blacklight-test.txt
hqin2@tg-login1:/brashear/hqin2/blacklight> git init
Initialized empty Git repository in /brashear/hqin2/blacklight/.git/
hqin2@tg-login1:/brashear/hqin2/blacklight> git add *
hqin2@tg-login1:/brashear/hqin2/blacklight> git commit -m "blacklight first"
[master (root-commit) f6be4d0] blacklight first
 Committer: Hong Qin <hqin2@tg-login1.blacklight.psc.teragrid.org>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

    git config --global user.name "Your Name"
    git config --global user.email you@example.com

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

 1 file changed, 0 insertions(+), 0 deletions(-)

 create mode 100644 blacklight-test.txt


hqin2@tg-login1:/brashear/hqin2/blacklight> git remote add origin https://github.com/hongqin/blacklight.git
hqin2@tg-login1:/brashear/hqin2/blacklight> git push --force origin master 
/* nothing happens after runnign the above lines on blacklight */




20150623Tue, 0624Wed, 0625Thu blacklight ms02 network permutation runs

Plan: Edit files locally, push to github.
          At blacklight, pull from github.

On Byte:
Download zip file from  https://github.com/hongqin/mactower-network-failure-simulation

$ scp mactower-network-failure-simulation-master.zip hqin2@data.psc.xsede.org:./.
... ...
mactower-network-failure-simulation-master.zip                                   7%   56MB   3.5MB/s   03:25 ETA

On blacklight
hqin2@tg-login1:/brashear/hqin2> pwd
/brashear/hqin2
hqin2@tg-login1:/brashear/hqin2> which unzip
/usr/bin/unzip
hqin2@tg-login1:/brashear/hqin2>  unzip /arc/users/hqin2/mactower-network-failure-simulation-master.zip

Archive:  /arc/users/hqin2/mactower-network-failure-simulation-master.zip
... ...

1:55pm. This zip file is not a git repository. So, I try to git clone using the command line at blacklight.  See https://help.github.com/articles/importing-a-git-repository-using-the-command-line/

git clone --bare https://github.com/hongqin/mactower-network-failure-simulation.git 
/*this does not work on blacklight, even though it works on Byte*/

/*try directory for input file through qsub */
hqin2@tg-login1:/brashear/hqin2/mactower-network-failure-simulation-master/ms02GINPPI> ll
-rw-r--r--   1 hqin2 mc48o9p    199 2015-06-23 14:20 R.pbs
-rw-r--r--   1 hqin2 mc48o9p   1193 2015-06-23 14:18 test1.R

hqin2@tg-login1:/brashear/hqin2/mactower-network-failure-simulation-master/ms02GINPPI> cat R.pbs 
#!/bin/bash
#PBS -q batch
#PBS -l ncpus=16
#PBS -l walltime=0:03:00

source /usr/share/modules/init/bash
module load R
cd $PBS_O_WORKDIR

echo hostname

ja
R --slave CMD BATCH test1.R /*not right?*/
ja -chlst

2:27pm
hqin2@tg-login1:/brashear/hqin2/mactower-network-failure-simulation-master/ms02GINPPI> qsub R.pbs 
461387.tg-login1.blacklight.psc.teragrid.org

hqin2@tg-login1:/brashear/hqin2/mactower-network-failure-simulation-master/ms02GINPPI> qstat -u hqin2

tg-login1.blacklight.psc.teragrid.org: 
                                                                    Req'd  Req'd   Elap
Job ID               Username Queue    Jobname    SessID  NDS  TSK  Memory Time  S Time
-------------------- -------- -------- ---------- ------- ---- ---- ------ ----- - -----
461387.tg-login1     hqin2    batch_r  R.pbs          --   --    16    --  00:03 Q   -- 


R2.pbs
#!/bin/bash
#PBS -q batch
#PBS -l ncpus=16
#PBS -l walltime=0:03:00

source /usr/share/modules/init/bash
module load R

cd $SCRATCH
ja
R --slave CMD BATCH ./test1.R
ja -chlst

/*It took about 28 minutes for the job to finish */
hqin2@tg-login1:/brashear/hqin2/mactower-network-failure-simulation-master/ms02GINPPI> ll
total 496
-rw-r--r--   1 hqin2 mc48o9p    176 2015-06-23 14:45 R2.pbs
-rw-------   1 hqin2 mc48o9p      0 2015-06-23 15:02 R2.pbs.e461389
-rw-------   1 hqin2 mc48o9p   5002 2015-06-23 15:03 R2.pbs.o461389
-rw-r--r--   1 hqin2 mc48o9p    195 2015-06-23 14:24 R.pbs
-rw-------   1 hqin2 mc48o9p      0 2015-06-23 15:02 R.pbs.e461387
-rw-------   1 hqin2 mc48o9p   5206 2015-06-23 15:03 R.pbs.o461387
-rw-r--r--   1 hqin2 mc48o9p    160 2015-06-23 18:18 test1.R
-rw-------   1 hqin2 mc48o9p    986 2015-06-23 15:03 test1.Rout


I then use test1.R, test2.R, and test3.R to generate more ms02 network models. 
I need to pass these parameter through command line parameters to R. 

I forgot to change wall time for the two job submssions. 
how to delete a qsub job?

hqin2@tg-login1:/brashear/hqin2/blacklight> qstat -u hqin2

tg-login1.blacklight.psc.teragrid.org: 
                                                                    Req'd  Req'd   Elap
Job ID               Username Queue    Jobname    SessID  NDS  TSK  Memory Time  S Time
-------------------- -------- -------- ---------- ------- ---- ---- ------ ----- - -----
461426.tg-login1     hqin2    batch_r  test1.R        --   --    16    --  00:10 Q   -- 
461427.tg-login1     hqin2    batch_r  test2.pbs      --   --    16    --  00:03 Q   -- 
461435.tg-login1     hqin2    batch_r  test3.pbs      --   --    16    --  01:00 Q   -- 
hqin2@tg-login1:/brashear/hqin2/blacklight> qdel 461426.tg-login1
qdel: illegally formed job identifier: 461426.tg-login1
hqin2@tg-login1:/brashear/hqin2/blacklight> qdel 461426
hqin2@tg-login1:/brashear/hqin2/blacklight> qstat -u hqin2

tg-login1.blacklight.psc.teragrid.org: 
                                                                    Req'd  Req'd   Elap
Job ID               Username Queue    Jobname    SessID  NDS  TSK  Memory Time  S Time
-------------------- -------- -------- ---------- ------- ---- ---- ------ ----- - -----
461427.tg-login1     hqin2    batch_r  test2.pbs      --   --    16    --  00:03 Q   -- 

461435.tg-login1     hqin2    batch_r  test3.pbs      --   --    16    --  01:00 Q   -- 


/*I then changed wall time and resubmit the first 2 jobs */
hqin2@tg-login1:/brashear/hqin2/mactower-network-failure-simulation-master/ms02GINPPI> qstat -u hqin2

tg-login1.blacklight.psc.teragrid.org: 
                                                                    Req'd  Req'd   Elap
Job ID               Username Queue    Jobname    SessID  NDS  TSK  Memory Time  S Time
-------------------- -------- -------- ---------- ------- ---- ---- ------ ----- - -----
461435.tg-login1     hqin2    batch_r  test3.pbs      --   --    16    --  01:00 Q   -- 
461438.tg-login1     hqin2    batch_r  test1.pbs      --   --    16    --  01:00 Q   -- 

461439.tg-login1     hqin2    batch_r  test2.pbs      --   --    16    --  01:00 Q   -- 

There are problems with the write.csv().  Relative directory did not work in qsub.
00:40am, I added explicit path for the outuput file in test2.R.
00:44am qsub test2.pbs

3am. job were run. After 1.5 hours in the queue.
hqin2@tg-login1:/brashear/hqin2> ll
total 32
-rw-------  1 hqin2 mc48o9p   69 2015-06-23 23:15 test1.Rout
-rw-------  1 hqin2 mc48o9p   69 2015-06-24 03:35 test2.Rout

-rw-------  1 hqin2 mc48o9p   69 2015-06-24 03:35 test3.Rout
hqin2@tg-login1:/brashear/hqin2> cat test2.Rout 
Fatal error: cannot open file './test2.R': No such file or directory
/* So, my pbs job submission file has path problems */

4pm. Still no-output files in my intended directory.

/brashear/hqin2/mactower-network-failure-simulation-master/ms02GINPPI

4:36pm
hqin2@tg-login1:/brashear/hqin2/mactower-network-failure-simulation-master/ms02GINPPI> cat test1.pbs
#!/bin/bash
#PBS -q batch
#PBS -l ncpus=16
#PBS -l walltime=0:05:00

source /usr/share/modules/init/bash
module load R

echo hostname

pwd
cd $SCRATCH/mactower-network-failure-simulation-master/ms02GINPPI
pwd

ja
R -f  test1.R > test1.dump.txt
ja -chlst

4:38pm
hqin2@tg-login1:/brashear/hqin2/mactower-network-failure-simulation-master/ms02GINPPI> qsub test1.pbs
461579.tg-login1.blacklight.psc.teragrid.org
hqin2@tg-login1:/brashear/hqin2/mactower-network-failure-simulation-master/ms02GINPPI> qstat -u hqin2

tg-login1.blacklight.psc.teragrid.org: 
                                                                    Req'd  Req'd   Elap
Job ID               Username Queue    Jobname    SessID  NDS  TSK  Memory Time  S Time
-------------------- -------- -------- ---------- ------- ---- ---- ------ ----- - -----

461579.tg-login1     hqin2    batch_r  test1.pbs      --   --    16    --  00:05 Q   --

This worked.
hqin2@tg-login1:/brashear/hqin2/mactower-network-failure-simulation-master/ms02GINPPI> ll -ht
total 532K
drwxr-xr-x 102 hqin2 mc48o9p 4.0K 2015-06-24 17:47 dipgin.ms02.output
-rw-------   1 hqin2 mc48o9p 1.9K 2015-06-24 17:47 test1.dump.txt
-rw-------   1 hqin2 mc48o9p 4.8K 2015-06-24 17:47 test1.pbs.o461579
-rw-------   1 hqin2 mc48o9p   39 2015-06-24 17:47 test1.pbs.e461579
-rw-r--r--   1 hqin2 mc48o9p  255 2015-06-24 16:36 test1.pbs

-rw-r--r--   1 hqin2 mc48o9p  784 2015-06-24 16:31 test1.R

June25, 2015
I wrote a new ms02 script that can take parameters in command line. I scp this script to blacklight.
-rw-r--r--   1 hqin2 mc48o9p 1.9K 2015-06-25 00:39 ms02-2015June24.R

hqin2@tg-login1:/brashear/hqin2/mactower-network-failure-simulation-master/ms02GINPPI> cat ms02.pbs 
#!/bin/bash
#PBS -q batch
#PBS -l ncpus=16
#PBS -l walltime=0:30:00

source /usr/share/modules/init/bash
module load R

echo hostname

pwd
cd $SCRATCH/mactower-network-failure-simulation-master/ms02GINPPI
pwd

ja
R -f ms02-2015June24.R --args 302 500

ja -chlst

00:49am 
hqin2@tg-login1:/brashear/hqin2/mactower-network-failure-simulation-master/ms02GINPPI> qsub ms02.pbs 

461610.tg-login1.blacklight.psc.teragrid.org

hqin2@tg-login1:/brashear/hqin2/mactower-network-failure-simulation-master/ms02GINPPI> qstat -u hqin2

tg-login1.blacklight.psc.teragrid.org: 
                                                                    Req'd  Req'd   Elap
Job ID               Username Queue    Jobname    SessID  NDS  TSK  Memory Time  S Time
-------------------- -------- -------- ---------- ------- ---- ---- ------ ----- - -----
461610.tg-login1     hqin2    batch_r  ms02.pbs    177131  --    16    --  00:30 R   -- 


Total cpus requested from running jobs: 16

I also created two more submission ms02b.pbs and ms02c.pbs.

hqin2@tg-login1:/brashear/hqin2/mactower-network-failure-simulation-master/ms02GINPPI> ll -th 
total 564K
-rw-------   1 hqin2 mc48o9p   94 2015-06-25 03:31 ms02c.pbs.e461613
-rw-------   1 hqin2 mc48o9p   94 2015-06-25 03:31 ms02b.pbs.e461612
drwxr-xr-x 210 hqin2 mc48o9p 4.0K 2015-06-25 03:30 dipgin.ms02.output
-rw-------   1 hqin2 mc48o9p   94 2015-06-25 01:20 ms02.pbs.e461610
-rw-------   1 hqin2 mc48o9p 2.7K 2015-06-25 01:00 ms02c.pbs.o461613
-rw-r--r--   1 hqin2 mc48o9p  263 2015-06-25 01:00 ms02c.pbs
-rw-------   1 hqin2 mc48o9p 2.7K 2015-06-25 01:00 ms02b.pbs.o461612
-rw-r--r--   1 hqin2 mc48o9p  262 2015-06-25 00:59 ms02b.pbs
-rw-------   1 hqin2 mc48o9p 2.7K 2015-06-25 00:49 ms02.pbs.o461610
-rw-r--r--   1 hqin2 mc48o9p  262 2015-06-25 00:47 ms02.pbs
-rw-r--r--   1 hqin2 mc48o9p 1.9K 2015-06-25 00:45 ms02-2015June24.R

It looks like my wall time is too short. 





hqin2@tg-login1:/brashear/hqin2/mactower-network-failure-simulation-master/ms02GINPPI> cat ms02.pbs.e461610
[Previously saved workspace restored]


=>> PBS: job killed: walltime 1865 exceeded limit 1800

My estimations: 
30 minutes is for 15 ms02 models.
150 minutes is for 100 ms02 models  

Based on these estimations, I submitted 8 jobs, with each requesting 4 hours of walltime. 
hqin2@tg-login1:/brashear/hqin2/mactower-network-failure-simulation-master/ms02GINPPI> grep args *pbs
ms02b.pbs:R -f ms02-2015June24.R --args 310 400
ms02c.pbs:R -f ms02-2015June24.R --args 401 500
ms02d.pbs:R -f ms02-2015June24.R --args 501 600
ms02e.pbs:R -f ms02-2015June24.R --args 601 700
ms02f.pbs:R -f ms02-2015June24.R --args 799 800
ms02g.pbs:R -f ms02-2015June24.R --args 800 900
ms02h.pbs:R -f ms02-2015June24.R --args 900 1000

ms02.pbs:R -f ms02-2015June24.R --args 100 200


transfer files to blacklight 20150607 and 20150608

Sunday 20150607

After VPN into Spelman network, at helen.spelman.edu, scp to data.psc.edu using my xsede login works.







At helen scp test.txt hqin2@blacklight.psc.xsede.org:./.








6pm. Somehow, "mv" and "cp" from the login node to $SCRATCH freezes my shell.


================
Monday 20150608

From http://www.psc.edu/index.php/resources-for-users/computing-resources/blacklight
A sample set of commands on your local machine would be
    tar cf sourcedir.tar sourcedir
    scp sourcedir.tar joeuser@data.psc.xsede.org
For 'joeuser' you substitute your PSC userid. You can compress your tarball before you transfer it to speed up your transfer times. Then you could login to blacklight and issue the commands
    cd $SCRATCH
   tar xf /arc/users/joeuser/sourcedir.tar
Again for 'joeuser' you substitute your userid. This will unroll your tar file in your scratch directory.


On my byte laptop without VPN, try scp transfer which will take ~3.5 minutes.
Byte-2:projects hqin$ scp 0.ginppi.tar.gz hqin2@blacklight.psc.xsede.org:./.hqin2@blacklight.psc.xsede.org's password:
0.ginppi.tar.gz                                                                                               100%  386MB   1.9MB/s   03:23

Byte-2:projects hqin$ scp 0.ginppi.tar.gz hqin2@data.psc.edu:./.hqin2@data.psc.edu's password:
0.ginppi.tar.gz                                                                                               100%  386MB   2.1MB/s   03:02



On blacklight, I found data.psc.edu or data.psc.xsede.org is linked to /arc/users/hqin2
hqin2@tg-login1:/brashear/hqin2> ls -lh /arc/users/hqin2total 2.6G
-rw-r--r-- 1 hqin2 mc48o9p 3.6G 2015-06-07 16:50 0.tar
So, this is an entry and exit point for transferring data between my computer and blacklight.

hqin2@tg-login1:~> cd $SCRATCH  (This is probably is a key step)
hqin2@tg-login1:/brashear/hqin2> ls
qin  test.txt
hqin2@tg-login1:/brashear/hqin2> mkdir tmp
hqin2@tg-login1:/brashear/hqin2> cd tmp/
hqin2@tg-login1:/brashear/hqin2/tmp> tar xf /arc/users/hqin2/0.tar

hqin2@tg-login1:/brashear/hqin2/tmp> ll
total 4
drwxr-xr-x 15 hqin2 mc48o9p 4096 2014-07-20 10:39 0.ginppi.reliability.simulation
hqin2@tg-login1:/brashear/hqin2/tmp> du -sh
3.5G    .

 hqin2@tg-login1:/brashear/hqin2> tar xvfz /arc/users/hqin2/0.ginppi.tar.gz

OK, I now know how to transfer files to blacklight.




Sunday, June 14, 2015

neural network in iPython

https://github.com/peterroelants/peterroelants.github.io/blob/master/notebooks/neural_net_implementation/neural_network_implementation_part01.ipynb

Thursday, June 11, 2015

XSEDE educational allocation application


https://portal.xsede.org/group/xup/manage-allocation#duration

https://portal.xsede.org/allocations-overview#writing-startupeducation

https://portal.xsede.org/forums/-/message_boards/message/86274
You can request a time extension for up to 6 months. You will want to login to the XSEDE portal site (portal.xsede.org), if you have not logged into this site the same username and password you used to access the TeraGrid portal will work on the XSEDE portal site. Once logged in go to the "Allocations" tab then to the "Submit Request" tab. There you will see a link to take you to the proposal submission site(POPS) this is the site you submitted your original startup request. Once you are at the POPS site you can then see your grant and have the option to request an extension.

Let us know if you have any questions.

Ken Hackworth
XSEDE Allocations



Sample 1
https://portal.xsede.org/allocations-overview#writing-startupeducation

Requested Resources

TACC Dell PowerEdge C8220 Cluster with Intel Xeon Phi coprocessors (Stampede): 200,000

Abstract

This proposal requests computational time on Stampede to support a course (time frame, university, course name & number). This course introduces molecular simulation techniques to undergraduate and graduate students and will require a computational resource to complete homework and a project. The homework covers a range of topics (specifics given) and the term project will utilize Stampede. Details of the estimate for required resources and benchmarks to be run can be found in the supporting document.
The following was in the supporting document, along with a course syllabus that has been redacted to assure the privacy of the PI. The syllabus included all relevant information including a class schedule, class materials, learning objectives, and faculty information.

Course Description and XSEDE Justification

This request is for my course (time frame, university, course name & number). This is a joint undergraduate and graduate course. Proof that this course exists can be found at the Office of Registrar's webpage: website. This course has an enrollment of 30 total students. My goal is to use Stampede as a tool to teach simulation techniques and procedures to run MPI codes in a cluster environment. The simulation codes used in this course will be (codes specified), which I have extensive experience in using on various architectures including Stampede with our current research allocation, research allocation info. The educational portion of mygrant name proposes further development of this course. My past experience in this course demonstrated that there is a need for a computational cluster, as is discussed below. A draft syllabus for this course is included and more details of the computational needs are listed below.

Homework Assignments

The first half of the course will involve homework that will not utilize XSEDE resources; however, the second half will consist of homework that requires simulation. Estimates below are based on undergraduate students working in two person groups and graduate students working independently. Therefore a total of 20 simulations will be run per assignment problem. All estimates are based on similar benchmarks run on Stampede.
The homework assignments will consist of information on science being studied through simulation. Based on previous benchmarks of this type, these simulations will use approximately 200 SUs (on a single 16-core node), so with 20 assignments this will require 8,000 SUs.
The second class of homework problems will involve a specific simulation package. These will require about 2 days of computation to reach the desired solution using one 16-core node and thus require 750 SUs and total 15,000 SUs.
The third class of homework problems will be specific simulations using the above package. These will require simulations that are run for 3 days on two 16-core machines. This will require 2,400 SUs per run for a total of 48,000 SUs.
The final class of homework problems will be different specific simulations using the above package. This will require the same amount of time as the first class, i.e., 8,000 SUs. Therefore, in total 79,000 SUs will be required to complete the homework assignments.

Term Project

The term project will consist of three groups of undergraduates and graduate students working on a slightly more extensive project. The term project will start mid-April and continue through mid-May. It is difficult to give a precise estimate in the amount of resources required for these term projects, but I expect them to be similar to the second class of homework projects. Thus, each project could require 15,000 to 20,000 SUs. Students will meet with me at least twice during this time period to ensure proper progress in their project and avoid last minute demands to computational resources.


Tuesday, June 9, 2015

github sync errors


"There are both local and remote commits. Please commit all your changes and then sync again."

I tried "pull origin master", then commit everything again in Github. "Sync" finally worked.

R.histry conflicts might partially caused this problem.




summary of ms02 simulation

network.r contains the most recent ms02 simulation function

Sunday, June 7, 2015

qsub learning materials


BYU supercomputing
https://www.youtube.com/watch?v=oM5uIu5YS4c

$ qsub -l nodes=1:ppn=1,pmem=100MB,walltime=5:00,qos=test
#one node, one process, 100MB memory, ... ?

echo hostname $ qsub -l nodes=1:ppn=1,pmem=100MB,walltime=5:00,qos=test

checkjob -v 12345


https://portal.xsede.org/forums/-/message_boards/message/157317
#!/bin/bash
#PBS -A TG-XXXXXXXX
#PBS -l size=192,walltime=01:35:00
cd $PBS_O_WORKDIR
aprun -n 192 ./a.out

Note that you need to enter your own project id after the PBS -A

In the second line, this example is asking for 192 cores and 95 minutes of compute time.

The job then changes to the work directory which already houses your executable which in this example is named a.out.

Finally, this job then launches a.out on 192 cores with the aprun command.

One additional point is that to get this batch file to run, you need to submit it to the queue by using the qsub command:

qsub script.pbs

qsub PBS on blacklight

$ qsub -I
/*this can takes a while for the job to start. Just have to wait it out.*/