What is the build option requirement of CGNS for pyfr 1.5.0?

295 views
Skip to first unread message

CatDog

unread,
Jan 12, 2017, 9:24:47 AM1/12/17
to PyFR Mailing List
I am running into some confusions about the CGNS lib. 
The CGNS 3.3.0 is too much newer than my CentOS 6. So I have to compile it with hdf5 (and szip, I am not sure if it is necessary). However, after that, when I tried to import CGNS grid.

wget  http://cgns.sourceforge.net/CGNSFiles/Chris/bump.cgns.gz
gunzip bump
.cgns.gz
pyfr
import -t cgns bump.cgns bump.pyfrm

I got this error:

Traceback (most recent call last):
 
File "/op/anaconda3/lib/python3.5/site-packages/pyfr-1.5.0-py3.5.egg/pyfr/ctypesutil.py", line 22, in load_library
 
File "/op/anaconda3/lib/python3.5/ctypes/__init__.py", line 347, in __init__
   
self._handle = _dlopen(self._name, mode)
OSError: /usr/local/lib/libcgns.so: undefined symbol: H5T_NATIVE_SCHAR_g


During handling of the above exception, another exception occurred:


Traceback (most recent call last):
 
File "/op/anaconda3/bin/pyfr", line 11, in <module>
    load_entry_point
('pyfr==1.5.0', 'console_scripts', 'pyfr')()
 
File "/op/anaconda3/lib/python3.5/site-packages/pyfr-1.5.0-py3.5.egg/pyfr/__main__.py", line 110, in main
 
File "/op/anaconda3/lib/python3.5/site-packages/pyfr-1.5.0-py3.5.egg/pyfr/__main__.py", line 118, in process_import
 
File "/op/anaconda3/lib/python3.5/site-packages/pyfr-1.5.0-py3.5.egg/pyfr/readers/__init__.py", line 11, in get_reader_by_name
 
File "/op/anaconda3/lib/python3.5/site-packages/pyfr-1.5.0-py3.5.egg/pyfr/readers/cgns.py", line 374, in __init__
 
File "/op/anaconda3/lib/python3.5/site-packages/pyfr-1.5.0-py3.5.egg/pyfr/readers/cgns.py", line 34, in __init__
 
File "/op/anaconda3/lib/python3.5/site-packages/pyfr-1.5.0-py3.5.egg/pyfr/ctypesutil.py", line 31, in load_library
OSError: Unable to load cgns

I googled "H5T_NATIVE_SCHAR_g", and I found the description at H5T: Datatype Interface. It seems a fundamental part of hdf5.

My compilation of CGNS is as follows:
#szip
wget https
://support.hdfgroup.org/ftp/lib-external/szip/2.1/src/szip-2.1.tar.gz
tar xf szip
-2.1.tar.gz
cd szip
-2.1
./configure --prefix=/usr/local
make
make install
cd


#hdf5
wget
-b https://support.hdfgroup.org/ftp/HDF5/current18/src/hdf5-1.8.18.tar
tar xf hdf5
-1.8.18.tar
cd hdf5
-1.8.18
./configure --prefix=/usr/local --enable-parallel --with-szlib
make
make install
cd


#CGNS
wget https
://github.com/CGNS/CGNS/archive/v3.3.0.tar.gz
tar xf v3
.3.0.tar.gz
cd CGNS
-3.3.0/src
export FC=gfortran
export FCFLAGS=-fPIC
#"--with-hdf5=/usr/local" in order to avoid "-I" flag.
./configure --prefix=/usr/local --with-mpi --with-szip --with-hdf5=/usr/local --enable-64bit --enable-shared=all --enable-parallel
make
make install
cd

I am using GCC 4.9.2 and CentOS 6 with OpenMPI
[root@localhost cgns_file]# mpicc --version
gcc
(GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty
; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


[root@localhost cgns_file]# uname -a
Linux localhost.localdomain 2.6.32-042stab120.11 #1 SMP Wed Nov 16 12:05:45 MSK 2016 x86_64 x86_64 x86_64 GNU/Linux

[root@localhost cgns_file]# mpiexec --version
mpiexec (OpenRTE) 2.0.1


Additionally, I want to know how important the threadsafety is to pyfr when I need to use OpenMP? I found there is an threadsafety configure option in HDF5 but I did not select it.

CatDog

unread,
Jan 12, 2017, 7:28:52 PM1/12/17
to PyFR Mailing List
I just found the following phenomena:


[root@localhost cgns_file]# nm -g /usr/local/lib/libcgns.so
nm
: /usr/local/lib/libcgns.so: no symbols
[root@localhost cgns_file]# nm -gC /usr/local/lib/libcgns.so
nm
: /usr/local/lib/libcgns.so: no symbols
[root@localhost cgns_file]# objdump -T /usr/local/lib/libcgns.so


/usr/local/lib/libcgns.so:     file format elf64-x86-64


DYNAMIC SYMBOL TABLE
:
0000000000017848 l    d  .init  0000000000000000              .init
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.3   __ctype_toupper_loc
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.2.5 getenv
0000000000000000      D  *UND*  0000000000000000              H5T_NATIVE_SCHAR_g
0000000000000000      D  *UND*  0000000000000000              H5Tget_native_type
0000000000000000      D  *UND*  0000000000000000              ompi_mpi_comm_world
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.2.5 free
0000000000000000      D  *UND*  0000000000000000              H5Pset_link_creation_order
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.2.5 putchar
0000000000000000      D  *UND*  0000000000000000              H5Sget_simple_extent_npoints
0000000000000000      D  *UND*  0000000000000000              H5Fget_access_plist
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.2.5 __errno_location
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.2.5 unlink
0000000000000000      D  *UND*  0000000000000000              H5T_IEEE_F64LE_g
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.2.5 strncpy
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.2.5 strncmp
0000000000000000  w   D  *UND*  0000000000000000              _ITM_deregisterTMCloneTable
0000000000000000      DO *UND*  0000000000000000  GLIBC_2.2.5 stdout
0000000000000000      D  *UND*  0000000000000000              H5Tcopy
0000000000000000      D  *UND*  0000000000000000              H5Fopen
0000000000000000      D  *UND*  0000000000000000              H5Gunlink
0000000000000000      D  *UND*  0000000000000000              H5Awrite
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.2.5 strcpy
...


Because there are two errors, I am not sure which one is the essential one, the OSError: Unable to load cgns or OSError: /usr/local/lib/libcgns.so: undefined symbol: H5T_NATIVE_SCHAR_g ?

CatDog

unread,
Jan 12, 2017, 7:33:05 PM1/12/17
to PyFR Mailing List
And I think the libcgns.so is definitely compiled from the source code, no pollution or ambiguity

[root@localhost cgns_file]# ll ` find / -name libcgns.so`
-rwxr-xr-x 1 root root 715136 Jan 12 08:30 /root/CGNS-3.3.0/lib/libcgns.so
-rw-r--r-- 1 root root 715136 Jan 12 08:27 /usr/local/lib/libcgns.so





On Thursday, January 12, 2017 at 10:24:47 PM UTC+8, CatDog wrote:

CatDog

unread,
Jan 12, 2017, 8:08:21 PM1/12/17
to PyFR Mailing List
just found a permission problem, however, it seems irrelevant

[root@localhost cgns_file]# ldd /usr/local/lib/libcgns.so
ldd
: warning: you do not have execution permission for `/usr/local/lib/libcgns.so'
        linux-vdso.so.1 =>  (0x00007ffea41fc000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f7a8fbdc000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f7a90241000)
[root@localhost cgns_file]# cd /usr/local/lib
[root@localhost lib]#
chmod 755 libcgns.so
[root@localhost lib]# cd ~/cgns_file/
[root@localhost cgns_file]# pyfr import -t cgns bump.cgns bump.pyfrm

Traceback (most recent call last):
  File "/op/anaconda3/lib/python3.5/site-packages/pyfr-1.5.0-py3.5.egg/pyfr/ctypesutil.py", line 22, in load_library
  File "/op/anaconda3/lib/python3.5/ctypes/__init__.py", line 347, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /usr/local/lib/libcgns.so: undefined symbol: H5T_NATIVE_SCHAR_g


During handling of the above exception, another exception occurred:


Traceback (most recent call last):
  File "/op/anaconda3/bin/pyfr", line 11, in <module>
    load_entry_point('pyfr==1.5.0', 'console_scripts', 'pyfr')()
  File "/op/anaconda3/lib/python3.5/site-packages/pyfr-1.5.0-py3.5.egg/pyfr/__main__.py", line 110, in main
  File "/op/anaconda3/lib/python3.5/site-packages/pyfr-1.5.0-py3.5.egg/pyfr/__main__.py", line 118, in process_import
  File "/op/anaconda3/lib/python3.5/site-packages/pyfr-1.5.0-py3.5.egg/pyfr/readers/__init__.py", line 11, in get_reader_by_name
  File "/op/anaconda3/lib/python3.5/site-packages/pyfr-1.5.0-py3.5.egg/pyfr/readers/cgns.py", line 374, in __init__
  File "/op/anaconda3/lib/python3.5/site-packages/pyfr-1.5.0-py3.5.egg/pyfr/readers/cgns.py", line 34, in __init__
  File "/op/anaconda3/lib/python3.5/site-packages/pyfr-1.5.0-py3.5.egg/pyfr/ctypesutil.py", line 31, in load_library
OSError: Unable to load cgns

On Thursday, January 12, 2017 at 10:24:47 PM UTC+8, CatDog wrote:

CatDog

unread,
Jan 12, 2017, 8:21:26 PM1/12/17
to PyFR Mailing List
It seems a compatibility problem about ctypes.CDLL and libcgns.so , I looked into the pyfr/ctypesutil.py, and test the following code in python

In [5]: ctypes.CDLL(r'/usr/local/lib/libhdf5.so')
Out[5]: <CDLL '/usr/local/lib/libhdf5.so', handle 153eb00 at 0x7fd343597518>


In [6]: ctypes.CDLL(r'/usr/local/lib/libcgns.so')
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-6-5d5a10f71ece> in <module>()
----> 1 ctypes.CDLL(r'/usr/local/lib/libcgns.so')


/op/anaconda3/lib/python3.5/ctypes/__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error)
   
345
   
346         if handle is None:
--> 347             self._handle = _dlopen(self._name, mode)
   
348         else:
   
349             self._handle = handle


OSError: /usr/local/lib/libcgns.so: undefined symbol: H5T_NATIVE_SCHAR_g

On Thursday, January 12, 2017 at 10:24:47 PM UTC+8, CatDog wrote:

CatDog

unread,
Jan 12, 2017, 8:44:00 PM1/12/17
to PyFR Mailing List
What is strip used for? It seems used to delete symbols. Here is the make output of my configuration:

mkdir lib
mpicc
-O2  -fPIC  -I.  -DBUILD_HDF5 -DBUILD_PARALLEL -o lib/cgns_error.o -c cgns_error.c
mpicc
-O2  -fPIC  -I.  -DBUILD_HDF5 -DBUILD_PARALLEL -I/usr/local/include -o lib/cgns_internals.o -c cgns_internals.c
mpicc
-O2  -fPIC  -I.  -DBUILD_HDF5 -DBUILD_PARALLEL -o lib/cgns_io.o -c cgns_io.c
mpicc
-O2  -fPIC  -I.  -DBUILD_HDF5 -DBUILD_PARALLEL -I/usr/local/include -I/usr/include -o lib/cgnslib.o -c cgnslib.c
gfortran
-O2 -fPIC  -I.  -DBUILD_HDF5 -DBUILD_PARALLEL -o lib/cgns_f.o -c cgns_f.F90
mpicc
-O2  -fPIC  -I.  -DBUILD_HDF5 -DBUILD_PARALLEL -Iadfh -I/usr/local/include -I/usr/include -o lib/ADFH.o -c adfh/ADFH.c
mpicc
-O2  -fPIC  -I.  -DBUILD_HDF5 -DBUILD_PARALLEL -I/usr/local/include -I/usr/include -o lib/pcgnslib.o -c pcgnslib.c
mpicc
-O2  -fPIC  -I.  -DBUILD_HDF5 -DBUILD_PARALLEL -Iadf -o lib/ADF_interface.o -c adf/ADF_interface.c
mpicc
-O2  -fPIC  -I.  -DBUILD_HDF5 -DBUILD_PARALLEL -Iadf -o lib/ADF_internals.o -c adf/ADF_internals.c
mpicc
-O2  -fPIC  -I.  -DBUILD_HDF5 -DBUILD_PARALLEL -I/usr/local/include -DLOWERCASE_ -o lib/cg_ftoc.o -c cg_ftoc.c
mpicc
-O2  -fPIC  -I.  -DBUILD_HDF5 -DBUILD_PARALLEL -I/usr/local/include -DLOWERCASE_ -o lib/cgio_ftoc.o -c cgio_ftoc.c
mpicc
-shared  -Wl,-rpath,/usr/local/lib:/root/CGNS-3.3.0/src/lib -o lib/libcgns.so lib/cgns_error.o lib/cgns_internals.o lib/cgns_io.o lib/cgnslib.o lib/cgns_f.o lib/ADFH.o lib/pcgnslib.o lib/ADF_interface.o lib/ADF_internals.o lib/cg_ftoc.o lib/cgio_ftoc.o
strip lib/libcgns.so


On Thursday, January 12, 2017 at 10:24:47 PM UTC+8, CatDog wrote:

Freddie Witherden

unread,
Jan 12, 2017, 10:46:30 PM1/12/17
to pyfrmai...@googlegroups.com
On 12/01/2017 06:24, CatDog wrote:
> I am running into some confusions about the CGNS lib.
> The CGNS 3.3.0 is too much newer than my CentOS 6. So I have to compile
> it with hdf5 (and szip, I am not sure if it is necessary). However,
> after that, when I tried to import CGNS grid.

As per the user guide you need CGNS >= 3.3 (develop branch post commit
e0faea6). Please ensure that the version you are compiling is indeed
post commit e0faea6.

Regards, Freddie.


signature.asc

Yoshiaki Abe

unread,
Jan 13, 2017, 6:26:53 AM1/13/17
to PyFR Mailing List
Your libcgns.so seems not to be linked to hdf5 library.

ldd libcgns.so should be like this:
linux-vdso.so.1 (0x00007ffd0a3d4000)
libhdf5.so.10 => /home/yoshiaki/local/installed/lib/libhdf5.so.100x00007f5c52e94000)
libz.so.1 => /usr/lib64/libz.so.1 (0x00007f5c52c7d000)
libdl.so.2 => /usr/lib64/libdl.so.2 (0x00007f5c52a79000)
libm.so.6 => /usr/lib64/libm.so.6 (0x00007f5c52777000)
libc.so.6 => /usr/lib64/libc.so.6 (0x00007f5c523b5000)
/lib64/ld-linux-x86-64.so.2 (0x000055f95909c000)

Did you set the following flags for CGNS installation? (I recommend you to use cmake):
CGNS_ENABLE_HDF5 on

Then, path to HDF5 library should be specified:

HDF5_CXX_COMPILER_EXECUTABLE     /usr/bin/h5c++                               
HDF5_C_COMPILER_EXECUTABLE       /home/yoshiaki/local/installed/bin/h5cc      
HDF5_C_INCLUDE_DIR               /home/yoshiaki/local/installed/include       
HDF5_DIFF_EXECUTABLE             /home/yoshiaki/local/installed/bin/h5diff    
HDF5_DIR                         HDF5_DIR-NOTFOUND                            
HDF5_Fortran_COMPILER_EXECUTAB   /home/yoshiaki/local/installed/bin/h5fc 
HDF5_hdf5_LIBRARY_RELEASE        /home/yoshiaki/local/installed/lib/libhdf5.so

I have installed HDF5 at /home/yoshiaki/local/installed.
I hope that this is helpful for you.

Regards,
Yoshiaki

CatDog

unread,
Jan 14, 2017, 7:06:56 PM1/14/17
to PyFR Mailing List
Sorry, I missed this line in the guide. But I still cannot get the right libcgns.so

I used the following command:

cd
git clone https
://github.com/CGNS/CGNS.git
git checkout e0faea6
cd CGNS
/src
export FC=mpifort
export CC=mpicc


./configure \
--prefix=/opt/cgns \
--with-hdf5=/opt/hdf5 \ # hdf5_1_8_18 installed here
--enable-lfs \
--enable-64bit \
--enable-shared \
--enable-parallel \
--enable-gcc \
--with-mpi

and here is part of the make output:
[root@localhost src]# make
mkdir lib
mpicc
-g -O2  -fPIC  -I.  -DBUILD_HDF5 -DBUILD_PARALLEL -o lib/cgns_error.o -c c                                                                                                                                                             gns_error.c
mpicc
-g -O2  -fPIC  -I.  -DBUILD_HDF5 -DBUILD_PARALLEL -I/opt/hdf5/include -o l                                                                                                                                                             ib/cgns_internals.o -c cgns_internals.c
mpicc
-g -O2  -fPIC  -I.  -DBUILD_HDF5 -DBUILD_PARALLEL -o lib/cgns_io.o -c cgns                                                                                                                                                             _io.c
mpicc
-g -O2  -fPIC  -I.  -DBUILD_HDF5 -DBUILD_PARALLEL -I/opt/hdf5/include -I/u                                                                                                                                                             sr/include -o lib/cgnslib.o -c cgnslib.c
mpifort
-O2 -fPIC  -I.  -DBUILD_HDF5 -DBUILD_PARALLEL -o lib/cgns_f.o -c cgns_f.                                                                                                                                                             F90
mpicc
-g -O2  -fPIC  -I.  -DBUILD_HDF5 -DBUILD_PARALLEL -Iadfh -I/opt/hdf5/inclu                                                                                                                                                             de -I/usr/include -o lib/ADFH.o -c adfh/ADFH.c
mpicc
-g -O2  -fPIC  -I.  -DBUILD_HDF5 -DBUILD_PARALLEL -I/opt/hdf5/include -I/u                                                                                                                                                             sr/include -o lib/pcgnslib.o -c pcgnslib.c
mpicc
-g -O2  -fPIC  -I.  -DBUILD_HDF5 -DBUILD_PARALLEL -Iadf -o lib/ADF_interfa                                                                                                                                                             ce.o -c adf/ADF_interface.c
mpicc
-g -O2  -fPIC  -I.  -DBUILD_HDF5 -DBUILD_PARALLEL -Iadf -o lib/ADF_interna                                                                                                                                                             ls.o -c adf/ADF_internals.c
mpicc
-g -O2  -fPIC  -I.  -DBUILD_HDF5 -DBUILD_PARALLEL -I/opt/hdf5/include -DLO                                                                                                                                                             WERCASE_ -o lib/cg_ftoc.o -c cg_ftoc.c
mpicc
-g -O2  -fPIC  -I.  -DBUILD_HDF5 -DBUILD_PARALLEL -I/opt/hdf5/include -DLO                                                                                                                                                             WERCASE_ -o lib/cgio_ftoc.o -c cgio_ftoc.c
mpicc
-shared  -Wl,-rpath,/opt/cgns/lib:/root/CGNS/src/lib -o lib/libcgns.so lib                                                                                                                                                             /cgns_error.o lib/cgns_internals.o lib/cgns_io.o lib/cgnslib.o lib/cgns_f.o lib/                                                                                                                                                             ADFH.o lib/pcgnslib.o lib/ADF_interface.o lib/ADF_internals.o lib/cg_ftoc.o lib/                                                                                                                                                             cgio_ftoc.o
strip lib
/libcgns.so
cd tools
&& make
...

However, linking to libhdf5.so is still missing:
[root@localhost src]# ldd ./lib/libcgns.so
        linux
-vdso.so.1 =>  (0x00007ffffb76c000)
        libmpi
.so.20 => /usr/lib64/libmpi.so.20 (0x00007fc0bcf07000)
        libpthread
.so.0 => /lib64/libpthread.so.0 (0x00007fc0bcce5000)
        libc
.so.6 => /lib64/libc.so.6 (0x00007fc0bc951000)
        libopen
-rte.so.20 => /usr/lib64/libopen-rte.so.20 (0x00007fc0bc6d0000)
        libopen
-pal.so.20 => /usr/lib64/libopen-pal.so.20 (0x00007fc0bc3e5000)
        librt
.so.1 => /lib64/librt.so.1 (0x00007fc0bc1dd000)
        libm
.so.6 => /lib64/libm.so.6 (0x00007fc0bbf59000)
        libutil
.so.1 => /lib64/libutil.so.1 (0x00007fc0bbd55000)
        libdl
.so.2 => /lib64/libdl.so.2 (0x00007fc0bbb51000)
       
/lib64/ld-linux-x86-64.so.2 (0x00007fc0bd4b5000)

as Abe's reply suggested, I have tried to use cmake and ccmake. It is not working because of missing HDF5_DIR which is required to find hdf5-config.cmake. (I have updated cmake/ccmake in CentOS 6 to latest)

CatDog

unread,
Jan 14, 2017, 7:13:21 PM1/14/17
to PyFR Mailing List
Thanks a lot. However I just cannot use cmake to get things done. ccmake tells me it cannot find hdf5-config.cmake which is assumed to be in HDF5_DIR.
Could you tell me the version of your OS and cmake?

I am 

Yoshiaki Abe

unread,
Jan 14, 2017, 8:36:03 PM1/14/17
to PyFR Mailing List
Hi CatDog,

Could you please check the followings?:

1. 
I am using Fedora23 and cmake3.4.3. I have also confirmed that CentOS6.2 with cmake2.8.12.2 works.
However, cmake3.5, that is the latest version available from cmake website, seems not to work well in my environment. (I didn't check this in detail, but the path to hdf5 library could not be specified correctly).

2.
Besides, you need not specify HDF5_DIR line on ccmake and ignore the message "cannot find the hdf5-config.cmake".
You can put "g" after setting correct hdf5 library path even if you do not specify HDF5_DIR.

3.
I have tried to use 64bit option in the latest CGNS3.3 develop branch (the latest commit "cc2d70" on last month), but the pyfr convert command fails with segmentation fault error.
I did not check this error in detail, but possibly due to my installation of hdf5, or bugs in the latest cgns.
I would like to know if you can run it correctly or not.
If you encounter this error, I recommend to turn off the 64bit option.

Cheers,
Yoshiaki

Yoshiaki Abe

unread,
Jan 14, 2017, 8:43:20 PM1/14/17
to PyFR Mailing List
One more thing:
CGNS installation (commit cc2d70) using configure seems not to work.
I also experienced the compile error if turning on -with-hdf5 option.

Yoshiaki

CatDog

unread,
Jan 15, 2017, 10:11:53 PM1/15/17
to PyFR Mailing List
Thanks a lot for your relpy.

I just tested the cgns without hdf5 support, the following commands works for pyfr at least for adf file format.

cd
cd CGNS
/src/
FC
="gfortran -g -O2 -fPIC" ./configure --enable-shared
make
cd
~/cgns_files
wget http:/
/cgns.sourceforge.net/CGNSFiles/Bruce/yf17.cgns.gz
gunzip yf17
.cgns.gz
LD_LIBRARY_PATH
="$HOME/CGNS/src/lib:$LD_LIBRARY_PATH" pyfr import -t cgns yf17.cgns yf17.pyfrm


however, I found the bump file from CGNS website: http://cgns.sourceforge.net/CGNSFiles/Chris/bump.cgns.gz does report a segment fault for pyfr.

[root@localhost cgns_file]# LD_LIBRARY_PATH="$HOME/CGNS/src/lib:$LD_LIBRARY_PATH" pyfr import -t cgns bump.cgns bump.pyfrm
Traceback (most recent call last):
  File "/opt/rh/rh-python34/root/usr/bin/pyfr", line 11, in <module>
    sys.exit(main())
  File "/opt/rh/rh-python34/root/usr/lib/python3.4/site-packages/pyfr/__main__.py", line 110, in main
    args.process(args)
  File "/opt/rh/rh-python34/root/usr/lib/python3.4/site-packages/pyfr/__main__.py", line 118, in process_import
    reader = get_reader_by_name(args.type, args.inmesh)
  File "/opt/rh/rh-python34/root/usr/lib/python3.4/site-packages/pyfr/readers/__init__.py", line 11, in get_reader_by_name
    return subclass_where(BaseReader, name=name)(*args, **kwargs)
  File "/opt/rh/rh-python34/root/usr/lib/python3.4/site-packages/pyfr/readers/cgns.py", line 384, in __init__
    zone = CGNSZoneReader(cgns, base, 0)
  File "/opt/rh/rh-python34/root/usr/lib/python3.4/site-packages/pyfr/readers/cgns.py", line 266, in __init__
    zone = cgns.zone_read(base, idx)
  File "/opt/rh/rh-python34/root/usr/lib/python3.4/site-packages/pyfr/readers/cgns.py", line 153, in zone_read
    raise RuntimeError('ReadCGNS_read: Incorrect zone type for file')
RuntimeError: ReadCGNS_read: Incorrect zone type for file
Segmentation fault

Park, Jin Seok

unread,
Jan 16, 2017, 8:33:32 AM1/16/17
to CatDog, PyFR Mailing List

Hi CatDog,


Currently, PyFR supports unstructured grid CGNS file only. The bump mesh you pointed is written in structured grid CGNS format.


If you make a mesh in Pointwise and written in unstructured grid CGNS format, it should work.


You can even point your CGNS library with 'export PYFR_LIBRARY_PATH=(your CGNS library path)', instead of LD_LIBRARY_PATH.


Recent CGNS (post commit e0faea6) fixed undefined H5 symbol issues. You can also get CGNS from develop branch of CGNS github.

The procedure Yoshiaki mentioned also works for me. Please use cmake to configure your CGNS build. 


Regards,


Jin Seok


Dr. Jin Seok Park PhD

From: pyfrmai...@googlegroups.com <pyfrmai...@googlegroups.com> on behalf of CatDog <chengd...@gmail.com>
Sent: 16 January 2017 03:11:52
To: PyFR Mailing List
Subject: [pyfrmailinglist] Re: What is the build option requirement of CGNS for pyfr 1.5.0?
 
--
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 pyfrmailingli...@googlegroups.com.
To post to this group, send email to pyfrmai...@googlegroups.com.
Visit this group at https://groups.google.com/group/pyfrmailinglist.
For more options, visit https://groups.google.com/d/optout.

CatDog

unread,
Jan 18, 2017, 3:02:27 AM1/18/17
to PyFR Mailing List, chengd...@gmail.com
Hi, Dr. Jin Seok Park

Thanks a lot. But cgns with hdf5 still not working, I cannot figure out why.

I tried to use hdf5.1.10-patch1 and made a soft link to HDF5Config.cmake and let CGNS's HDF5_DIR point to this folder.
tar xf CMake-hdf5-1.10.0-patch1.tar.gz
cd CMake-hdf5-1.10.0-patch1
#modify HDF5config.cmake to support some features as 
However, it still not working.

I am using cmake 3.7.2 now. I am not sure if it is a problem of cmake.

I also tried commit "cc2d70", which is green "2/2 checks OK" according to https://github.com/CGNS/CGNS/commits/develop.It still not working.

I think CMake make things complicated, CGNS core files are not very large, it only needs 9 files to compile and link. And I think libcgns.so is all what I need for pyfr. Here is some part of make output
### part of make output
mpicc -shared  -Wl,-rpath,/opt/cgns/lib:/root/CGNS/src/lib -o lib/libcgns.so lib/cgns_error.o lib/cgns_internals.o lib/cgns_io.o lib/cgnslib.o lib/cgns_f.o lib/ADFH.o lib/ADF_interface.o lib/ADF_internals.o lib/cg_ftoc.o lib/cgio_ftoc.o
strip lib/libcgns.so

So I tried to modify it as this:

lib 

At least it works without error using following commands:
cd
mkdir cgns_files
cd cgns_files
wget http
://cgns.sourceforge.net/CGNSFiles/Bruce/yf17.cgns.gz
wget http
://cgns.sourceforge.net/CGNSFiles/Bruce/yf17_hdf5.cgns.gz
gunzip yf17
.cgns.gz
gunzip yf17_hdf5
.cgns.gz
PYFR_LIBRARY_PATH
="/root/CGNS/src/lib" pyfr import -t cgns yf17.cgns yf17.pyfrm
PYFR_LIBRARY_PATH
="/root/CGNS/src/lib" pyfr import -t cgns yf17_hdf5.cgns yf17_hdf5.pyfrm

However, I did not compile it with parallel support yet. I am not familiar with ./configure kind of tools, but I think there must be a cleanner way to solve this problem.

CatDog

unread,
Jan 18, 2017, 3:04:35 AM1/18/17
to PyFR Mailing List, chengd...@gmail.com
The missing line is this
mpicc -shared  -Wl,-rpath,/opt/cgns/lib:/root/CGNS/src/lib:/opt/hdf5-1.8.18/lib -o lib/libcgns.so -L/opt/hdf5-1.8.18/lib -lhdf5 lib/cgns_error.o lib/cgns_internals.o lib/cgns_io.o lib/cgnslib.o lib/cgns_f.o lib/ADFH.o lib/ADF_interface.o lib/ADF_internals.o lib/cg_ftoc.o lib/cgio_ftoc.o
Reply all
Reply to author
Forward
0 new messages