Skip to content

Instantly share code, notes, and snippets.

@bmorris3
Last active February 22, 2016 17:53
Show Gist options
  • Save bmorris3/223814e8d9b06a0d0f46 to your computer and use it in GitHub Desktop.
Save bmorris3/223814e8d9b06a0d0f46 to your computer and use it in GitHub Desktop.
Minimal XSEDE starter scripts
universe = vanilla
requirements = (FileSystemDomain != "") && (Memory >= 1) && (Arch == "X86_64")
# has to specify project name to get it run on xsede osg cluster
+ProjectName=TG-AST150046
# executeable path is relative to current dir, not InitialDir
executable = ../git/STSP/stsp_todaysdate
# if there is file argument, it must apply based on the remote gw
arguments = test.in
# input file
transfer_input_files = transit000.txt, test.in
transfer_output_files = test_mcmc.txt, test_lcbest.txt, test_finalparam.txt, tes
t_parambest.txt
# transfer output back
should_transfer_files = YES
when_to_transfer_output = ON_EXIT
# command output and log
output = output/myrun.out
error = output/myrun.err
log = output/myrun.log
notification = never
# this only affects in/out file path root dir
queue
#PLANET PROPERTIES
1 ; Number of planets -- (if there are more than 1 planet, then the set of 8 planet properties are repeated)
2454605.8915400002 ; T0, epoch (middle of first transit) in days.
4.8878023300 ; Planet Period (days)
0.0034300000 ; (Rp/Rs)^2 (Rplanet / Rstar )^ 2
0.0982000000 ; Duration (days) (physical duration of transit, not used)
0.1270000000 ; Impact parameter (0= planet cross over equator)
89.4234790468 ; Inclination angle of orbit (90 deg = planet crosses over equator)
103.0000000000 ; Lambda of orbit (0 deg = orbital axis along z-axis)
0.2610000000 ; ecosw
0.0850000000 ; esinw
#STAR PROPERTIES
1.8063440000 ; Mean Stellar density (Msun/Rsun^3)
29.977266532 ; Stellar Rotation period (days)
4780 ; Stellar Temperature
0.31 ; Stellar metallicity
80 ; Tilt of the rotation axis of the star down from z-axis (degrees)
0.00000 0.86410 0.00000 -0.15021 ; Limb darkening (4 coefficients)
100 ; number of rings for limb darkening appoximation
#SPOT PROPERTIES
2 ; number of spots
1.0 ; fractional lightness of spots (0.0=total dark, 1.0=same as star)
#LIGHT CURVE
transit000.txt ; lightcurve input data file
2454957.7156000002 ; start time to start fitting the light curve
0.19548999983817 ; duration of light curve to fit (days)
1.0000000000 ; real maximum of light curve data (corrected for noise), 0 -> use downfrommax
0 ; is light curve flattened (to zero) outside of transits?
#ACTION
M ; M= unseeded mcmc
74384338 ; random seed
2.5 ; ascale
100 ; number of chains
800 ; mcmc steps
1 ; 0= use downfrommax normalization, 1= calculate brightness factor for every model
2454957.7156 0.999970773582 8.72544e-05
2454957.71628 1.00001500859 8.72773e-05
2454957.71696 0.999975967878 8.72975e-05
2454957.71764 1.00000337692 8.73178e-05
2454957.71833 0.999916420615 8.73333e-05
2454957.71901 1.00018733647 8.73626e-05
2454957.71969 1.00011942681 8.73753e-05
2454957.72037 1.00010062849 8.73907e-05
2454957.72105 1.0000035937 8.74027e-05
2454957.72173 0.999988809698 8.74147e-05
2454957.72241 1.00011563716 8.74312e-05
2454957.72309 1.00009777836 8.74391e-05
2454957.72377 1.00008752116 8.74456e-05
2454957.72446 1.00015532961 8.74518e-05
2454957.72514 1.00012431752 8.74504e-05
2454957.72582 1.00005879938 8.74459e-05
2454957.7265 0.999897620904 8.74339e-05
2454957.72718 0.999994383689 8.74267e-05
2454957.72786 0.999925449119 8.74086e-05
2454957.72854 0.999929626365 8.73896e-05
2454957.72922 0.999763066996 8.73562e-05
2454957.72991 0.999842576767 8.7336e-05
2454957.73059 0.9999746997 8.73065e-05
2454957.73127 0.999993738462 8.72814e-05
2454957.73195 0.999988264264 8.72466e-05
2454957.73263 1.000005424 8.72124e-05
2454957.73331 1.00032938007 8.71873e-05
2454957.73399 0.999985165798 8.71354e-05
2454957.73467 0.999966452904 8.71022e-05
2454957.73535 1.0000268306 8.70675e-05
2454957.73604 0.99998198191 8.70318e-05
2454957.73672 1.00004338455 8.6999e-05
2454957.7374 0.999976414419 8.69631e-05
2454957.73808 0.999888774826 8.69288e-05
2454957.73876 1.0000954616 8.69057e-05
2454957.73944 0.999986127606 8.68722e-05
2454957.74012 1.0001239731 8.68503e-05
2454957.7408 0.999834507282 8.68128e-05
2454957.74148 1.00006323007 8.67929e-05
2454957.74217 0.999922208594 8.67676e-05
2454957.74285 0.999968835125 8.67456e-05
2454957.74353 1.00000546856 8.67258e-05
2454957.74421 0.999922953635 8.66998e-05
2454957.74489 0.999938490546 8.66756e-05
2454957.74557 0.999784999062 8.66468e-05
2454957.74625 1.00004139504 8.66372e-05
2454957.74693 0.999937612756 8.66098e-05
2454957.74761 1.00011133086 8.65918e-05
2454957.7483 0.999974067483 8.65614e-05
2454957.74898 0.999938016142 8.65329e-05
2454957.74966 0.999901708568 8.65026e-05
2454957.75034 1.0000095748 8.64762e-05
2454957.75102 1.00005816577 8.64484e-05
2454957.7517 0.999894083319 8.64118e-05
2454957.75238 0.9999062892 8.63832e-05
2454957.75306 0.99998161382 8.63561e-05
2454957.75375 1.00002123664 8.63279e-05
2454957.75443 1.00001926429 8.62987e-05
2454957.75511 0.99993094142 8.6268e-05
2454957.75579 0.999945795043 8.62411e-05
2454957.75647 1.00008509251 8.62208e-05
2454957.75715 1.00006074249 8.6197e-05
2454957.75783 0.999845328023 8.61691e-05
2454957.75851 1.00002630605 8.61502e-05
2454957.75919 0.99986094244 8.61313e-05
2454957.75988 0.999987855323 8.61205e-05
2454957.76056 0.999933526025 8.61036e-05
2454957.76124 1.00016071143 8.60984e-05
2454957.76192 1.00004078648 8.60855e-05
2454957.7626 0.999862013338 8.60632e-05
2454957.76328 1.00005511976 8.6061e-05
2454957.76396 0.999120459135 8.60551e-05
2454957.76464 0.99985285068 8.60425e-05
2454957.76532 0.999720882771 8.60298e-05
2454957.76601 0.999388882281 8.60102e-05
2454957.76669 0.999124185657 8.59918e-05
2454957.76737 0.998810719346 8.59689e-05
2454957.76805 0.998439088145 8.59471e-05
2454957.76873 0.998070873374 8.59226e-05
2454957.76941 0.997706843731 8.5899e-05
2454957.77009 0.997633894844 8.58847e-05
2454957.77077 0.997444359912 8.58662e-05
2454957.77146 0.997308548508 8.58527e-05
2454957.77214 0.997114743037 8.58325e-05
2454957.77282 0.997116443363 8.5824e-05
2454957.7735 0.997169561131 8.58155e-05
2454957.77418 0.996917590749 8.58021e-05
2454957.77486 0.996972331304 8.57978e-05
2454957.77554 0.996644601353 8.57839e-05
2454957.77622 0.996777322185 8.57837e-05
2454957.7769 0.99667516272 8.57856e-05
2454957.77759 0.996556348119 8.57848e-05
2454957.77827 0.996579572021 8.5791e-05
2454957.77895 0.996323587321 8.57906e-05
2454957.77963 0.996372349116 8.58005e-05
2454957.78031 0.996403857886 8.58187e-05
2454957.78099 0.996490969226 8.58359e-05
2454957.78167 0.996385649553 8.58437e-05
2454957.78235 0.99627511982 8.58578e-05
2454957.78303 0.996266143771 8.58805e-05
2454957.78372 0.996250078607 8.58976e-05
2454957.7844 0.99600869919 8.59039e-05
2454957.78508 0.996258945576 8.59312e-05
2454957.78576 0.996116215869 8.59434e-05
2454957.78644 0.996001757229 8.59552e-05
2454957.78712 0.996100569878 8.59721e-05
2454957.7878 0.996024033716 8.59881e-05
2454957.78848 0.995970046063 8.59932e-05
2454957.78916 0.995958080639 8.60054e-05
2454957.78985 0.995874540774 8.60113e-05
2454957.79053 0.995864966847 8.60168e-05
2454957.79121 0.995894511164 8.602e-05
2454957.79189 0.995833348986 8.60245e-05
2454957.79257 0.995934980198 8.60348e-05
2454957.79325 0.995814201143 8.60321e-05
2454957.79393 0.995818207567 8.60401e-05
2454957.79461 0.995791978493 8.60481e-05
2454957.7953 0.995719883716 8.60554e-05
2454957.79598 0.995704331018 8.60663e-05
2454957.79666 0.995806389274 8.6087e-05
2454957.79734 0.995769996289 8.61014e-05
2454957.79802 0.995857790928 8.61238e-05
2454957.7987 0.995728299939 8.61359e-05
2454957.79938 0.995680376478 8.61548e-05
2454957.80006 0.995650560141 8.61758e-05
2454957.80074 0.995807879334 8.62055e-05
2454957.80143 0.995710673719 8.62229e-05
2454957.80211 0.995684273811 8.62422e-05
2454957.80279 0.995682130642 8.62634e-05
2454957.80347 0.995588170646 8.62735e-05
2454957.80415 0.995700563645 8.6293e-05
2454957.80483 0.995677836422 8.62994e-05
2454957.80551 0.995779211413 8.63071e-05
2454957.80619 0.99561487273 8.62953e-05
2454957.80687 0.99555781028 8.62808e-05
2454957.80756 0.995443693273 8.62516e-05
2454957.80824 0.995579745123 8.62286e-05
2454957.80892 0.995584007781 8.61874e-05
2454957.8096 0.995649680968 8.61357e-05
2454957.81028 0.995652491638 8.60684e-05
2454957.81096 0.995545292923 8.59928e-05
2454957.81164 0.995648974011 8.59173e-05
2454957.81232 0.995626759254 8.58265e-05
2454957.813 0.995589085092 8.57273e-05
2454957.81369 0.995587881456 8.5633e-05
2454957.81437 0.995696003905 8.55328e-05
2454957.81505 0.995668237432 8.54322e-05
2454957.81573 0.995699746203 8.53242e-05
2454957.81641 0.995694699071 8.52224e-05
2454957.81709 0.995827334481 8.5127e-05
2454957.81777 0.995746869413 8.50302e-05
2454957.81845 0.995714234512 8.49361e-05
2454957.81914 0.995756675893 8.48466e-05
2454957.81982 0.995682702062 8.47631e-05
2454957.8205 0.995660658127 8.4682e-05
2454957.82118 0.995643568042 8.46159e-05
2454957.82186 0.995611701841 8.45475e-05
2454957.82254 0.995527051633 8.44854e-05
2454957.82322 0.995664897126 8.44451e-05
2454957.8239 0.995773019564 8.43996e-05
2454957.82458 0.995743203227 8.43663e-05
2454957.82527 0.995830229168 8.4331e-05
2454957.82595 0.995794690293 8.43112e-05
2454957.82663 0.995749329151 8.42839e-05
2454957.82731 0.995935944333 8.42828e-05
2454957.82799 0.995995980382 8.42758e-05
2454957.82867 0.996080443992 8.42753e-05
2454957.82935 0.996008263792 8.42818e-05
2454957.83003 0.996051900915 8.42895e-05
2454957.83071 0.996187440299 8.43173e-05
2454957.8314 0.99621467853 8.43456e-05
2454957.83208 0.996107138171 8.43777e-05
2454957.83276 0.996101578573 8.44269e-05
2454957.83344 0.996129329259 8.44828e-05
2454957.83412 0.996005902452 8.45422e-05
2454957.8348 0.995856510708 8.46096e-05
2454957.83548 0.99592201305 8.47036e-05
2454957.83616 0.996032441597 8.48081e-05
2454957.83685 0.995945485303 8.49167e-05
2454957.83753 0.995935313499 8.50403e-05
2454957.83821 0.996129701072 8.51848e-05
2454957.83889 0.995985263166 8.53259e-05
2454957.83957 0.996097826988 8.54942e-05
2454957.84025 0.996134033364 8.5664e-05
2454957.84093 0.99615264506 8.58475e-05
2454957.84161 0.996166815406 8.60436e-05
2454957.84229 0.996145625582 8.62428e-05
2454957.84298 0.99623342021 8.64504e-05
2454957.84366 0.996362895424 8.66654e-05
2454957.84434 0.99634683026 8.68833e-05
2454957.84502 0.996419165494 8.71003e-05
2454957.8457 0.996259353607 8.73161e-05
2454957.84638 0.996523009499 8.75396e-05
2454957.84706 0.996571856706 8.77517e-05
2454957.84774 0.996577485939 8.79549e-05
2454957.84842 0.996646575567 8.81529e-05
2454957.84911 0.996700803666 8.8341e-05
2454957.84979 0.996638018678 8.85094e-05
2454957.85047 0.99687015793 8.86739e-05
2454957.85115 0.996814462056 8.88135e-05
2454957.85183 0.996846141637 8.89413e-05
2454957.85251 0.997180176227 8.9063e-05
2454957.85319 0.997023524536 8.9159e-05
2454957.85387 0.997121226841 8.92503e-05
2454957.85455 0.997115154777 8.93254e-05
2454957.85524 0.997337044696 8.93984e-05
2454957.85592 0.997478477441 8.94585e-05
2454957.8566 0.997563795161 8.95079e-05
2454957.85728 0.997705996593 8.95526e-05
2454957.85796 0.998109128681 8.95979e-05
2454957.85864 0.998710841387 8.96423e-05
2454957.85932 0.999001828816 8.96699e-05
2454957.86 0.999224658255 8.96904e-05
2454957.86069 0.999635989813 8.97134e-05
2454957.86137 0.999765806659 8.97167e-05
2454957.86205 0.999958913078 8.97161e-05
2454957.86273 0.999901423561 8.96997e-05
2454957.86341 0.999932676099 8.96749e-05
2454957.86409 0.999983402347 8.96524e-05
2454957.86477 0.999882609469 8.96069e-05
2454957.86545 1.00000935152 8.95715e-05
2454957.86613 0.99999183438 8.95159e-05
2454957.86682 1.00006861099 8.94537e-05
2454957.8675 0.999944244658 8.93694e-05
2454957.86818 0.999973020265 8.92882e-05
2454957.86886 1.00002015926 8.91924e-05
2454957.86954 0.999986584841 8.90813e-05
2454957.87022 1.00003380924 8.89586e-05
2454957.8709 1.0000597663 8.88214e-05
2454957.87158 0.999995956383 8.86785e-05
2454957.87226 1.00011407192 8.85284e-05
2454957.87295 1.00014276214 8.83674e-05
2454957.87363 1.00006272412 8.81976e-05
2454957.87431 1.00031408083 8.80375e-05
2454957.87499 1.00009473747 8.78589e-05
2454957.87567 1.00014281598 8.76914e-05
2454957.87635 1.00015160542 8.75281e-05
2454957.87703 0.999849413359 8.73583e-05
2454957.87771 1.00006182267 8.7213e-05
2454957.8784 1.00004165777 8.7067e-05
2454957.87908 1.00000552101 8.69332e-05
2454957.87976 1.00005556398 8.68115e-05
2454957.88044 1.00012909497 8.67077e-05
2454957.88112 0.999946563743 8.6604e-05
2454957.8818 1.00001761782 8.65215e-05
2454957.88248 0.999937665222 8.64439e-05
2454957.88316 1.00005330384 8.63836e-05
2454957.88384 1.00003570129 8.63364e-05
2454957.88453 1.00003799948 8.62972e-05
2454957.88521 1.00005558626 8.62679e-05
2454957.88589 1.00014081856 8.62505e-05
2454957.88657 1.00003771958 8.6234e-05
2454957.88725 0.999997483099 8.62266e-05
2454957.88793 0.999956819575 8.62227e-05
2454957.88861 1.0002369598 8.62346e-05
2454957.88929 1.00003486945 8.62306e-05
2454957.88997 0.999881719603 8.6233e-05
2454957.89066 1.00010694056 8.62476e-05
2454957.89134 1.00003288132 8.62536e-05
2454957.89202 1.00018883394 8.62676e-05
2454957.8927 0.999938657197 8.6271e-05
2454957.89338 1.00001423805 8.62849e-05
2454957.89406 0.999969560209 8.63015e-05
2454957.89474 1.00003062119 8.63241e-05
2454957.89542 1.0000066982 8.63496e-05
2454957.8961 0.999900097363 8.63793e-05
2454957.89679 0.999860544182 8.64197e-05
2454957.89747 0.999948765865 8.64735e-05
2454957.89815 1.00003630427 8.65389e-05
2454957.89883 0.999856762429 8.66042e-05
2454957.89951 1.0000030636 8.66928e-05
2454957.90019 0.999787734554 8.67818e-05
2454957.90087 0.999961708883 8.68958e-05
2454957.90155 0.999982712099 8.70155e-05
2454957.90224 0.999804878488 8.71395e-05
2454957.90292 0.999935805677 8.7286e-05
2454957.9036 0.99994562005 8.74357e-05
2454957.90428 1.0000622836 8.75919e-05
2454957.90496 0.999963369766 8.77571e-05
2454957.90564 0.999949610699 8.7924e-05
2454957.90632 1.00006542014 8.80972e-05
2454957.907 0.999897237961 8.82573e-05
2454957.90768 0.999921230562 8.84211e-05
2454957.90837 0.999847512964 8.85775e-05
2454957.90905 0.999951962752 8.87283e-05
2454957.90973 1.00003557224 8.88655e-05
2454957.91041 0.999923932152 8.89804e-05
2454957.91109 0.999980978816 8.90833e-05

Getting Started with XSEDE/OSG

Logging in

Login to the XSEDE login node with:

ssh [email protected]

Login to the Open Science Grid:

gsissh submit-1.osg.xsede.org

Build STSP

Make a directory to store git repositories in:

mkdir git
cd git

Clone the STSP repository there:

git clone https://github.com/lesliehebb/STSP.git
cd STSP

Build STSP (after tweaking appropriate #define settings)

gcc -lm stsp.c -o stsp_todaysdate

where stsp_todaysdate is the name of the new STSP executable. I like to build each one with a date so that you remind yourself which version you're using each time you look at its name.

Create an example HTCondor job

Create a directory for our STSP demo, and create a directory for outputs within the demo directory

mkdir osg_demo
cd osg_demo
mkdir output

Copy the condor.osg-xsede, transit000.txt and test.in files into this directory via scp or copy/paste.

In condor.osg-xsede, you must edit these arguments:

  • ProjectName: the allocation which should be charged for this job. This gets printed to the terminal when you log in.
  • executable: the path to the stsp_todaysdate executable file
  • arguments: the arguments that stsp_todaysdate will expect. For all runs, this will begin with the .in file. For runs seeded from previous runs, you must also enter the path to the _finalparam.txt file, separated from the .in file with a comma.
  • transfer_input_files: Since nodes on the OSG don't share a common file system, any files that are needed by your job must be transfered to the node when the job begins. Here, make a comma-separated list of the paths of files that must be present to start your job
  • transfer_output_files: Similar to above, list the files that you want returned to your OSG home account.
  • output, error, log: Paths for where to place the HTCondor output (stdout), error (stderr) and log files.
  • notification: Sets whether or not you'd like to receive email notifications about job initialization/termination

Run an example HTCondor job

Once your condor.osg-xsede file is ready to go, submit it to the condor queue with:

condor_submit condor.osg-xsede

To see your job in the queue, you can use the condor_q command. Typically the outputs are so long, that you'll want to pipe that output into a grep for your username. So, for example, I would do this:

$ whoami
bmorris
$ condor_q -sub bmorris
 ID      OWNER            SUBMITTED     RUN_TIME ST PRI SIZE CMD               
5712791.0   bmorris         1/26 05:15   0+00:00:15 R  0   0.1  stsp_todaysdate test.in
...
1 jobs; 0 completed, 0 removed, 0 idle, 1 running, 0 held, 0 suspended

If the ST (status) column says I, your job is idle -- likely waiting for its turn in the queue. If ST=R and RUN_TIME is non-zero, your job is running.

If you need to kill your job, you can pass the ID number returned by the condor_q command above to the condor_rm command:

condor_rm 5695989.0

When your job is finished, it will no longer show in the queue, and the files you specified with transfer_output_files will be transferred back to the directory where you submitted the job (osg_demo/).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment