2: Submit a Test Job 3: Add Resources for Your Jobs 4: Run Jobs on Your Resources +4:: Change a Submit File +4:: Edit an Idle Job 5: Clean Up (optional) These instructions assume this is the first time you're using =condor_annex= on CHTC. You'll want to have two terminal windows open: one for running =condor_annex= commands (logged into =annex-cm.chtc.wisc.edu=) and another for submitting jobs (logged into =submit-4.chtc.wisc.edu=). If you've used =condor_annex= on CHTC before, skip ahead to section 1.3 ("Check the Set-Up"). @@ -159,34 +161,47 @@ (MayUseAWS == true) && stringListMember(Owner,"tlmiller") {endterm} -The =tlmiller= above should be your login. +The =tlmiller= above should be your username. There are {wiki: HowToUseCondorAnnexWithOnDemandInstancesEightSevenFour additional instructions} for general annex use. For now, we'll move on to actually running on your new resource. {section: 4 Run Jobs on Your Resources} -It might take a while for =submit-4.chtc.wisc.edu= to try the other possibilities before giving the annex a chance to run the job. Run condor_q in the terminal logged in to that machine to keep track of the test job; it should eventually run. (Check its log if it's gone when you check; the job may have run and finished.) +It shouldn't take more than a few minutes from when your new resources join the pool for your test job to start running. The test job sleeps for ten minutes to make it easier to catch in the running state; you don't need to wait for it to finish before testing one of your own jobs. -You can make use of the annex resources for your own jobs in two ways: by submitting new jobs and by editing existing ones. +You can make use of the annex resources for your own jobs in two ways: by modifying an existing submit file or by editing jobs already in the queue. -To submit new jobs, you can follow the example of the test job, above; you'll need the '+MayUseAWS = TRUE' line and the '+WantFlocking = TRUE' line. A reminder: this means these jobs will flock! For now, you shouldn't use =condor_annex= if you don't want your jobs flocking. (Your job, like the test job, can require that it be run on a machine whose name ends in '.ec2.internal', but that's not a secure solution.) You may also add 'regexp( ".*\.ec2\.internal", Machine )' to your requirements expression if you want to make sure a job doesn't run anywhere but on your annex. You will also need to something to your requirements to address the issue that annex resources don't presently advertise =OpSysMajorVer=. A requirements expression like the following should do the trick. (Remember, the default resources rented by =condor_annex= run an EL6-like OS.) +{subsection: 4.1 Change a Submit File} +Be sure to make a copy of your submit file before you start changing it. ;) + +You will need to add the following lines to the submit file (before the queue statement): {verbatim} -requirements = (regexp( ".*\.ec2\.internal", Machine ) || IsCHTC) && (OpSysMajorVer isnt defined || OpSysMajorVer == 6) ++MayUseAWS = TRUE ++WantFlocking = TRUE' {endverbatim} +A reminder: this means these jobs will flock! For now, you shouldn't use =condor_annex= if you don't want your jobs flocking. -If you prefer, you can restrict by the name of the annex you requested (but be aware that any annex user can assign any name to their annex, including one that you're already using): +You will also need to modify the =requirements= line. The modification has two goals: first, to prevent your jobs from running anywhere other than CHTC or your annex; and second, to allow your job to run on either CHTC or your annex. To accomplish the first goal, add the following clause to the =requirements= line, changing "MyFirstAnnex" to the name of your annex, if different: {verbatim} -requirements = (AnnexName =?= "MyFirstAnnex" || IsCHTC) && (OpSysMajorVer isnt defined || OpSysMajorVer == 6) +(AnnexName =?= "MyFirstAnnex" || IsCHTC) {endverbatim} -You can also edit existing jobs by using =condor_q=. More on using this tool will be forthcoming. +If the phrase "add the following clause" didn't make a lot of sense to you, + +{verbatim} +requirements = (AnnexName =?= "MyFirstAnnex" || IsCHTC) && (OpSysMajorVer isnt defined || OpSysMajorVer == 6) +{endverbatim} Once you've gotten one job running, you may want to add additional resources to your annex. While repeating the command from section 3 will add another instance to the "MyFirstAnnex" annex, for simplicity we recommend using another name. (Using an existing name updates the lease for all instances in the annex, existing and new; but only new instances will respect the new max idle time. If you've used the name of your annex in your job requirements, this might be worth the trouble.) -{section: 5 Cleaning Up (Optional)} -The resources =condor_annex= rents for you from Amazon will, as we mentioned before, shut themselves down after the duration, or if they're idle for longer than the time-out. At that point, no more charges will accrue -- it costs you nothing to leave your account set-up to use =condor_annex=. -If your jobs all finish early, you can run (on =annex-cm.chtc.wisc.edu=) =condor_annex -annex MyFirstAnnex off= to shut off all the resources you rented immediately. +{subsection: 4.2 Modify an Idle Job} + +Instructions for using =condor_qedit= to follow. + +{section: 5 Cleaning Up (Optional)} + +The resources =condor_annex= rents for you from Amazon will, as we mentioned before, shut themselves down after the duration, or if they're idle for longer than the time-out. If your jobs all finish early, you can run (on =annex-cm.chtc.wisc.edu=) =condor_annex -annex MyFirstAnnex off= to immediately shut down all the resources you rented.