-
Notifications
You must be signed in to change notification settings - Fork 61
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
PETSc not working on Mac #1523
Comments
It appears you are using "Petsc Release Version 3.19.2, Jun 01, 2023 ". Did you install the PETSc yourself with ./configure ? Or obtain it some other way? If you installed it your self please attach configure.log and make.log here. In the last couple of years Apple has changed some of its compile and link infrastructure that "broke" some older versions of PETSc so the configure.log and make.log might help us determine if that is the cause of your errors. |
I installed petsc as part of IDAES using the instructions here. Specifically, I forgot to mention I just updated my OS yesterday to Sequoia too. Not sure if it could be related. |
I'll try an installation following the instructions above tonight; I cannot use Conda at work (it costs big bucks :-(). |
Thanks! Is there a reason you need Conda to install PETSc with IDAES? It says in my link that the miniconda part is optional. |
@BarrySmith Just FYI, there are many non-proprietary distributions of Conda that can be used without any licensing issues, such as MiniForge: https://github.com/conda-forge/miniforge?tab=readme-ov-file#miniforge3. The IDAES documentation is in the process to be updated so that Miniforge is the recommended method to install Conda (see IDAES/idaes-pse#1513). |
@fahim831 I believe
I don't have any evidence to back this up, but my gut feeling is that this is most likely related to the error (e.g. the update might have changed the location of some libraries or other components needed by the IDAES-distributed PETSc executable). Conversely, there have been no changes on the Python, Pyomo, IDAES and/or WaterTAP side that could realistically interfere with PETSc, so I don't think that switching branches is related to the error. You should be able to test this assumption at least partially by switching back to the original branch and trying to see if the error persists (which, based on the OS update hypothesis above, I would expect it to do). |
@lbianchi-lbl Thanks for the details. Yes, I had switched back to my other branch where things were previously working and also tried to go back to yesterday's pre-update commit but nothing worked. Unfortunately, you are forced to update the OS anyway eventually so there was no point in delaying it. But I understand the logs won't help in this case. Maybe I will wait for @BarrySmith to install it in a macOS v14 and v15 environment to verify where the issue is and if it's really a version problem. I'll see if I can set up a virtual windows environment and work until then. |
From the stack trace, it is clear that PETSc is being given invalid options. For example, from the last error, from the PETSc listing you use |
Not sure how relevant this can be, but I've just noticed the I'm not a macOS user and I'm obviously hand-waving a lot of the details away, but this sounds like something that should be looked at on the side of the IDAES extensions (https://github.com/IDAES/idaes-ext), i.e. the pseudo-package that distributes the PETSc executable from which this error originates. @fahim831 can you post some information about the hardware of your macOS machine? e.g. by following the steps in the "View a system report" section of this page and copying the relevant portions of that data (i.e. without the serial number and other identifying information) here. |
@lbianchi-lbl Here are the things shown in the first page of the system report minus identifying details for both software and hardware: Hardware Overview: Model Name: MacBook Air System Software Overview: System Version: macOS 15.1 (24B83) |
My employer blocks all conda site access, which means even downloads of non-proprietary conda's are blocked. Anyways not important. |
Unfortunately, my installed testing failed. I followed the instructions and got to
This is with Sequoia 15.1 I f you can help me past this point I could possibly get to debugging the PETSc problem. |
@BarrySmith I'm not sure why there is a multiperiod model in the error. Is there a reason your test uses that? As far as I know, the multiperiod does not even call PETSc as it's not dynamic. The issue is to do with PETSc so you could even just try to run the example files and you will run into the issue (I just tried and confirmed the issue persists for these example files too right now). The simplest one is this: https://idaes-examples.readthedocs.io/en/latest/docs/dae/petsc_chem_doc.html |
This looks like an issue with the version(s) of IDAES and/or Pyomo (I'll link the GitHub issue in a minute). @BarrySmith can you run |
@fahim831 in the meantime, can you post a minimal example of a dynamic flowsheet that causes the error on your machine? It can be any IDAES flowsheet, but it should be as simple as possible, ideally in a single Python file so that @BarrySmith can run it after installing IDAES once we sort out the installation issues. EDIT: Nevermind, I see your post above, thanks. I'll try to convert that example to a standalone |
@lbianchi-lbl Yes, I actually already converted it to a standalone py file as the example calls upon another file. You just have to copy paste those reactions and details from that IPYNB into a .py and make a single file. I can post that in like an hour. Edit: Below is the standalone code to get PETSc to run.
|
Description
I'm having errors calling the PETSc solver on my Mac. It was working in the morning and broke when I
checkout
ed out and in to my branch. So I think the branch updated, breaking it. The lines causing the error are the call to petsc, though different calls yield different errors:The error stack trace (only lines starting with
[0]PETSC ERROR
are actually tied to this):If I change skip_initial=True to skip_initial=False, I get this instead:
Lastly, if I call it with all the options I sometimes call it with, i.e.,
I get
Expected Behavior
I do not have a working trace right now but it's supposed to print the time step it's trying, whether it's an accepted time-step, how the integration is proceeding, and so on.
Steps to Reproduce
Call
petsc.petsc_dae_by_time_element
in an arm64 machine, e.g., M1/2/3 chip macOS.Environment
Anything Else?
The error started after I checked out and back in to the
operation_cc
branch today.The text was updated successfully, but these errors were encountered: