praxes / hexrd

Legacy hexrd repository (python2.7)
http://hexrd.readthedocs.org
14 stars 42 forks source link

Running fit-grains from clean working directory crashes #75

Closed joelvbernier closed 9 years ago

joelvbernier commented 9 years ago

Looks as though it is set up to automagically run find-orientations if it doesn't find the corresponding output files, but it looks like there is a minot bug in how the args are handled? If you are busy I can try to squash this, but it looks pretty straightforward.

[joelvbernier@SoopahMac-3] test_v0.3.0 > hexrd fit-grains middle_layer.yml 14-11-26 10:46:51 - working_dir not specified, defaulting to /Users/Shared/Clausen_Apr2010/test_v0.3.0 14-11-26 10:46:51 - Missing /Users/Shared/Clausen_Apr2010/test_v0.3.0/accepted_orientations.dat, running find-orientations 14-11-26 10:46:52 - === begin find-orientations === 14-11-26 10:46:52 - working_dir not specified, defaulting to /Users/Shared/Clausen_Apr2010/test_v0.3.0 14-11-26 10:46:52 - logging to /Users/Shared/Clausen_Apr2010/test_v0.3.0/find-orientations.log Traceback (most recent call last): File "/Users/joelvbernier/anaconda/bin/hexrd", line 6, in sys.exit(main()) File "/Users/joelvbernier/anaconda/lib/python2.7/site-packages/hexrd/cli/main.py", line 68, in main args.func(args, p) File "/Users/joelvbernier/anaconda/lib/python2.7/site-packages/hexrd/cli/fitgrains.py", line 60, in execute findorientations.execute(args, parser) File "/Users/joelvbernier/anaconda/lib/python2.7/site-packages/hexrd/cli/findorientations.py", line 104, in execute if args.profile: AttributeError: 'Namespace' object has no attribute 'profile'

joelvbernier commented 9 years ago

@ddale it look like args.profile just isn't set in cli/fitgrains.py. What is better: put a catch to set it in findorientations, or set it in fitgrains?

ddale commented 9 years ago

The --profile argument was a recent addition from Continuum. I think the idea is to be able to profile the performance and find bottlenecks. Lets add a --profile option in cli.fitgrains that doesn't do anything, open an issue that the option needs implementation, and ask Continuum to implement it? Its probably 30 minutes of work for them.

ddale commented 9 years ago

This adds the --profile arg and implements it. Will close issue when 0.3.0 is tagged.