Problem using cgns format mesh file from STAR CCM+ on CS 7.0

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
ximeng
Posts: 27
Joined: Sun Jan 22, 2023 3:28 pm

Problem using cgns format mesh file from STAR CCM+ on CS 7.0

Post by ximeng »

Dear Sir/Madam,

Hope you are well and sorry for bothering you.

I failed to import the .cgns mesh file from STAR CCM+ 2019.3.1 to code_saturne 7.0.1 with CGNS 4.3.0 at the preprocess stage in ARCHER2. The errors are shown as:
"code_saturne run --initialize --param setup.xml --nprocs 128
code_saturne
============
Version: 7.0.1
Path: /mnt/lustre/a2fs-work1/work/y07/shared/apps/core/code_saturne/7.0.1-gcc11
Result directory:
/mnt/lustre/a2fs-work1/work/e01/e01/w25036xk/code_saturne_ueharablocks/blocksall/testblocksall/revisedBetaEDF_LES/RESU/20230808-2245
Copying base setup data
-----------------------
Compiling and linking user-defined functions
--------------------------------------------
Preparing calculation data
--------------------------
Parallel code_saturne on 128 processes.
Preprocessing calculation
-------------------------
Error running the preprocessor.
Check the preprocessor.log file for details.
Error in preprocessing stage.
Error in preprocessing stage.

But the preprocessor.log shows nothing (blank). My case is about the square computational domain including lots simplified building cubes. The mesh is trimmed mesh generated by STAR CCM+ with 0.002m first layer height. The meshes with 0.004m and 0.0025m first layer height run well, while it failed when with 0.002m/0.0022m first layer height. And I also tried mesh with uniform 0.01m base size and uniform 0.005m at lower part, and got the same error. I tried cgnsupdate but didn't work.

Any suggestions would be very appreciated!

Best regards,
Ximeng
Yvan Fournier
Posts: 4152
Joined: Mon Feb 20, 2012 3:25 pm

Re: Problem using cgns format mesh file from STAR CCM+ on CS 7.0

Post by Yvan Fournier »

Hello,

Does the preprocessor work for this install using other file formats ? If the log is empty, I suspect an installation or execution environment/modules issue such that it does not start correctly.

Otherwise, you might have additional messages in the batch output and error logs (I guess you are using a batch system on Archer2).

Best regards

Yvan
ximeng
Posts: 27
Joined: Sun Jan 22, 2023 3:28 pm

Re: Problem using cgns format mesh file from STAR CCM+ on CS 7.0

Post by ximeng »

Hi Yvan,

Thanks for your reply!

For the first question, the preprocessor works for the .cgns format mesh file with 0.004/0.0025m first layer height from the STAR CCM+ 2019.3.1. And I also tried .ccm format but it seems that code_saturne on Archer2 doesn't support this format. The encountered error is as follows:
CGNS 4.3.0 file format support
Reading of compressed files ('.gz') with Zlib 1.2.11
Error in preprocessor execution
===============================
ecs_pre.c:486: Fatal error.
File format "STAR-CCM+" support not available in this
installation (file "/mnt/lustre/a2fs-work1/work/e01/e01/w25036xk/code_saturne_ueharablocks/blocksall/testblocksall/MESH/blocks_Uehara2000_benchmark_noprism_0.002m.ccm").
Call stack
1: 0x40cc9f <ecs_pre__type_format+0x3bf> (cs_preprocess)
2: 0x4080e3 <ecs_cmd__lit_arg+0x2c3> (cs_preprocess)
3: 0x406079 <main+0x39> (cs_preprocess)
4: 0x7f3b522a729d <__libc_start_main+0xef> (libc.so.6)
5: 0x4067ba <_start+0x2a> (cs_preprocess)
End of stack

Besides, If it is due to the installation or execution environment, why the mesh with larger first layer height could be successfully preprocessed. I just changed the first layer height value in the automated mesh setting in STAR CCM+. The current issue is that it operates intermittently, succeeding on occasions but failing for certain other meshes, and it does not provide any errors that would allow me to determine the cause.

For your reference, I have attached the preprocessor.log file obtained from the successful preprocessing of a mesh with a first-layer height of 0.004m.(preprocessor_0.004mfirstLayerHeight_CGNS.log)

In addition, I also tried to export the .cgns format mesh file through STAR CCM+ 2022.1 and it showed messages in preprocessor.log (showed nothing when use STAR CCM+ 2019.3.1) as attached.(preprocessor_exportCGNSfromSTAR2022.log)

Best regards,
Ximeng
Attachments
preprocessor_0.004mfirstLayerHeight_CGNS.log
(7.26 KiB) Downloaded 161 times
preprocessor_exportCGNSfromSTAR2022.log
(3.96 KiB) Downloaded 173 times
Yvan Fournier
Posts: 4152
Joined: Mon Feb 20, 2012 3:25 pm

Re: Problem using cgns format mesh file from STAR CCM+ on CS 7.0

Post by Yvan Fournier »

Hello,

Your issue is probably the same as this one viewtopic.php?f=2&t=3132.

Your file that can be read is in CGNS 3.2 format, the one that fails is in 3.4, and the way CGNS handled forward and backwards compatibility moving from version 3.3 to 3.4.0 back to 3.4.1 was a massive failure.

So you can also try using the cgnsview too to change the format indication from 3.4 to 3.3, and see if that works.

Best regards,

Yvan
ximeng
Posts: 27
Joined: Sun Jan 22, 2023 3:28 pm

Re: Problem using cgns format mesh file from STAR CCM+ on CS 7.0

Post by ximeng »

Hi, Yvan,

Thanks.

I installed cgnsview successfully just now. It showed that my file info is CGNS 3.2.1. But I couldn't find the option to change the CGNS version, and not much introduction in the CGNS website. Also it always frozen in GUI. Does it just need to save as another file (but no place to define the output version), or output using user defined file? Could you give me some suggestion about this? Sorry for the bothering of this simple question. My mesh file is uploaded for reference: https://www.dropbox.com/scl/fi/3yd32fic ... tsgs3&dl=0

Besides, I also tried to use .ccm format mesh file but got the same error as attached.

Best regards,
Ximeng
Attachments
preprocessor_.ccm_meshformat.log
(1.85 KiB) Downloaded 138 times
Yvan Fournier
Posts: 4152
Joined: Mon Feb 20, 2012 3:25 pm

Re: Problem using cgns format mesh file from STAR CCM+ on CS 7.0

Post by Yvan Fournier »

Helllo,

Could you test with a smaller file or provide a smaller test file ? This is good practice in general, unless you can reproduce an issue only on a specific, large case. I can only access Dropbox from my home PC (not connected to a cluster), so 17 Gb is too large by a wide margin...

Best regards,

Yvan
ximeng
Posts: 27
Joined: Sun Jan 22, 2023 3:28 pm

Re: Problem using cgns format mesh file from STAR CCM+ on CS 7.0

Post by ximeng »

Dear Yvan,

Thanks for your help.

I generated a mesh for a smaller computational domain. There is something showing in the preprocessor.log this time. The mesh file and the preprocessor.log are attached.

Besides, I am still not clear about how to change the .cgns version in cgnsview.

Best regards,
Ximeng
Attachments
preprocessor_SmallerFile_onlyCityBlocks.log
(2.18 KiB) Downloaded 131 times
blocks_Uehara2000_noprism_notrippingfence.rar
(7.98 MiB) Downloaded 153 times
Yvan Fournier
Posts: 4152
Joined: Mon Feb 20, 2012 3:25 pm

Re: Problem using cgns format mesh file from STAR CCM+ on CS 7.0

Post by Yvan Fournier »

Hello,

There seem to be an issue with the archive, as I cannot open it even ith CGNS or HDF5 checking tools.

in addition, a 278 Mb CGNS file for an 8 Mb Rar file does not seem to be a realistic compression ratio.
So your file is corrupt.

But the error message in the log says it all. Please read it.

If your CGNS library does not support HDF5 files, use hdf2adf on another machine do do so.
This is not a code _saturne issue.

Best regards,

Yvan
ximeng
Posts: 27
Joined: Sun Jan 22, 2023 3:28 pm

Re: Problem using cgns format mesh file from STAR CCM+ on CS 7.0

Post by ximeng »

Dear Yvan,

Thanks! I have some updates about the previous large mesh in the Dropbox link (actually, all the meshes are generated by the same star ccm+ version and exported by the same way, but got different preprocessor.log results on code_saturne)

I successfully changed the file to version 3.3.0 and 4.3.0 on cgnsview, and inputted them to code_saturne, but unfortunately the same error was encountered. (The original mesh file version shown in the cgnsview is 3.2.1)

“Error running the preprocessor.
Check the preprocessor.log file for details.
Error in preprocessing stage.
Error in preprocessing stage.”

But still nothing is shown in preprocessor.log with Version 3.3.0. The preprocessor.log with version 4.3.0 shown errors like (which is attached):
"Number of vertices : 65670835
SIGSEGV signal (access to forbidden memory area) intercepted !
Call stack
1: 0x40ed53 <> (cs_preprocess)
2: 0x412dc8 <ecs_pre_cgns__lit_maillage+0x1e78> (cs_preprocess)
3: 0x40cf1b <ecs_pre__lit_maillage+0xeb> (cs_preprocess)
4: 0x4060c7 <main+0x87> (cs_preprocess)
5: 0x7f769ef3b29d <__libc_start_main+0xef> (libc.so.6)
6: 0x4067ba <_start+0x2a> (cs_preprocess)
End of stack”

Best regards,
Ximeng
Attachments
preprocessor_CGNSversion4.3.log
(3.58 KiB) Downloaded 151 times
Yvan Fournier
Posts: 4152
Joined: Mon Feb 20, 2012 3:25 pm

Re: Problem using cgns format mesh file from STAR CCM+ on CS 7.0

Post by Yvan Fournier »

Hello,

Could you simply post a small .cgns mesh generated by STAR-CCM+ 2019, without modifying it, so that !i can try to reproduce the error on my side ?

Also, given the error message in one of your previous posts, the problem is probably related to ADF or HFD5 variant support of CGNS. I recommend updating to at least code_saturne bug-fix release 7.0.3 (but 7.0.6 is better) to have automatic switch between the 2 variants.

Best regards,

Yvan
Post Reply