Comments (11)
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.
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.
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.
Any ideas @mesmith75?
from first-analysis-steps.
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.
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.
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.
@cmarinbe I'd say explicit is better than implicit in this case. Automagically copying files is not nice.
from first-analysis-steps.
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.
@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.
Closed by #211.
from first-analysis-steps.
Related Issues (20)
- Explain how to generate the web pages HOT 5
- Move ganga lb-dev lesson HOT 7
- Should we switch to LoKi functors for DecayTreeFitter?
- Lesson "More on Ganga" doesn't exist anymore HOT 3
- Add Turbo stream in callout box of lesson 11 HOT 1
- Migrate all possible SVN URLs to GitLab HOT 1
- Updates and issues in 2. Install Party
- Test issue
- Mention MassStorage in "EOS-Storage" Chapter
- There is an online tool for finding the EventType of your decay HOT 3
- Tag the commit used for the November 2016 session
- Typo on the 'Contribute to this lesson' page
- python http module only available in Python 3
- Clarify DST explorer lesson
- Improve LoKi Functors lesson
- Running DaVinci on the grid: PythonOptsCmakeParserError HOT 3
- Setting up project fails HOT 3
- Why edit .gangarc for MassStorageFile? HOT 4
- Use CERN-FNAL school slides on "from collisions to analysis"? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from first-analysis-steps.