hyperion-rt / hyperion

Hyperion Radiative Transfer Code
http://www.hyperion-rt.org
BSD 2-Clause "Simplified" License
52 stars 26 forks source link

Import six standalone and gfortran9(?) bugfix #220

Closed jwise77 closed 4 years ago

jwise77 commented 4 years ago

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 commented 4 years ago

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

jwise77 commented 4 years ago

Okay, I've made these changes!

astrofrog commented 4 years ago

Thanks!