-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nosetests on Mac fail #2392
Comments
hey @JacksonBurns, @ChrisBNEU |
@kfir4444 I tested running with/without a debugger and I think it is specifically nosetests that causes the issue, not the debug flag check. figuring out specifically what is causing the segfault would require doing debugging with something meatier like valgrind, and I think for this issue it's not worth it. I think the check for mac in the debug statement that I have in #2393 is an ok fix for now until we upgrade. |
This is not directly related to this issue, but @JacksonBurns and I were discussing, the bare except statements in that section of reactors.py should be replaced with something more robust. just getting a segfault or "rms.getSpeciesRadius not found" is tough for the average user to decypher. |
Agreed that nosetest is the issue. I think switching from nose to pytest might solve this. I have not tried myself, but pyjulia has a plugin that is supposed to make the two work together: https://pyjulia.readthedocs.io/en/latest/pytest.html#pytest-plugin Here's the issue from my perspective: we are planning on making this switch on Aug. 1. That means that, until then, we either (1) can't run the unit tests on mac (not great, obviously) or (2) merge #2393 and make it so that mac users cannot use debug mode. I think we should go a different way entirely. Move the deadline for the pytest switch much sooner and actually fix the underlying problem. I am aware that this will cause huge problems merging outstanding PRs, but I am beginning to think that trying to save ourselves the work of fixing those is creating a lot more work maintaining what we already have. Ideally, we make the import just look like this and have pytest be compatible (which it should): import logging
import itertools
from pyrms import rms
from diffeqpy import de
from julia import Main
from rmgpy.species import Species |
If pyrms/diffeqpy and julia are imported without an except statement, it will create issues for ARC and T3. |
Do ARC and T3 use components of RMG other than How about this instead: try:
from pyrms import rms
from diffeqpy import de
from julia import Main
except ImportError:
# tell the user to install Julia or check their installation
NO_JULIA = True Later on in execution in RMG, we would need to act differently based on the value of In ARC and T3, this should not change anything. I would prefer to have the ImportError stop execution (as an Error typically should), but since enforcing this would require ARC and T3 to have a functioning Julia install I understand why it isn't done that way. I still think it's not a great idea to delay what could be an execution-halting issue when running RMG just to get functionality in other programs, but that's just my opinion. |
@JacksonBurns ARC's goal is to automate QM calculations so I don't believe ARC needs RMG's reactors at all. However, if for some reason ARC imports a function from RMG that eventually cascades into importing something from a file that does import Julia, then it could cause a problem Once upon a time, @alongd and I had added code to T3 so that it could simulate kinetic mechanisms with RMS reactors. @Laxzal can you elaborate more about what issues would be raised? |
Hey @kspieks , it is as you say, T3 and ARC import functions from RMG that will eventually cascade into importing reactors.py, even though it won't be used. I am a bit more familiar with T3 than ARC, however, I cannot pinpoint which imports are the ones that cause the loading of reactors.py. With that said, IIRC there are two T3 tests (test_function.py) that are good examples of RMG reactors.py being loaded. |
@ChrisBNEU can you checkout the add-macos11-ci branch and try running tests in an environment created with that Note that you cannot do |
@JacksonBurns I did try it, and it is able to run the unittests on mac (catalina 10.15.7, intel processor). |
Thanks for verifying! When #2415 is merged this issue will automatically be closed. |
Bug Description
After PR #2364, on Mac os exclusively, running
make test
produces a segmentation fault:How To Reproduce
install RMG as specified in our install guide following mac os instructions, then run
make test
Expected Behavior
Expect it to run the unit tests
Installation Information
Describe your installation method and system information.
Additional Context
When I comment out the code below from "reactors.py" I am able to run the unit tests:
The text was updated successfully, but these errors were encountered: