Skip to content
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

Improving connection commands testing #2311

Merged
merged 14 commits into from
Sep 11, 2023
Merged

Improving connection commands testing #2311

merged 14 commits into from
Sep 11, 2023

Conversation

germa89
Copy link
Collaborator

@germa89 germa89 commented Sep 5, 2023

Wrapping connection commands to upload the file
Adding tests

@germa89 germa89 self-assigned this Sep 5, 2023
@germa89 germa89 added the Enhancement Improve any current implemented feature label Sep 5, 2023
@github-actions github-actions bot added the CI/CD Related with CICD, Github Actions, etc label Sep 5, 2023
@germa89
Copy link
Collaborator Author

germa89 commented Sep 6, 2023

Locally

Locally (Windows 11, MAPDL v22.2) only the CADs Catia and Parasolid (x_t) fails.

CICD

In the CICD it seems a different story, maybe the docker images do not include the tools (executables) to convert those CAD formats.

v23.2 and newer

We get the following error:

========================= PyMAPDL Pytest short summary =========================
[FAILED] test_readin_sat - E                     Specified library does not exist.
[FAILED] test_readin_catiav5 - E           Ignore these messages by setting 'ignore_errors'=True
[FAILED] test_readin_x_t - E                     Specified library does not exist.

SAT files

test_readin_sat's Specified library does not exist. error is:

 raise MapdlRuntimeError(
                        f"\n\nError in instance {self.name}\n\n" + error_message
                    )
E                   ansys.mapdl.core.errors.MapdlRuntimeError: 
E                   
E                   Error in instance GRPC_127.0.0.1:21000
E                   
E                   *** ERROR ***                           CP =       0.000   TIME= 00:00:00
E                    An error was detected while operating on a shared library:              
E                     PATH = /ansys_inc/ansys/lib/linx64/libac4.so                           
E                     CMD = ~SATIN                                                           
E                     FNC = AnsysConnectCad                                                  
E                     Specified library does not exist.

Solution in the following CAD format.

Parasolid (x_t)

test_readin_x_t one is:

>                   raise MapdlRuntimeError(
                        f"\n\nError in instance {self.name}\n\n" + error_message
                    )
E                   ansys.mapdl.core.errors.MapdlRuntimeError: 
E                   
E                   Error in instance GRPC_127.0.0.1:21000
E                   
E                   *** ERROR ***                           CP =       0.000   TIME= 00:00:00
E                    An error was detected while operating on a shared library:              
E                     PATH = /ansys_inc/ansys/lib/linx64/libac4.so                           
E                     CMD = ~PARAIN                                                          
E                     FNC = AnsysConnectCad                                                  
E                     Specified library does not exist.

It seems the missing library libac4.so is only 59 kb... (on windows) so I think we should get it back in the docker images.

Catia

The error is different:


>           raise MapdlInvalidRoutineError(text)
E           ansys.mapdl.core.errors.MapdlInvalidRoutineError: *** WARNING ***                         CP =       0.000   TIME= 00:00:00
E            ~CAT5IN is not a recognized BEGIN command, abbreviation, or macro.      
E            
E           
E           Ignore these messages by setting 'ignore_errors'=True

However, that command should work as BEGIN command (it does with the full local installation).
So I think the Catia converter command is loaded dynamically (or sort of). If the library is not available, the command is not loaded. I do not know the size of the missing library in this case. Maybe is it the same library as the above?

I will need some confirmation on this @koubaa @kmkoshy @FredAns

In 23.1 and older

I could only test 23.1 but I will do also older versions later.

SAT

It is read, but probably no geometry is read in. For some reason, no error is catch. Maybe I'm only skipping volumes? Pinging @mikerife

Parasolid (x_t)

The conversion seems to fail File file.anf does not exist.:

>           raise MapdlCommandIgnoredError(text)
E           ansys.mapdl.core.errors.MapdlCommandIgnoredError: QUERY = COMMON,,IGES_TOL,,INT,5
E             
E               ANSYS Connection for Parasolid 
E             
E                 Part name:   ''/.
E                 Output file: .anf
E                 Entities:    SOLIDS
E                 File type:   ANF
E             
E            Failed to open ''/..x_t for reading
E           
E            *** WARNING ***                         CP =       0.000   TIME= 00:00:00
E            File file.anf does not exist.                                           
E             The /INPUT command is ignored.                                         
E           
E           
E            ***** ROUTINE COMPLETED *****  CP =         0.000
E           
E           
E              *****MAPDL VERIFICATION RUN ONLY*****
E                DO NOT USE RESULTS FOR PRODUCTION
E           
E                     ***** MAPDL ANALYSIS DEFINITION (PREP7) *****
E           
E           Ignore these messages by setting 'ignore_errors'=True

Maybe the configuration is not correct?? Pinging @mikerife for feedback.

Catia

Same as v23.1 and above. Command is missing.

Final decision

Do we want to include those tools to convert CADs in the MAPDL images? I guess we should.... Pinging @koubaa @dts12263 @mikerife for feedback.

@germa89 germa89 requested a review from koubaa September 6, 2023 11:30
@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Merging #2311 (0e167e7) into main (a2d1951) will increase coverage by 0.23%.
Report is 1 commits behind head on main.
The diff coverage is 95.16%.

@@            Coverage Diff             @@
##             main    #2311      +/-   ##
==========================================
+ Coverage   81.79%   82.02%   +0.23%     
==========================================
  Files          45       45              
  Lines        8435     8464      +29     
==========================================
+ Hits         6899     6943      +44     
+ Misses       1536     1521      -15     

@koubaa
Copy link
Contributor

koubaa commented Sep 6, 2023

Do we want to include those tools to convert CADs in the MAPDL images?

Maybe we can have two tiers of images, one "full" and one "minimal", and run most tests on minimal but a small set of tests on the full one. The minimal one could be much smaller (no mumps, no plugins, etc)

@germa89
Copy link
Collaborator Author

germa89 commented Sep 6, 2023

Do we want to include those tools to convert CADs in the MAPDL images?

Maybe we can have two tiers of images, one "full" and one "minimal", and run most tests on minimal but a small set of tests on the full one. The minimal one could be much smaller (no mumps, no plugins, etc)

This is interesting. Let's see what @dts12263 thinks

@germa89
Copy link
Collaborator Author

germa89 commented Sep 6, 2023

This PR has been totally defeated.... I end up introducing tests that fail consistently.

Hopefully in the future I can fix some. I will need to do changes in the docker containers.

@germa89 germa89 marked this pull request as ready for review September 11, 2023 16:29
@germa89 germa89 enabled auto-merge (squash) September 11, 2023 16:29
@germa89
Copy link
Collaborator Author

germa89 commented Sep 11, 2023

LGTM.

Copy link
Collaborator

@pyansys-ci-bot pyansys-ci-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approving this PR because germa89 said so in here 😬

@germa89 germa89 changed the title Improving connection commands Improving connection commands testing Sep 11, 2023
@germa89 germa89 merged commit d2d5c61 into main Sep 11, 2023
24 checks passed
@germa89 germa89 deleted the ci/adding-satin-test branch September 11, 2023 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Related with CICD, Github Actions, etc Enhancement Improve any current implemented feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants