Bug#992180: [Debichem-devel] Bug#992180: Bug#992180: MR with fix available Re: openmm FTBFS on amd64/arm64/ppc64el

2023-11-24 Thread Andrius Merkys

Hi Michael,

On 2023-11-24 09:30, Andrius Merkys wrote:

On 2023-11-23 19:25, Michael R. Crusoe wrote:
It won't fix the FTBFS on armel / armhf; that's due to them being 
detected as arm64 and inappropriate NEON intrinsics being used


Thanks for spotting this, I will give it a look, although I understand 
very little about vectorization.


I successfully patched the build on armel by leaving NEON vectorization 
for arm64 only:


--- a/libraries/vecmath/src/vecmath.cpp
+++ b/libraries/vecmath/src/vecmath.cpp
@@ -1,4 +1,4 @@
-#if defined(__ARM__) || defined(__ARM64__)
+#if defined(__ARM64__)
 #include "neon_mathfun.h"
 #else
 #if !defined(__PNACL__)
--- a/openmmapi/include/openmm/internal/vectorize.h
+++ b/openmmapi/include/openmm/internal/vectorize.h
@@ -32,7 +32,7 @@
  * USE OR OTHER DEALINGS IN THE SOFTWARE. 
   *
  * 
-- 
*/


-#if defined(__ARM__) || defined(__ARM64__)
+#if defined(__ARM64__)
 #include "vectorize_neon.h"
 #elif defined(__PPC__)
 #include "vectorize_ppc.h"

Build on armel succeeded, however, some tests segfault:

The following tests FAILED:
 10 - TestReferenceCustomCentroidBondForce (SEGFAULT)
 11 - TestReferenceCustomCompoundBondForce (SEGFAULT)
 12 - TestReferenceCustomExternalForce (SEGFAULT)
 13 - TestReferenceCustomGBForce (SEGFAULT)
 15 - TestReferenceCustomIntegrator (SEGFAULT)
 16 - TestReferenceCustomManyParticleForce (SEGFAULT)
 17 - TestReferenceCustomNonbondedForce (Subprocess aborted)
 18 - TestReferenceCustomTorsionForce (SEGFAULT)
 69 - TestReferenceRpmd (Timeout)
110 - TestParser (SEGFAULT)

I gave TestParser a look with gdb:

(gdb) run
Starting program: 
/home/merkys/openmm-8.0.0+dfsg/obj-arm-linux-gnueabi/TestParser

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabi/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
Lepton::CompiledExpression::generateTwoArgCall 
(this=this@entry=0xbefff004, c=..., dest=..., arg1=..., arg2=..., 
function=) at 
./libraries/lepton/src/CompiledExpression.cpp:511

511 invoke->setArg(0, arg1);
(gdb) print arg1
$1 = (asmjit::_abi_1_9::arm::Vec &) @0x4186f8: 
{ = { = 
{ = { = 
{_signature = {_bits = 0},
  _baseId = 0, _data = {0, 0}}, }, fields>}, }, }


My wild guess is that asmjit is incompatible with armel/armhf as in 
standalone asmjit (see #1049872). Building openmm without asmjit support 
seems possible, I will try that.


Best,
Andrius



Bug#992180: [Debichem-devel] Bug#992180: MR with fix available Re: openmm FTBFS on amd64/arm64/ppc64el

2023-11-23 Thread Andrius Merkys

Hi Michael,

On 2023-11-23 19:25, Michael R. Crusoe wrote:
Hello, I opened the merge request below to add SIMDe to this package; I 
tested on the riscv64 porterbox where the build succeeded, included 
tests. Likewise on my personal amd64 laptop.


https://salsa.debian.org/debichem-team/openmm/-/merge_requests/1


Thanks a lot for helping porting openmm to more architectures! I have 
merged your PR and uploaded openmm.


It won't fix the FTBFS on armel / armhf; that's due to them being 
detected as arm64 and inappropriate NEON intrinsics being used


Thanks for spotting this, I will give it a look, although I understand 
very little about vectorization.


Best wishes,
Andrius



Bug#992180: MR with fix available Re: openmm FTBFS on amd64/arm64/ppc64el

2023-11-23 Thread Michael R. Crusoe

On Sun, 15 Aug 2021 12:11:53 +0300 Adrian Bunk  wrote:
> Source: openmm
> Version: 7.5.1+dfsg-1
> Severity: important
> Tags: ftbfs
>
> https://buildd.debian.org/status/package.php?p=openmm=sid
>
> ...
> 
/<>/openmmapi/include/openmm/internal/vectorize_sse.h:38:10: 
fatal error: smmintrin.h: No such file or directory

> 38 | #include 
> | ^
> compilation terminated.
> make[4]: *** 
[platforms/cpu/sharedTarget/CMakeFiles/OpenMMCPU.dir/build.make:98: 
platforms/cpu/sharedTarget/CMakeFiles/OpenMMCPU.dir/__/src/CpuCustomGBForce.cpp.o] 
Error 1

>
>
> Nice to have would be a vectorize_generic.h (or using simde),
> not sure whether upstream would be interested in doing that.

Hello, I opened the merge request below to add SIMDe to this package; I 
tested on the riscv64 porterbox where the build succeeded, included 
tests. Likewise on my personal amd64 laptop.


https://salsa.debian.org/debichem-team/openmm/-/merge_requests/1

It won't fix the FTBFS on armel / armhf; that's due to them being 
detected as arm64 and inappropriate NEON intrinsics being used



--
Michael R. Crusoe



OpenPGP_signature.asc
Description: OpenPGP digital signature