Installing cubit-plug in on macOS

Hi Forum,
New OpenMC/Cubit user here. I am trying to install the cubit-plug in following the instruction Releases · svalinn/Cubit-plugin · GitHub. The uncompressed “svalinn-plugin_macos_cubit_2022.4.tgz” is shown in the figure below:

Can anyone tell me where to put those files in the cubit folder on MacOS? I tried several possible options but still cannot run “help dagmc”.

Also, do I need to install dagmc as well to run the plugin?

Plugin version: 0.2.4
Coreform-cubit version: 2022.04
Mac OS version: 12.5

Thank you very much!

Hi Wxinyan

Thanks for posting

On the GitHub repo for the Cubit plugin we have some commands for ubuntu which I would guess are similar for mac.

    wget https://github.com/svalinn/Cubit-plugin/releases/download/0.1.0/svalinn-plugin_ubuntu-20.04_cubit_2021.5.tgz
    sudo tar -xzvf svalinn-plugin_ubuntu-20.04_cubit_2021.5.tgz -C /opt/Coreform-Cubit-2021.5

You don’t actually need DAGMC installed to make DAGMC geometry using Cubit with the Plugin installed. You would need DAGMC installed to transport particles on that geometry. DAGMC is now available by default with the OpenMC Conda package and is installed automatically along side with conda install -c conda-forge openmc

There are other alternatives besides Cubit for creating DAGMC geometry listed on the DAGMC discussions forum

1 Like

Hi Shimwell,
Thank you for your patient reply.

  1. For cubit-plugin, I found that the plug in can be installed for version 2022.04 successfully. “help dagmc” works properly on 22.04. However, when I try to use "export dagmc ‘xxx.h’ ", cubit just quits. I tried to install it on a ubuntu virtual machine on mac, and the same thing happened.
  2. Thank you for pointing out other tools. I found that cad-to-dagmc is an interesting one. (Cad-to-h5m also looks great, but it seems it does not support multiple materials for a single cad file). However, when I tried to install the cad-to-dagmc on either Mac OS or ubuntu virtual machine, I got the following error. Do you have any idea what could be the cause by any chance?

    Xinyan

Interesting screenshot thanks for posting. I took a look at the available conda packages for cad-to-dagmc I see I’m distributing it on osx-64 but have never tried osx-arm64 I guess you have one of the newer Macs.

I can look into making a release for that OS. It will require all the dependencies and CI to support that chip and I’m not sure if everything is osx-arm ready yet. I shall report back when I have some progress.

In the meantime you could try installing the dependencies and pip installing cad-to-dagmc

1 Like

Hello Shimwell,
Sorry for the late response. I successfully installed the cad_to_dagmc on a x86 linux virtual machine and generated a dagmc.h5m file. However, I haven’t got a chance to test it due to the unavailability of our servers recently. I will keep you update once I have some results.
Happy new year!
Xinyan

1 Like

Thanks Xinyan

Glad you got it working. The main dependency for cad_to_dagmc is cadquery and unfortunately that currently does not support the new Apple chips either.

Looking forward to seeing if your h5m files work.

2 Likes

I am also on macOS / new Apple M1 computer, and having the same issues. :frowning_face:

There is now another option as very recently the pip install for cadquery moved from pre to general release

Could you try

Conda install -c conda-forge moab
Conda install -c conda-forge gmsh
Conda install -c conda-forge python-gmsh
Pip install cadquery
Pip install cad_to_dagmc

Thanks @Shimwell! There is some progress – as in, I’m seeing a new error. When I try to import cadquery in python, I get the following message:

Any advice?

Sorry to hear that

The install instructions for cadquery via pip are here and they do mention python 3.8 to python 3.10 are the only versions supported. I see that you have python 3.11 so this might be the issue.

However I think this might be better answered over on the cadquery forum were all the experts on cadquery are

1 Like

Noted. I’ll try to change the python version first, and if that doesn’t solve the issue, I’ll move over to the cadquery forum. Thanks for your quick response! :smile: