Git Product home page Git Product logo

Comments (11)

cmarinbe avatar cmarinbe commented on August 18, 2024

I've tried to do:

j = Job()
myApp = prepareGaudiExec('DaVinci', 'v42r0')
myApp.options = ['code/davinci-grid/ntuple_options_grid.py']
j.application = myApp

the second line returns:

INFO     Set up App Env at: /afs/cern.ch/user/c/cmarinbe/cmtuser/DaVinciDev_v42r0

which seems in line of the folder being created automatically.

However, when trying to add the input data as we were doing so far:

j.inputdata = j.application.readInputData('data/MC_2012_27163003_Beam4000GeV2012MagDownNu2.5Pythia8_Sim08e_Digi13_Trig0x409f0045_Reco14a_Stripping20NoPrescalingFlagged_ALLSTREAMS.DST.py')

an error raises:

INFO     Started parsing input Data file
ERROR    PythonOptsCmakeParserError:
GangaException:  ("The given directory: '/afs/cern.ch/user/c/cmarinbe/cmtuser/DaVinciDev_v42r0' doesn't exist!",)
ERROR    Error: ApplicationConfigurationError: Unable to parse the job options. Please check options files and extraopts. 

I've checked the folder is really not there. I guess it is only created when the job is prepared. I'm not sure why it is needed in order to parse the input data (project dependent?) but we need to figure out what's the best way off doing this now.

from first-analysis-steps.

cmarinbe avatar cmarinbe commented on August 18, 2024

Ok, my bad, the problem was the project version I was setting. Using:

j = Job()
myApp = prepareGaudiExec('DaVinci','v40r2')
myApp.options = ['code/davinci-grid/ntuple_options_grid.py']
j.application = myApp
j.inputdata = j.application.readInputData('data/MC_2012_27163003_Beam4000GeV2012MagDownNu2.5Pythia8_Sim08e_Digi13_Trig0x409f0045_Reco14a_Stripping20NoPrescalingFlagged_ALLSTREAMS.DST.py')
j.backend = Dirac()
j.submit()

worked just fine 🙂. Would be useful that a Warning/Error raises if you set an invalid project/version in prepareGaudiExec though.

from first-analysis-steps.

cmarinbe avatar cmarinbe commented on August 18, 2024

However the inputdata doesn't look to be picked up properly:

Ganga In [17]: j.inputdata = j.application.readInputData('data/MC_2012_27163003_Beam4000GeV2012MagDownNu2.5Pythia8_Sim08e_Digi13_Trig0x409f0045_Reco14a_Stripping20NoPrescalingFlagged_ALLSTREAMS.DST.py')
INFO     Started parsing input Data file
INFO     Finished parsing input Data file

[16:37:04]
Ganga In [18]: j.inputdata

from first-analysis-steps.

alexpearce avatar alexpearce commented on August 18, 2024

Any ideas @mesmith75?

from first-analysis-steps.

mesmith75 avatar mesmith75 commented on August 18, 2024

Try just

j.application.readInputData('data/MC_2012_27163003_Beam4000GeV2012MagDownNu2.5Pythia8_Sim08e_Digi13_Trig0x409f0045_Reco14a_Stripping20NoPrescalingFlagged_ALLSTREAMS.DST.py')

That will set the inputdata attribute for you so you don't need the =

from first-analysis-steps.

cmarinbe avatar cmarinbe commented on August 18, 2024

Thanks, that works nicely!

Btw, has the default behaviour changed for the outputfiles? If I recall properly, with a DV application the .root files were automatically added as LocalFiles. But it looks like GaudiExec doesn't have this feature, you need to specify any output files manually. Is that right or am I missing something? Both me and @renaudin are seeing this behaviour.

from first-analysis-steps.

rmatev avatar rmatev commented on August 18, 2024

FWIW, the recipe to use a released project (also in help(GaudiExec))

j=Job(application=prepareGaudiExec('DaVinci','v41r3'))

is a bit of a time bomb. This is because if the directory in ~/cmtuser already exists, it will just do nothing, not even a warning.

My recommendation, for the starterkit at least, is to use the current directory (assuming this is not e.g. ~):

prepareGaudiExec('DaVinci', 'v41r3', myPath='.')

from first-analysis-steps.

rmatev avatar rmatev commented on August 18, 2024

@cmarinbe I'd say explicit is better than implicit in this case. Automagically copying files is not nice.

from first-analysis-steps.

cmarinbe avatar cmarinbe commented on August 18, 2024

Thanks for the tip, that's pretty bad. Using the current directory sounds good. We can create a dedicated one at the beginning of the lesson.
For the files, that's fair enough. Just wanted to check since our previous lesson didn't specify them and worked. But indeed, better to teach good practices 🙂 Thanks!

from first-analysis-steps.

mesmith75 avatar mesmith75 commented on August 18, 2024

@rmatev Thanks for pointing that out - I'll add in a warning for the next release.
@cmarinbe Re. the output - this shouldn't have anything to do with GaudiExec(). I'll check it out, at some point it may have changed to file size. Also check your .gangarc in case you set the default for LocalFile / DiracFile.

from first-analysis-steps.

alexpearce avatar alexpearce commented on August 18, 2024

Closed by #211.

from first-analysis-steps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.