openmsr / CAD_to_OpenMC

code to target the conversion from a step-file to a h5m-geometry for neutronics
MIT License
25 stars 16 forks source link

Difficulties installing CAD_to_OpenMC with Python3.12 #98

Open victordgehm opened 4 months ago

victordgehm commented 4 months ago

Inside a conda environment running python3.12 and installing from pip: pip install CAD_to_OpenMC I get the following error:

    File "/home/nuclear/anaconda3/envs/openmc-env/lib/python3.12/site-packages/setuptools/dist.py", line 963, in run_command
      super().run_command(command)
    File "/home/nuclear/anaconda3/envs/openmc-env/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/tmp/pip-install-nl43z7pg/nlopt_373ac090b3584b99a65e173f5a2539ec/setup.py", line 28, in run
      self.build_extension(ext)
    File "/tmp/pip-install-nl43z7pg/nlopt_373ac090b3584b99a65e173f5a2539ec/setup.py", line 70, in build_extension
      nlopt_py = next(Path(self.build_temp).rglob("nlopt.py"))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  StopIteration
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for nlopt Running setup.py clean for nlopt Failed to build nlopt ERROR: Could not build wheels for nlopt, which is required to install pyproject.toml-based projects

I tried to compile nlopt on its own, but the error persist.

Erik Bergbäck Knudsen suggested to create the conda environment with python3.9 and retry. It did work. However it should be investigated why the nopt library won't install with the newer version of python

ebknudsen commented 4 months ago

@victordgehm I am investigating this - but I am having a little trouble reproducing the problem. Which platform are you on? I've tried setting up a python 3.12 environment and things seems to work fine there at least. Next to try is to reproduce your platform in a VM I think.

victordgehm commented 4 months ago

I am on Ubuntu 22.04.3. I supposed that anything working on Debian would work here

El lun, 26 feb 2024 a las 3:37, Erik B Knudsen @.***>) escribió:

@victordgehm https://github.com/victordgehm I am investigating this - but I am having a little trouble reproducing the problem. Which platform are you on? I've tried setting up a python 3.12 environment and things seems to work fine there at least. Next to try is to reproduce your platform in a VM I think.

— Reply to this email directly, view it on GitHub https://github.com/openmsr/CAD_to_OpenMC/issues/98#issuecomment-1963686582, or unsubscribe https://github.com/notifications/unsubscribe-auth/BGJOBCWK3KN5D5WYF266QO3YVRJWLAVCNFSM6AAAAABDVUDUOKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRTGY4DMNJYGI . You are receiving this because you were mentioned.Message ID: @.***>

ebknudsen commented 4 months ago

I'd think so too - but now I know what I should try to reproduce. Thank you!

victordgehm commented 4 months ago

Hello Erik,

I think I know what happened. I think I used the wrong step file.

When I first installed the zpre github repository and tried to run the shell script it said that it couldn't find the "./step_files/zpre_simplified_with_gold.step" file in step_to_h5m_zpre.py. So I change the name to the step file zpre_simplified.step, so I suppose this created the holes in the mesh

I am now trying with the zpre.step file instead to see if this solves the problem

Cheers

El lun, 26 feb 2024 a las 15:52, Erik B Knudsen @.***>) escribió:

I'd think so too - but now I know what I should try to reproduce. Thank you!

— Reply to this email directly, view it on GitHub https://github.com/openmsr/CAD_to_OpenMC/issues/98#issuecomment-1965360701, or unsubscribe https://github.com/notifications/unsubscribe-auth/BGJOBCQ4BOZY65ETGOCWTLTYVT73DAVCNFSM6AAAAABDVUDUOKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRVGM3DANZQGE . You are receiving this because you were mentioned.Message ID: @.***>

ebknudsen commented 4 months ago

Hi Victor, Yes - those gold foils can be a problem at times. I am looking into the issues with the zpre-model these days. I hope to figure it out soon. One known problem is all the venting holes in the Be-reflector. They were never really used, but are a big problem for the meshing algorithm. This could be modelled by lowering the density of the reflector material somewhat. Of course that is an approximation - but it would be easier to handle. Please let me know how you get on with the simpler model. cheers Erik

On Fri, 1 Mar 2024 at 21:33, victordgehm @.***> wrote:

Hello Erik,

I think I know what happened. I think I used the wrong step file.

When I first installed the zpre github repository and tried to run the shell script it said that it couldn't find the "./step_files/zpre_simplified_with_gold.step" file in step_to_h5m_zpre.py. So I change the name to the step file zpre_simplified.step, so I suppose this created the holes in the mesh

I am now trying with the zpre.step file instead to see if this solves the problem

Cheers

El lun, 26 feb 2024 a las 15:52, Erik B Knudsen @.***>) escribió:

I'd think so too - but now I know what I should try to reproduce. Thank you!

— Reply to this email directly, view it on GitHub < https://github.com/openmsr/CAD_to_OpenMC/issues/98#issuecomment-1965360701>,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/BGJOBCQ4BOZY65ETGOCWTLTYVT73DAVCNFSM6AAAAABDVUDUOKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRVGM3DANZQGE>

. You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/openmsr/CAD_to_OpenMC/issues/98#issuecomment-1973874918, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGQ7FF5CTTVR65C56VXUCLYWDQY7AVCNFSM6AAAAABDVUDUOKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZTHA3TIOJRHA . You are receiving this because you commented.Message ID: @.***>

ebknudsen commented 4 months ago

This bug is confirmed on ubuntu 22.04 with python 3.12.

ebknudsen commented 4 months ago

For now it seems required to stay at python < 3.11

victordgehm commented 4 months ago

Ok, thanks for the update.

El lun, 4 de mar de 2024, 9:12 a. m., Erik B Knudsen < @.***> escribió:

For now it seems required to stay at python < 3.11

— Reply to this email directly, view it on GitHub https://github.com/openmsr/CAD_to_OpenMC/issues/98#issuecomment-1976808639, or unsubscribe https://github.com/notifications/unsubscribe-auth/BGJOBCVIAMZHFZQ7KJDVBVLYWSFNFAVCNFSM6AAAAABDVUDUOKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZWHAYDQNRTHE . You are receiving this because you were mentioned.Message ID: @.***>

ebknudsen commented 4 months ago

I will report the nlopt-problem upstream to get it fixed.

ebknudsen commented 3 months ago

The nlopt people are working on it (the python 3.12 issue), and should be very close to completion. I was able to monkeypatch a few files and get it to install on ubuntu+python3.12.