Mesh error cgns

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
knewlands

Mesh error cgns

Post by knewlands »

Hello,

As requested, I am re-posting my question on this new forum (my apologies for using the old one, I wasn't aware of this new one).

As I mentioned, I'm having some trouble with my mesh producing an error in Code_Saturne. I have generated the mesh in Icem CFD v14 and saved the output file as .cgns with the following options under "Write input":

- Create default BC patches: Yes

- Entities to use for BC patch: Face elements

- Create bar and node elements: No

- CGNS file output version: 3.1 ADF

Since my installation of Code_Saturne has been compiled with cgnslib-2.5.4, I then open the file in cgnsview v3.1.3 and change the version to 2.5. However, when I upload the mesh into Code_Saturne and check it, I obtain the following error:


Error in ECS execution

======================

ecs_pre_cgns.c:389: Fatal error.

CGNS error:

CGNS file 0 is not open

Call stack

1: 0x7fcc01020b0b (libbft.so.1)

2: 0x410b55 (cs_preprocess)

3: 0x40b90d (cs_preprocess)

4: 0x408075 (cs_preprocess)

5: 0x7fcbffdbaeff (libc.so.6)

6: 0x403359 (cs_preprocess)

End of stack



Apparently there are issues with my installation, any suggestions on how I could fix it?

Thank you,

Kristin
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: Mesh error cgns

Post by Yvan Fournier »

Hello,

CGNS 3.1 is not backwards-compatible (it can read CGNS 2.5, but 2.5 cannot read 3.1), so you need to install Code_Saturne using CGNS 3.1 and not 2.5.

You seem to have CGNS 3.1.3 installed (as you have cgnsview v3.1.3), so you simply need to recompile your installation of Code_Saturne with that version.

Also, Linux distributions often package CGNS with only HDF5 support, and not ADF support, while ICEM uses the ADF backend. If you built CGNS (manually or with the installer), you should usually have both, but for a packaged version, you need to use the adf2hdf tool on your file so that it will be read correctly.

Changing version numbers with cgnsview is dangerous, as some element type numbers were changed between CGNS versions 2.5 and 3.0, then reverted back from 3.0 to 3.1. ICEM 12 and 13 "cheeted" on the CGNS version number, and editing it with cgnsview was the solution, but this bug seems fixed in ICEM 14, so yo ushould neot need (and preferably avoid) that extra step.

Best regards,

Yvan
knewlands

Re: Mesh error cgns

Post by knewlands »

Hello,

I'm afraid to say that, having reinstalled Code_Saturne with cgns 3.1.3, I still get errors when checking the mesh in the code.

Initially, I obtain the same error as above (CGNS file 0 is not open). According to a previous post this could be due to my cgns build only handling HDF5-based cgns files and not ADF based files, therefore I tried running the adf2hdf converter to make the file readable. The new error I obtain from this reads "no CGNS base in file".

As advised above, I did not change the version to 2.5 in cgnsview, but I checked the mesh and it reports the error "element connectivity incorrectly defined".

I'm not sure why I get these errors and I would really appreciate any help on the matter as I desperately need to get the simulations running.

Thank you,

Kristin
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: Mesh error cgns

Post by Yvan Fournier »

Hello,

If you could generate a very small CGNS mesh with which you have this error and post it here, I could try to reproduce the error (so I could determine whether we have a bug, if there is a workaround, or whether you have an installation issue).

Best regards,

Yvan
knewlands

Re: Mesh error cgns

Post by knewlands »

Hello Yvan,

I have attached a very basic cgns mesh which currently produces the error "cgns file 0 is not open". If I run the adf2hdf converter I obtain the "no cgns base in file" error.

I hope this helps assess the cause of the error, but please let me know if you require anything else.

Thank you,

Kristin
Attachments
test.cgns.tar.gz
(165.53 KiB) Downloaded 411 times
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: Mesh error cgns

Post by Yvan Fournier »

Hello,

I can read your mesh perfectly well with our install, as you can see from the attached log.

You forgot to mention which version of the code you are using (an I forgot to ask), but from the message you had (which mentioned ECS and not Preprocessor), I assume it is version 2.0.
In this case, CGNS is used by the ECS (preprocessor) library for input, and FVM library for output.

So when you reinstalled the code, did you reinstall those, or just the Kernel ? Do you have an install log, or at least the log file from the Preprocessor, to check if CGNS 3.1 is really used ?

Regards,

Yvan
Attachments
preprocessor.log.gz
(1.92 KiB) Downloaded 430 times
knewlands

Re: Mesh error cgns

Post by knewlands »

Hello Yvan,

It's good to know that at least the mesh can be read on your install.

I was using v2.0.1 before and, in an effort to solve previous errors, I upgraded to version 2.0.5 of the code, for which I have attached the installation log.

I have also included the preprocessor log obtained when using the gui and it still seems to be referring to ECS v2.0.0-rc1 and CGNS 2.5.4. When I tried to check the mesh without using the gui it quotes ECS v2.0.1 and CGNS 2.5.4, so no CGNS 3.1.3 as in your file.

Does this mean the problem is due to my installation?

Thank you,

Kristin
Attachments
log files.tar.gz
(80.68 KiB) Downloaded 424 times
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: Mesh error cgns

Post by Yvan Fournier »

Hello,

Yes, the problem seems to be due to your installation, but should still not happen. If you can also post the /home/r01ken0/Code_Saturne/v2.0.5/installer/ncs-2.0.5.build/config.log I would be interested.

If you can remove the version of the preprocessor version 2.0-rc1 that is in you default path (/usr/bin/cs_preprocess) and reinstall the code, your problem should disappear.

I do not know if that version (2.0-rc1) was installed using the installer or as a Debian package (the /usr instead of /usr/local suggests a package), but if it is a package, removing that package should be enough (though you may still need to reinstall the code after that).
Stil, I am interested in you config.log to determine why the search path for the preprocessor was not forced to that of the new version.

Best regards,

Yvan
knewlands

Re: Mesh error cgns

Post by knewlands »

Hello Yvan,

Thank you for your help in identifying the source of the error. I have attached the config.log file, as you requested. I hope this helps for the future.

Kind regards,

Kristin
Attachments
config.log.tar.gz
(13.94 KiB) Downloaded 400 times
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: Mesh error cgns

Post by Yvan Fournier »

Hello,

The value I wanted to check in the config.log was correct (ecs_bindir='/home/r01ken0/Code_Saturne/v2.0.5/cs-2.0/bin'), so it is surprising that the wrong cs_preprocess was used.

I am starting to suspect that in your case, even the GUI was not the correct version, but was version 2.0-rc1 (you can see this in the "about" box of the GUI, or when it is starting).

Best regards,

Yvan
Post Reply