Error: 'Kernel "mul" has no providers' on macOS with x86 processor

Hello,

I am very new to PyFR and want to set it up on my MacBook Pro (2015) for running some simple test cases. I followed the steps exactly on this installation page, but have encounter the issue as the following:
First, when I was downloading ‘libxsmm’ with

git clone git@github.com:libxsmm/libxsmm.git

I encountered an error indicating missing authentication (or something similar), so I did

git clone git@github.com/libxsmm/libxsmm.git

instead and followed the rest. I set up the run with

pyfr run -b openmp -p 2d-inc-cylinder.pyfrm inc-cylinder.ini

but then I encountered an error with missing kernel ‘mul’, which seems to be related to the ‘libxsmm’ library.

  File "/Users/huqiyang/pyfr-venv/lib/python3.11/site-packages/pyfr/backends/base/backend.py", line 173, in kernel
    raise KeyError(f'Kernel "{name}" has no providers')
KeyError: 'Kernel "mul" has no providers'

I am not sure how to resolve this and I wish to know which backend I should be looking into for running on my 2015 MacBook Pro. Really appreciate for any help!

Have you added PYFR_LIBXSMM_LIBRARY_PATH=... to your environment? Also I recently had a similar problem and, from lscpu or the mac equivalent, I think you need to at least have the AVX2 instruction set extension.

Hi WillT,

I did huqiyang@DN0a2252e4 libxsmm % export PYFR_XSMM_LIBRARY_PATH=pwd/lib/libxsmm.dylib when I was installing libxsmm, with which I assume the environment variables is set up properly.

In terms of AVX2 extension, I might need to check on that.

Thanks!

Can you confirm which version of PyFR you are using?

Regards, Freddie.

Hi Freddie,

The PyFR version I have is 1.15.0.

Thank you,
Jerry

Do any of the other examples work? And would you be able to try the current git development version of PyFR?

Regards, Freddie.

Hi Freddie. I haven tested any other examples but will make sure to do that. For the .ini file, do I need to add

[backend-openmp]
cc = gcc-13 

to it?

For macOS, yes.

Regards, Freddie.

Thank you Freddie.

I just ran the test cases ‘2d euler vortex’ and ‘2d couette flow’ but encountered the same error

KeyError: 'Kernel "mul" has no providers'

I am guessing it might be a compatibility issue?

It is likely you have an incorrect version of libxsmm.

Regards, Freddie.

Thank you again.

Would you please let me know the source of the correct version of libxsmm? I installed my current version libxsmm followed the instruction in PyFR documentation.

Best,
Jerry

I have just confirmed that the test case is working fine with the current develop version of PyFR from GitHub along with libxsmm revision 15d55050cf836caab418d41865b3108b55b67934. Specifically, on an Intel Mac with a 2.8 GHz Quad-Core Intel Core i7:

❯ OMP_NUM_THREADS=1 mpirun -np 4 pyfr run -bopenmp -p inc-cylinder.pyfrm inc-cylinder.ini
 100.0% [=============================>] 75.00/75.00 ela: 00:06:34 rem: 00:00:00

Regards, Freddie.