Skip to content

Import six standalone and gfortran9(?) bugfix#220

Merged
astrofrog merged 3 commits intohyperion-rt:masterfrom
jwise77:six-fix
May 14, 2020
Merged

Import six standalone and gfortran9(?) bugfix#220
astrofrog merged 3 commits intohyperion-rt:masterfrom
jwise77:six-fix

Conversation

@jwise77
Copy link
Copy Markdown
Contributor

@jwise77 jwise77 commented Apr 9, 2020

astropy doesn't package six anymore, so I replaced all of its imports with a try/except with an import from a standalone module. There was a similar issue with pytest. I didn't include six in the install_requires to be backwards compatible with previous installs. This addresses #219.

I fixed a segfault (I'm using gfortran v9.2.1) that came from an optional argument not having a default value. I also changed the write format of the percentile value during the iterations because my runs had very large values.

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x7f9290439cb1 in ???
#1  0x7f9290438e75 in ???
#2  0x7f929011e46f in ???
#3  0x555f7c2a6258 in __dust_interact_MOD_interact
        at src/dust/dust_interact.f90:46
#4  0x555f7c2d91e4 in __iteration_lucy_MOD_do_lucy
        at src/main/iter_lucy.f90:201
#5  0x555f7c2dc494 in MAIN__
        at src/main/main.f90:183
#6  0x555f7c2dd014 in main
        at src/main/main.f90:3
Segmentation fault

jwise77 added 2 commits April 9, 2020 12:22
Replacing all imports with a try/except.  Also added vscode config
directory to gitignore.
Segfault happened because an optional variable value wasn't
defined. Adjusting value write format to be E instead of F.
Copy link
Copy Markdown
Contributor

@astrofrog astrofrog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull request! I think adding six to install_requires would make sense, and you could even remove the astropy.extern.six imports. Would you have time to make these changes?

@jwise77
Copy link
Copy Markdown
Contributor Author

jwise77 commented Apr 13, 2020

No problem! I can make these changes this week and update the PR. Thanks for the feedback.

@jwise77
Copy link
Copy Markdown
Contributor Author

jwise77 commented Apr 15, 2020

Okay, I've made these changes!

@astrofrog
Copy link
Copy Markdown
Contributor

Thanks!

@astrofrog astrofrog merged commit 8073573 into hyperion-rt:master May 14, 2020
dnarayanan added a commit to dnarayanan/hyperion that referenced this pull request May 14, 2020
Merge pull request hyperion-rt#220 from jwise77/six-fix
@jwise77 jwise77 deleted the six-fix branch April 7, 2021 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants