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

On Friday, January 13, 2017 at 1:08:21 AM UTC, CatDog wrote:
>
> 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:
>>
>> 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 <https://support.hdfgroup.org/HDF5/doc/RM/RM_H5T.html>. 
>> 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
>>
>> Report bugs to http://www.open-mpi.org/community/help/
>>
>> 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.
>>
>

-- 
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 pyfrmailinglist+unsubscr...@googlegroups.com.
To post to this group, send an email to pyfrmailinglist@googlegroups.com.
Visit this group at https://groups.google.com/group/pyfrmailinglist.
For more options, visit https://groups.google.com/d/optout.

Reply via email to