KeyError on 3D case running with WSL Ubuntu openMP

Please upgrade to a more recent version of PyFR.

Regards, Freddie.

Hi Freddie,

I have updated to the latest version and since I am only doing small tests these days so I only used serial PyFR which works perfectly fine. When I want to do a parallel test I have this issue:

AttributeError: /home/mech/zhenyang/.cache/pyfr/libebb740f6d50bc2d66dc7119dbf57c51deda63e856b33ee71e8455d69ce8fd05a.so: undefined symbol: mpicflux

I have searched in the source code and it seems related to pyfr.solvers.navstokes.kernels.mpicflux but don’t know how to deal with it. Did I missed anything in the installation? The ini file is same as before. Thanks in ahead.

Best wishes,
Zhenyang

As a first step I would try deleting the kernel cache directory /home/mech/zhenyang/.cache/pyfr/.

This will ensure all of the kernels are rebuilt from scratch.

Regards, Freddie.

I have deleted the cache directory and retried the code, but some other similar errors showed up:

AttributeError: /home/mech/zhenyang/.cache/pyfr/lib65d72c91b1e692a3af2412a9c58c7455809f2e7ea43a297e1d8cf4382e953e01.so: undefined symbol: negdivconf

and after I’ve deleted the cache again tried code again:

AttributeError: /home/mech/zhenyang/.cache/pyfr/libed0d7d2a6745c66a01bd7a603fb6f3682556d546067ef15229f260eced83d46d.so: undefined symbol: par_memcpy

The full traceback:

Traceback (most recent call last):
  File "/scratch/zhenyang/software/pyfr/env/lib/python3.8/site-packages/pyfr-1.12.2-py3.8.egg/pyfr/util.py", line 33, in __call__
KeyError: (<function OpenMPKernelProvider._build_kernel at 0x7f567ed9b9d0>, b'\x80\x04\x95K\x02\x00\x00\x00\x00\x00\x00\x8c\npar_memcpy\x94X\x0b\x02\x00\x00\n\n#include <omp.h>\n#include <stdlib.h>\n#include <tgmath.h>\n\n#define SOA_SZ 8\n#define BLK_SZ 8\n\n#define min(a, b) ((a) < (b) ? (a) : (b))\n#define max(a, b) ((a) > (b) ? (a) : (b))\n\n// Typedefs\ntypedef double fpdtype_t;\n\n\n\n\n#include <string.h>\n\nvoid\npar_memcpy(char *dst, int dbbytes, const char *src, int sbbytes, int bnbytes,\n           int nblocks)\n{\n    #pragma omp parallel for\n    for (int ib = 0; ib < nblocks; ib++)\n        memcpy(dst + ((size_t) dbbytes)*ib, src + ((size_t) sbbytes)*ib,\n               bnbytes);\n}\n\n\x94]\x94(\x8c\x05numpy\x94\x8c\x05int64\x94\x93\x94h\x03\x8c\x05int32\x94\x93\x94h\x05h\x07h\x07h\x07e\x87\x94.', b'\x80\x04}\x94.')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/scratch/zhenyang/software/pyfr/env/bin/pyfr", line 33, in <module>
    sys.exit(load_entry_point('pyfr==1.12.2', 'console_scripts', 'pyfr')())
  File "/scratch/zhenyang/software/pyfr/env/lib/python3.8/site-packages/pyfr-1.12.2-py3.8.egg/pyfr/__main__.py", line 117, in main
  File "/scratch/zhenyang/software/pyfr/env/lib/python3.8/site-packages/pyfr-1.12.2-py3.8.egg/pyfr/__main__.py", line 250, in process_run
  File "/scratch/zhenyang/software/pyfr/env/lib/python3.8/site-packages/pyfr-1.12.2-py3.8.egg/pyfr/__main__.py", line 232, in _process_common
  File "/scratch/zhenyang/software/pyfr/env/lib/python3.8/site-packages/pyfr-1.12.2-py3.8.egg/pyfr/solvers/__init__.py", line 16, in get_solver
  File "/scratch/zhenyang/software/pyfr/env/lib/python3.8/site-packages/pyfr-1.12.2-py3.8.egg/pyfr/integrators/__init__.py", line 36, in get_integrator
  File "/scratch/zhenyang/software/pyfr/env/lib/python3.8/site-packages/pyfr-1.12.2-py3.8.egg/pyfr/integrators/std/controllers.py", line 85, in __init__
  File "/scratch/zhenyang/software/pyfr/env/lib/python3.8/site-packages/pyfr-1.12.2-py3.8.egg/pyfr/integrators/std/controllers.py", line 13, in __init__
  File "/scratch/zhenyang/software/pyfr/env/lib/python3.8/site-packages/pyfr-1.12.2-py3.8.egg/pyfr/integrators/std/steppers.py", line 133, in __init__
  File "/scratch/zhenyang/software/pyfr/env/lib/python3.8/site-packages/pyfr-1.12.2-py3.8.egg/pyfr/integrators/std/base.py", line 27, in __init__
  File "/scratch/zhenyang/software/pyfr/env/lib/python3.8/site-packages/pyfr-1.12.2-py3.8.egg/pyfr/solvers/base/system.py", line 68, in __init__
  File "/scratch/zhenyang/software/pyfr/env/lib/python3.8/site-packages/pyfr-1.12.2-py3.8.egg/pyfr/solvers/base/system.py", line 187, in _gen_kernels
  File "/scratch/zhenyang/software/pyfr/env/lib/python3.8/site-packages/pyfr-1.12.2-py3.8.egg/pyfr/solvers/baseadvec/elements.py", line 96, in filter_soln
  File "/scratch/zhenyang/software/pyfr/env/lib/python3.8/site-packages/pyfr-1.12.2-py3.8.egg/pyfr/backends/base/backend.py", line 163, in kernel
  File "/scratch/zhenyang/software/pyfr/env/lib/python3.8/site-packages/pyfr-1.12.2-py3.8.egg/pyfr/backends/openmp/blasext.py", line 45, in copy
  File "/scratch/zhenyang/software/pyfr/env/lib/python3.8/site-packages/pyfr-1.12.2-py3.8.egg/pyfr/util.py", line 35, in __call__
  File "/scratch/zhenyang/software/pyfr/env/lib/python3.8/site-packages/pyfr-1.12.2-py3.8.egg/pyfr/backends/openmp/provider.py", line 14, in _build_kernel
  File "/scratch/zhenyang/software/pyfr/env/lib/python3.8/site-packages/pyfr-1.12.2-py3.8.egg/pyfr/backends/openmp/compiler.py", line 134, in function
  File "/scratch/zhenyang/software/pyfr/env/lib/python3.8/ctypes/__init__.py", line 386, in __getattr__
    func = self.__getitem__(name)
  File "/scratch/zhenyang/software/pyfr/env/lib/python3.8/ctypes/__init__.py", line 391, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /home/mech/zhenyang/.cache/pyfr/libed0d7d2a6745c66a01bd7a603fb6f3682556d546067ef15229f260eced83d46d.so: undefined symbol: par_memcpy
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 3 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------

Can you confirm what compiler version you’re using? Also, can you run nm on one of the offending files as nm ~/.cache/pyfr/lib<...>.so?

Regards, Freddie.

gcc (Debian 8.3.0-6) 8.3.0

zhenyang@blefjell:/scratch/zhenyang/compute/pyfr/channel/channel_shrink/run$ nm /home/mech/zhenyang/.cache/pyfr/libed0d7d2a6745c66a01bd7a603fb6f3682556d546067ef15229f260eced83d46d.so
0000000000004038 b completed.7325
                 w __cxa_finalize@@GLIBC_2.2.5
0000000000001090 t deregister_tm_clones
0000000000001100 t __do_global_dtors_aux
0000000000003de8 t __do_global_dtors_aux_fini_array_entry
0000000000004030 d __dso_handle
0000000000003df0 d _DYNAMIC
0000000000001c04 t _fini
0000000000001140 t frame_dummy
0000000000003dd8 t __frame_dummy_init_array_entry
0000000000002144 r __FRAME_END__
0000000000004000 d _GLOBAL_OFFSET_TABLE_
                 w __gmon_start__
0000000000002040 r __GNU_EH_FRAME_HDR
                 U GOMP_parallel@@GOMP_4.0
0000000000001000 t _init
                 w _ITM_deregisterTMCloneTable
                 w _ITM_registerTMCloneTable
00000000000012d0 T negdivconf
0000000000001150 t negdivconf._omp_fn.0
0000000000002040 r __offload_funcs_end
0000000000002040 r __offload_func_table
0000000000002040 r __offload_vars_end
0000000000002040 r __offload_var_table
                 U omp_get_num_threads@@OMP_1.0
                 U omp_get_thread_num@@OMP_1.0
00000000000010c0 t register_tm_clones
0000000000001070 t set_fast_math
0000000000004038 d __TMC_END__

Looking at the output you can clearly see the negdivconf symbol is present. This is not a PyFR issue.

Regards, Freddie.

Can you give me a hint of what is problem could be😂? I really don’t have a lot experience about it. Thank you!

Best wishes,
Zhenyang

There is likely something non-standard about your Linux distribution. Please try on a fresh install/VM and report back as appropriate.

Regards, Freddie.