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: [email protected] <[email protected]> on behalf of CatDog <[email protected]> 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? 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 On Sunday, January 15, 2017 at 9:43:20 AM UTC+8, Yoshiaki Abe wrote: 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 On Sunday, January 15, 2017 at 1:36:03 AM UTC, Yoshiaki Abe wrote: 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 On Sunday, January 15, 2017 at 12:13:21 AM UTC, CatDog wrote: 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 On Friday, January 13, 2017 at 7:26:53 PM UTC+8, Yoshiaki Abe wrote: 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<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<http://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<http://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<http://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 [email protected]<mailto:[email protected]>. To post to this group, send email to [email protected]<mailto:[email protected]>. Visit this group at https://groups.google.com/group/pyfrmailinglist. For more options, visit https://groups.google.com/d/optout. -- 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 post to this group, send an email to [email protected]. Visit this group at https://groups.google.com/group/pyfrmailinglist. For more options, visit https://groups.google.com/d/optout.
