Hi Junting,

I have succeeded to use the latest pyfr and CGNS3.4.0 to import both 
yf17.cgns.gz <http://cgns.github.io/CGNSFiles/Bruce/yf17_hdf5.cgns.gz> and 
yf17_hdf5.cgns.gz <http://cgns.github.io/CGNSFiles/Bruce/yf17_hdf5.cgns.gz>.
So, I would recommend to build and install from the source using cmake:
$ git clone https://github.com/CGNS/CGNS.git
$ cd CGNS
$ mkdir build
$ cd build
$ cmake ..
$ ccmake .
Then, followings are what I set. I have once experienced enabling 64bit 
caused error in CGNS3.3.0, so I have turned it off (but not sure if it's ok 
now).
CGNS_BUILD_CGNSTOOLS             ON                                        
                                         
 CGNS_BUILD_SHARED                ON                                        
                                         
 CGNS_BUILD_TESTING               OFF                                      
                                          
 CGNS_ENABLE_64BIT                OFF                                      
                                          
 CGNS_ENABLE_BASE_SCOPE           OFF                                      
                                          
 CGNS_ENABLE_FORTRAN              OFF                                      
                                          
 CGNS_ENABLE_HDF5                 ON                                        
                                         
 CGNS_ENABLE_LEGACY               OFF                                      
                                          
 CGNS_ENABLE_MEM_DEBUG            OFF                                      
                                          
 CGNS_ENABLE_SCOPING              OFF                                      
                                          
 CGNS_ENABLE_TESTS                OFF                                      
                                          
 CGNS_USE_SHARED                  ON                                        
                                         
 CMAKE_BUILD_TYPE                 Release                                  
                                          
 CMAKE_INSTALL_PREFIX             /data/home/yoshiaki/local/CGNS/build      
                                         
 HDF5_C_LIBRARY_dl                /usr/lib64/libdl.so                      
                                          
 HDF5_C_LIBRARY_hdf5              /usr/lib64/libhdf5.so                    
                                          
 HDF5_C_LIBRARY_m                 /usr/lib64/libm.so                        
                                         
 HDF5_C_LIBRARY_sz                /usr/lib64/libsz.so                      
                                          
 HDF5_C_LIBRARY_z                 /usr/lib64/libz.so                        
                                         
 HDF5_NEED_MPI                    OFF                                      
                                          
 HDF5_NEED_SZIP                   OFF                                      
                                          
 HDF5_NEED_ZLIB                   OFF      
Then, export LD_LIBRARY_PATH=the path to libcgns.so, and install pyfr.
Note that it is also important to appropriately link HDF5 library in 
libcgns.so, which is discussed in the following thread:
https://groups.google.com/d/msg/pyfrmailinglist/qp5r3nlsONQ/4YzHuyGwEQAJ

I hope it helps you.

Regards,
Yoshiaki


2020年1月23日木曜日 6時57分12秒 UTC+9 Junting Chen:
>
> hello, when trying to import a CGNS mesh (YF-17 from cgns website), I am 
> getting:
>
> jrcc@bilbo:/data/projects/JrcC/pyfr/cgns_test$ pyfr import yf17.cgns 
> qqq.pyfrm
> Traceback (most recent call last):
>   File 
> "/home/jrcc/.local/lib/python3.6/site-packages/pyfr/readers/cgns.py", line 
> 114, in _errcheck
>     raise self._statuses[status]
> KeyError: 1
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File "/usr/local/bin/pyfr", line 11, in <module>
>     load_entry_point('pyfr==1.9.0', 'console_scripts', 'pyfr')()
>   File "/home/jrcc/.local/lib/python3.6/site-packages/pyfr/__main__.py", 
> line 110, in main
>     args.process(args)
>   File "/home/jrcc/.local/lib/python3.6/site-packages/pyfr/__main__.py", 
> line 121, in process_import
>     reader = get_reader_by_extn(extn, args.inmesh)
>   File 
> "/home/jrcc/.local/lib/python3.6/site-packages/pyfr/readers/__init__.py", 
> line 19, in get_reader_by_extn
>     return reader_map[extn](*args, **kwargs)
>   File 
> "/home/jrcc/.local/lib/python3.6/site-packages/pyfr/readers/cgns.py", line 
> 375, in __init__
>     self._file = file = cgns.open(msh.name)
>   File 
> "/home/jrcc/.local/lib/python3.6/site-packages/pyfr/readers/cgns.py", line 
> 120, in open
>     self.lib.cg_open(bytes(name, 'utf-8'), self.CG_MODE_READ, file)
>   File 
> "/home/jrcc/.local/lib/python3.6/site-packages/pyfr/readers/cgns.py", line 
> 116, in _errcheck
>     raise CGNSError
> pyfr.readers.cgns.CGNSError
>
>
> I have CGNS 3.4 installed, also created a path variable PYFR_LIBRARY_PATH 
> and link to libcgns.so. Previously, it was complaining libcgns.so not found.
>
> Thanks in advance!
>
> Junting Chen
>

-- 
You received this message because you are subscribed to the Google Groups "PyFR 
Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/pyfrmailinglist/96974328-9a2a-4087-8a49-d85ff42c3de3%40googlegroups.com.

Reply via email to