[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] Mutliple jobs with different outpus



Hello Sunil, thanks for sending your macro code.

Now coming to the solution to your problem
No need to change either the source code for
macro or the submit file
The only thing that you have to change is your shell script
so your batc_job.sh should look like this


#!/bin/sh
source /export/root/bin/thisroot.sh
str=s/mytree.root/mytree_$$.root/g
sed $str tree.C > tree_$$.C
root -b tree_$$.C -q
rm -rf tree_$$.C


Just change the content of your batch_job.sh with
above lines.

and then try to submit your job.
so with your submit file it will create
five root file with name convention
as mytree_<some_number>.root

Just try to execute it, and let me know the
results, whether it executes or not the way you want.


cheers,

On Wed, Feb 8, 2012 at 12:06 PM, Dr. Sunil M. Dogra <smdogra@xxxxxxxxx> wrote:
here is my macro

void tree(){
 Float_t ran;
 Int_t n=100000000;

 TTree *t1 = new TTree("t1","Reconst ntuple");
 t1->Branch("ran", &ran,"ran/F");
 for(Int_t iev=0; iev<n; iev++){
   ran = gRandom->Rndm(iev);
   t1->Fill();
 }
 TFile *f1 = new TFile("mytree.root", "RECREATE");
 t1->Write();
 f1->Close();
}



batch_job.sh
#!/bin/sh
source /export/root/bin/thisroot.sh
root -b tree.C -q



#!/bin/sh -f
Universe        = vanilla
Executable      = batch_job.sh
Output          = /export/sunil/err/outjob.out.$(Process)
Error           = /export/sunil/err/errjob.err
Log             = /export/sunil/err/log.job.log.$(Process)
Notification = never
Queue 5


I appreciate.

Best Regards
sunil



On Wed, Feb 8, 2012 at 11:58 AM, Raman Sehgal <sc.ramansehgal@xxxxxxxxx> wrote:
> Hello Sunil,
>   Yes i think i can help in this.
>
> you have to create a shell script that
> will do this work for you.
>
> I can tell more only after seeing the code for that macro.
>
>
>
>
> Cheers,
>
>
> On Wed, Feb 8, 2012 at 11:45 AM, Dr. Sunil M. Dogra <smdogra@xxxxxxxxx>
> wrote:
>>
>> Hi,
>>
>> May be trivial question
>>
>> I want to run  a .C macro to generate random number with multiple jobs
>> with ROOT_5.28 and save this a tree with different names
>>
>> With I submit the jobs it save in the same file ,
>> Any idea how to do it.
>>
>> With Best Regards
>> sunil
>> _______________________________________________
>> Condor-users mailing list
>> To unsubscribe, send a message to condor-users-request@xxxxxxxxxxx with a
>> subject: Unsubscribe
>> You can also unsubscribe by visiting
>> https://lists.cs.wisc.edu/mailman/listinfo/condor-users
>>
>> The archives can be found at:
>> https://lists.cs.wisc.edu/archive/condor-users/
>
>
>
>
> _______________________________________________
> Condor-users mailing list
> To unsubscribe, send a message to condor-users-request@xxxxxxxxxxx with a
> subject: Unsubscribe
> You can also unsubscribe by visiting
> https://lists.cs.wisc.edu/mailman/listinfo/condor-users
>
> The archives can be found at:
> https://lists.cs.wisc.edu/archive/condor-users/
>
_______________________________________________
Condor-users mailing list
To unsubscribe, send a message to condor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/condor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/condor-users/



--
Raman Sehgal
Scientific Officer D
Nuclear Physics Division
Bhabha Atomic Research Centre