MartianColonist / POSEIDON

Multidimensional atmospheric retrieval of exoplanet spectra.
BSD 3-Clause "New" or "Revised" License
24 stars 6 forks source link

Problem producing Spectral Contribution plot (cont.) #34

Closed cdfortenbach closed 1 month ago

cdfortenbach commented 1 month ago

Unfortunately, I'm having more serious problems now than before. Previously the code was running down to the point where there was a call to the 'plot_spectra' call. Now it is not starting to run at all. I have done two full cycles of installation with the same result. No joy. I have attached a file that shows: (1) the warning message about Open MPI . . ., (2) the result of a run using the mpirun command, and (3) the result of a run with a single core.

There seems to be a problem with the mpi4py installation (maybe).

Any thoughts or suggestions would be most appreciated. Right now I am dead in the water. Thanks.

errors_20241003T1124.txt

MartianColonist commented 1 month ago

Please can you confirm the operating system you are using?

cdfortenbach commented 1 month ago

I'm using Ubuntu 18.04.

MartianColonist commented 1 month ago

Yeah, this appears to be an issue with mpi4py clashing with a new version of Python 3.11 that just came out. mpi4py seems to not support this new version of Python.

I can replicate the "libmpi.so.12" error with Python 3.11.10 on Ubuntu 20.04.

Everything works with Python 3.11.9 and Python 3.10.14.

So I would recommend creating a conda environment with Python 3.10 for now (or alternatively using Python 3.11.9).

cdfortenbach commented 1 month ago

There is progress. I tried to set up and run a new venv with python 3.11.9, as you suggested. That didn't work, so I tried python 3.10.14. That worked. I was finally able to get things running (sort-of).

I have set up the Spectral Decomposition tutorial as a .py script. At first it seemed to be running to completion, but it was producing no output. I then added two items to the plot_spectral_distribution function: save_fig = True, and return_fig = True. Now it is producing an output .pdf, and putting it in the normal output folder for HD 189733 b. The problem is that the .pdf is completely blank. The run seems to finish normally otherwise.

Any thoughts on this would be helpful. Thanks.

MartianColonist commented 1 month ago

I've confirmed the issue. @elijah-mullens is looking into a quick patch to enable saving the contribution function plots.

MartianColonist commented 1 month ago

Issue fixed by commit 35fbea3.

Files are now produced for spectral decompositions, pressure contributions, and photometric contributions when the user passes 'save_fig = True'. I've also updated the contribution function tutorial accordingly.

Thanks for raising this issue @cdfortenbach!