svalinn / Cubit-plugin

Plugins and command extensions for Coreform Cubit
BSD 3-Clause "New" or "Revised" License
17 stars 14 forks source link

removing MACOS version in plugin tarball #121

Closed bam241 closed 3 years ago

bam241 commented 3 years ago

I just tried our most recent macOS tarball (cubit 2021.5), build with MacOS 10.15, on my desktop (MacOS 11.4). it worked just fine.

I think we can assume that those tarball are compatible with virtual all version of MacOS..

therefore I removed the mention of the MacOS used to build it in order to avoid confusing our users.

this should replace #120

shimwell commented 3 years ago

Nice, I believe @AnderGray has also been using the Mac plugin named 10.15 on Mac OS version 11.

AnderGray commented 3 years ago

Yes, the same MacOS 10.15 build worked on my MacOS 11.5. Some problems with the cubit python interface, but not sure if it's plugin's problem. I built it myself and had the same issues.

I could do everything except export dagmc ...

gonuke commented 3 years ago

That's the most important part! What was the failure mode with export dagmc?

bam241 commented 3 years ago

sadly we didn't test the cubit python interface.

what is the error you are experiencing ?

AnderGray commented 3 years ago

Everything works via the gui and journal commands without the gui.

From python when I import and initiate cubit, it correctly finds the plugin:

cubit_path="/Applications/Coreform-Cubit-2021.5.app/Contents/bin/"
import sys
sys.path.append(cubit_path)
import cubit
cubit.init([])

out:

Loaded Svalinn plugin.

                   CCCCC    UU   UU   BBBBBB    IIII   TTTTTT
                  CC   CC   UU   UU   BB   BB    II      TT
                  CC        UU   UU   BB   BB    II      TT
                  CC        UU   UU   BBBBBB     II      TT
                  CC        UU   UU   BB   BB    II      TT
                  CC   CC   UU   UU   BB   BB    II      TT
                   CCCCC     UUUUU    BBBBBB    IIII     TT  tm

                            MESH GENERATION TOOLKIT        
                                      FOR                   
                   PRE-PROCESSING OF FINITE ELEMENT ANALYSES

                 User community mailing list: cubit@sandia.gov   
         Report bugs and enhancement requests to cubit-help@sandia.gov

                         Cubit Version 2021.5 64-Bit Build dbeb1866c9
                               VTK Version 8.2.0
                              ACIS Version 28.0.2.0
                            Exodus API Version 8.03
                            MeshGems Version 2.11-1
                     Copyright 2001-2008 Sandia Corporation
              Revised Thu May 27 13:08:31 2021 -0600
                        Running 08/23/2021 09:47:44 AM

                 CUBIT includes MeshGems by Distene S.A.S.
                  CUBIT includes ACIS software by Spatial Inc.
                  CUBIT includes LP Solve by Michel Berkelaar.
                       CUBIT includes VTK by Kitware Inc.
           CUBIT includes Exodus II, based on netCDF by UCAR/Unidata.
            CUBIT includes VERDICT, by Sandia National Laboratories.
          CUBIT includes MESQUITE, by Argonne National Laboratory and
                         Sandia National Laboratories.

Machine type is Darwin 20.6.0
Machine name is Anders-MacBook-Pro-6.local
Working Directory: /Users/akgray/Documents/pystuff/cad_to_h5m/examples/

Commands will be journaled to '/Users/akgray/Documents/pystuff/cad_to_h5m/examples/cubit16.jou'
-- DAGMC export command available.
-- iGeom_test command available.
-- MCNP import command available.

I can also use the plugin's help, although the output is printed twice:

cubit.cmd('help dagmc')

out:

Help for words: dagmc.

export dagmc <filename> [faceting_tolerance <faceting tolerance>] [length_tolerance <length tolerance>]
     [normal_tolerance <normal tolerance>] [make_watertight] [verbose]
     [fatal_on_curves]

Help for words: dagmc.

export dagmc <filename> [faceting_tolerance <faceting tolerance>] [length_tolerance <length tolerance>]
     [normal_tolerance <normal tolerance>] [make_watertight] [verbose]
     [fatal_on_curves]

However when I try to export dagmc, I'm told it's not a valid export:

[2021-08-23 09:47:03.379] [error] Could not export the data to a file.

ERROR: <stdin>, line 50. Could not export the data to a file.
[2021-08-23 09:47:03.379] [error] dagmc is not a valid type of file to be exported.
Enter 'help export' for the allowable types of file.

ERROR: <stdin>, line 50. dagmc is not a valid type of file to be exported.
Enter 'help export' for the allowable types of file.
Out[3]: ' "dagmc.h5m'

Note I'm using python 3.9, since the 2021.5 Cubit on MacOS is only shipped with python 3.9.

shimwell commented 3 years ago

I have a minimalistic python script for checking the export of h5m files using the cubit python API if this is any help.

gonuke commented 3 years ago

In a recent dialog with another user, we discovered that it is necessary to enclose the file name in quotes for a new file. Could this be the problem?

gonuke commented 3 years ago

Also, you say that everything works with the journal commands, but that export dagmc doesn't work.

Does export dagmc work with journal commands, but not python? Or does it fail in both cases?

AnderGray commented 3 years ago

export dagmc was working from journal commands, but not from python.

Putting the filename in quotes like you suggested worked!

Cheers!

gonuke commented 3 years ago

Thanks for this change @bam241