[valgrind] [Bug 456948] Unrecognized instruction CLFLUSHOPT in Intel oneAPI MPI 2021.6 library

2022-07-20 Thread Mark Wielaard
https://bugs.kde.org/show_bug.cgi?id=456948

Mark Wielaard  changed:

   What|Removed |Added

Summary|Unrecognized instruction|Unrecognized instruction
   |(AVX2) in Intel oneAPI MPI  |CLFLUSHOPT in Intel oneAPI
   |2021.6 library  |MPI 2021.6 library
 CC||m...@klomp.org

--- Comment #1 from Mark Wielaard  ---
This is CLFLUSHOPT which valgrind indeed doesn't support.
But valgrind also makes sure the cpuid CLFLUSHOPT bit isn't set.
So the program really shouldn't use CLFLUSHOPT without checking cpuid says it
is supported.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 456948] Unrecognized instruction CLFLUSHOPT in Intel oneAPI MPI 2021.6 library

2022-07-20 Thread Mark Wielaard
https://bugs.kde.org/show_bug.cgi?id=456948

Mark Wielaard  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|REPORTED|RESOLVED

--- Comment #2 from Mark Wielaard  ---


*** This bug has been marked as a duplicate of bug 424248 ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 456948] Unrecognized instruction CLFLUSHOPT in Intel oneAPI MPI 2021.6 library

2022-07-21 Thread f . roeser
https://bugs.kde.org/show_bug.cgi?id=456948

--- Comment #3 from f.roe...@magmasoft.de  ---
Thank you for your answer, is there a possible workaround to get valgrind
running?
Is there a time schedule for a new valgrind build which fixes this issue?

Best regards
Frank

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 456948] Unrecognized instruction CLFLUSHOPT in Intel oneAPI MPI 2021.6 library

2022-07-23 Thread Mark Wielaard
https://bugs.kde.org/show_bug.cgi?id=456948

--- Comment #4 from Mark Wielaard  ---
(In reply to f.roe...@magmasoft.de from comment #3)
> Thank you for your answer, is there a possible workaround to get valgrind
> running?
> Is there a time schedule for a new valgrind build which fixes this issue?

Note that this is a bug in your program or the library you are using. Valgrind
clearly indicates it doesn't implement CLFLUSHOPT. So your program/library
shouldn't use that instruction. Your program will also crash on a processor
that doesn't implement that instruction.

Valgrind does support CLFLUSH. It looks like CLFLUSHOPT is similar. So it might
not be too hard to support it.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 456948] Unrecognized instruction CLFLUSHOPT in Intel oneAPI MPI 2021.6 library

2022-07-25 Thread f . roeser
https://bugs.kde.org/show_bug.cgi?id=456948

--- Comment #5 from f.roe...@magmasoft.de  ---

I found a solution : )
https://github.com/pmem/valgrind/tree/pmem-3.19
With this version we can use valgrind with new Intel MPI 2021.6

Best regards
Frank

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 456948] Unrecognized instruction CLFLUSHOPT in Intel oneAPI MPI 2021.6 library

2022-07-27 Thread f . roeser
https://bugs.kde.org/show_bug.cgi?id=456948

--- Comment #6 from f.roe...@magmasoft.de  ---
Is this also a forbidden instruction?
vex amd64->IR: unhandled instruction bytes: 0x62 0xF1 0x7C 0x48 0x10 0x2 0x49
0x81 0xC0 0x0
vex amd64->IR:   REX=0 REX.W=0 REX.R=0 REX.X=0 REX.B=0
vex amd64->IR:   VEX=0 VEX.L=0 VEX.n=0x0 ESC=NONE
vex amd64->IR:   PFX.66=0 PFX.F2=0 PFX.F3=0
==1112423== valgrind: Unrecognised instruction at address 0x1e74d9c0.
==1112423==at 0x1E74D9C0: I_MPI_memcpy_nontemporal_avx512 (in
/net/aws1de027/data/repo_cache/mature/intelmpi_rt/2021.6.0/LINUX64_217/lib/libmpi.so.12)

I took https://github.com/pmem/valgrind/tree/pmem-3.19 and it worked better
than original 3.19 but also fails on some runs : (

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 456948] Unrecognized instruction CLFLUSHOPT in Intel oneAPI MPI 2021.6 library

2022-07-27 Thread Tom Hughes
https://bugs.kde.org/show_bug.cgi?id=456948

Tom Hughes  changed:

   What|Removed |Added

 CC||t...@compton.nu

--- Comment #7 from Tom Hughes  ---
No instructions are "forbidden" but some are not supported yet.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 456948] Unrecognized instruction CLFLUSHOPT in Intel oneAPI MPI 2021.6 library

2022-08-01 Thread Mark Wielaard
https://bugs.kde.org/show_bug.cgi?id=456948

--- Comment #8 from Mark Wielaard  ---
(In reply to f.roe...@magmasoft.de from comment #6)
> Is this also a forbidden instruction?
> vex amd64->IR: unhandled instruction bytes: 0x62 0xF1 0x7C 0x48 0x10 0x2
> 0x49 0x81 0xC0 0x0
> vex amd64->IR:   REX=0 REX.W=0 REX.R=0 REX.X=0 REX.B=0
> vex amd64->IR:   VEX=0 VEX.L=0 VEX.n=0x0 ESC=NONE
> vex amd64->IR:   PFX.66=0 PFX.F2=0 PFX.F3=0
> ==1112423== valgrind: Unrecognised instruction at address 0x1e74d9c0.
> ==1112423==at 0x1E74D9C0: I_MPI_memcpy_nontemporal_avx512 (in
> /net/aws1de027/data/repo_cache/mature/intelmpi_rt/2021.6.0/LINUX64_217/lib/
> libmpi.so.12)

That looks like a avx52 variant of the MOVUPS instruction.
Valgrind doesn't support that instruction. Yet see
https://bugs.kde.org/show_bug.cgi?id=383010
Your program should first check the CPU supports such instructions before use.

> I took https://github.com/pmem/valgrind/tree/pmem-3.19 and it worked better
> than original 3.19 but also fails on some runs : (

Have you contacted the pmem valgrind developers to see if they want to
contribute their improvements upstream?

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 456948] Unrecognized instruction CLFLUSHOPT in Intel oneAPI MPI 2021.6 library

2022-08-01 Thread f . roeser
https://bugs.kde.org/show_bug.cgi?id=456948

--- Comment #9 from f.roe...@magmasoft.de  ---
Hi,

Thank you for your answer. The problem occurs in the Intel 2021.6 MPI library.
As far as I understand it runs this code path when cpuid returns positive if
avx512 is available. Could valgrind emulate cpuid and give a fake response that
avy512 is not available?

Best regards
Frank

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 456948] Unrecognized instruction CLFLUSHOPT in Intel oneAPI MPI 2021.6 library

2022-08-01 Thread Mark Wielaard
https://bugs.kde.org/show_bug.cgi?id=456948

--- Comment #10 from Mark Wielaard  ---
(In reply to f.roe...@magmasoft.de from comment #9)
> Thank you for your answer. The problem occurs in the Intel 2021.6 MPI
> library. As far as I understand it runs this code path when cpuid returns
> positive if avx512 is available. Could valgrind emulate cpuid and give a
> fake response that avy512 is not available?

valgrind does emulate cpuid to say that avx512 isn't available. So it must be a
bug in the Intel 2021.6 MPI library.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 456948] Unrecognized instruction CLFLUSHOPT in Intel oneAPI MPI 2021.6 library

2022-08-01 Thread Tom Hughes
https://bugs.kde.org/show_bug.cgi?id=456948

--- Comment #11 from Tom Hughes  ---
That is exactly what we do and why Mark said your program should be checking
the CPU capabilities.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 456948] Unrecognized instruction CLFLUSHOPT in Intel oneAPI MPI 2021.6 library

2022-08-03 Thread f . roeser
https://bugs.kde.org/show_bug.cgi?id=456948

--- Comment #12 from f.roe...@magmasoft.de  ---
Hi,

Just as an Info:
Luckily one can overcome the behavior of the mpi library with a environment
variable I_MPI_SHM=bdw_sse or I_MPI_SHM=bdw_avx2 for non avx512 memcopy.
I found out searching google someone else had a similar problem with valgrind
and avx512 instructions in the Intel mpi library. There the cpu was avx512
ready but it was disabled in bios and somehow the cpuid delivers wrong? outcome
so that the Intel mpi lib took the avx512 path.

Best regards
Frank

-- 
You are receiving this mail because:
You are watching all bug changes.