Samuel Thibault, le sam. 30 mars 2024 16:55:11 +0100, a ecrit:
> I have forwarded a fix to upstream
> https://github.com/pmodels/armci-mpi/pull/47
> which is already merged.
> 
> Unless somebody objects, I'll NMU it.

I have uploaded the attached changes to delayed/2.

Samuel
diff -Nru armci-mpi-0.3.1~beta/debian/changelog 
armci-mpi-0.3.1~beta/debian/changelog
--- armci-mpi-0.3.1~beta/debian/changelog       2023-03-19 14:08:54.000000000 
+0100
+++ armci-mpi-0.3.1~beta/debian/changelog       2024-03-30 23:17:18.000000000 
+0100
@@ -1,3 +1,12 @@
+armci-mpi (0.3.1~beta-7.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * patches/fix-test.patch: Fix test_mpi_indexed_gets.c test and strengthen
+    the others. Closes: #1066227.
+  * patches/ftbfs.patch: Fix build with qa=+bug-implicit-func.
+
+ -- Samuel Thibault <sthiba...@debian.org>  Sat, 30 Mar 2024 23:17:18 +0100
+
 armci-mpi (0.3.1~beta-7) unstable; urgency=medium
 
   * Team upload.
diff -Nru armci-mpi-0.3.1~beta/debian/patches/fix-test.patch 
armci-mpi-0.3.1~beta/debian/patches/fix-test.patch
--- armci-mpi-0.3.1~beta/debian/patches/fix-test.patch  1970-01-01 
01:00:00.000000000 +0100
+++ armci-mpi-0.3.1~beta/debian/patches/fix-test.patch  2024-03-30 
23:17:18.000000000 +0100
@@ -0,0 +1,193 @@
+https://github.com/pmodels/armci-mpi/pull/47
+
+commit 80cc91748392aec9eced295eb531548a565dac0e
+Author: Samuel Thibault <samuel.thiba...@ens-lyon.org>
+Date:   Sat Mar 30 16:35:11 2024 +0100
+
+    tests/mpi/test_mpi_indexed_gets.c: Fix reception buffer initialization
+    
+    loc_buf was completely uninitialized, while the second and third loop nests
+    are checking that the values are 1.0 + rank. With luck it would be zero, 
and
+    thus the actual - expected > 1e-10 check would pass (since the difference 
is
+    then negative). With less luck the check would spuriously fail for the part
+    that is not overwritten by the MPI_Get.
+    
+    Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org>
+
+commit 9c0f6b08ba706a7c2f3e74d325cfd2a010300108
+Author: Samuel Thibault <samuel.thiba...@ens-lyon.org>
+Date:   Sat Mar 30 16:38:58 2024 +0100
+
+    tests/mpi: Fix comparison of floating-double types
+    
+    In case the actual value is zero and the expected value is positive, the
+    check would spuriously succeed.
+    
+    Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org>
+
+commit cd001a46801fed9f406ea57238a131b0a0e063fe
+Author: Samuel Thibault <samuel.thiba...@ens-lyon.org>
+Date:   Sat Mar 30 16:41:58 2024 +0100
+
+    tests/mpi/test_mpi_indexed_gets.c: Strengthen test
+    
+    Now that it is fixed, we can make it actually perform strided accesses.
+    
+    Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org>
+
+---
+ tests/mpi/test_mpi_accs.c              |    2 +-
+ tests/mpi/test_mpi_indexed_accs.c      |    6 +++---
+ tests/mpi/test_mpi_indexed_gets.c      |   12 +++++++-----
+ tests/mpi/test_mpi_indexed_puts_gets.c |    6 +++---
+ tests/mpi/test_mpi_subarray_accs.c     |    6 +++---
+ 5 files changed, 17 insertions(+), 15 deletions(-)
+
+--- a/tests/mpi/test_mpi_indexed_gets.c
++++ b/tests/mpi/test_mpi_indexed_gets.c
+@@ -19,7 +19,7 @@
+ 
+ #define XDIM 8
+ #define YDIM 1024
+-#define SUB_XDIM 8
++#define SUB_XDIM 4
+ #define SUB_YDIM 256
+ 
+ int main(int argc, char **argv) {
+@@ -44,8 +44,10 @@ int main(int argc, char **argv) {
+     if (rank == 0)
+         printf("MPI RMA Strided Get Test:\n");
+ 
+-    for (i = 0; i < XDIM*YDIM; i++)
++    for (i = 0; i < XDIM*YDIM; i++) {
+         *(win_buf + i) = 1.0 + rank;
++        *(loc_buf + i) = 1.0 + rank;
++    }
+ 
+     MPI_Win_create(win_buf, bufsize, 1, MPI_INFO_NULL, MPI_COMM_WORLD, 
&buf_win);
+ 
+@@ -88,7 +90,7 @@ int main(int argc, char **argv) {
+       for (j = 0; j < SUB_YDIM; j++) {
+         const double actual   = *(loc_buf + i + j*XDIM);
+         const double expected = (1.0 + peer);
+-        if (actual - expected > 1e-10) {
++        if (fabs(actual - expected) > 1e-10) {
+           printf("%d: Data validation failed at [%d, %d] expected=%f 
actual=%f\n",
+               rank, j, i, expected, actual);
+           errors++;
+@@ -100,7 +102,7 @@ int main(int argc, char **argv) {
+       for (j = 0; j < SUB_YDIM; j++) {
+         const double actual   = *(loc_buf + i + j*XDIM);
+         const double expected = 1.0 + rank;
+-        if (actual - expected > 1e-10) {
++        if (fabs(actual - expected) > 1e-10) {
+           printf("%d: Data validation failed at [%d, %d] expected=%f 
actual=%f\n",
+               rank, j, i, expected, actual);
+           errors++;
+@@ -112,7 +114,7 @@ int main(int argc, char **argv) {
+       for (j = SUB_YDIM; j < YDIM; j++) {
+         const double actual   = *(loc_buf + i + j*XDIM);
+         const double expected = 1.0 + rank;
+-        if (actual - expected > 1e-10) {
++        if (fabs(actual - expected) > 1e-10) {
+           printf("%d: Data validation failed at [%d, %d] expected=%f 
actual=%f\n",
+               rank, j, i, expected, actual);
+           errors++;
+--- a/tests/mpi/test_mpi_accs.c
++++ b/tests/mpi/test_mpi_accs.c
+@@ -55,7 +55,7 @@ int main(int argc, char **argv) {
+       for (j = 0; j < YDIM; j++) {
+         const double actual   = *(buffer + i + j*XDIM);
+         const double expected = (1.0 + rank) + (1.0 + 
((rank+nranks-1)%nranks)) * (ITERATIONS);
+-        if (actual - expected > 1e-10) {
++        if (fabs(actual - expected) > 1e-10) {
+           printf("%d: Data validation failed at [%d, %d] expected=%f 
actual=%f\n",
+               rank, j, i, expected, actual);
+           errors++;
+--- a/tests/mpi/test_mpi_indexed_accs.c
++++ b/tests/mpi/test_mpi_indexed_accs.c
+@@ -97,7 +97,7 @@ int main(int argc, char **argv) {
+       for (j = 0; j < SUB_YDIM; j++) {
+         const double actual   = *(win_buf + i + j*XDIM);
+         const double expected = (1.0 + rank) + (1.0 + 
((rank+nranks-1)%nranks)) * (ITERATIONS);
+-        if (actual - expected > 1e-10) {
++        if (fabs(actual - expected) > 1e-10) {
+           printf("%d: Data validation failed at [%d, %d] expected=%f 
actual=%f\n",
+               rank, j, i, expected, actual);
+           errors++;
+@@ -109,7 +109,7 @@ int main(int argc, char **argv) {
+       for (j = 0; j < SUB_YDIM; j++) {
+         const double actual   = *(win_buf + i + j*XDIM);
+         const double expected = 1.0 + rank;
+-        if (actual - expected > 1e-10) {
++        if (fabs(actual - expected) > 1e-10) {
+           printf("%d: Data validation failed at [%d, %d] expected=%f 
actual=%f\n",
+               rank, j, i, expected, actual);
+           errors++;
+@@ -121,7 +121,7 @@ int main(int argc, char **argv) {
+       for (j = SUB_YDIM; j < YDIM; j++) {
+         const double actual   = *(win_buf + i + j*XDIM);
+         const double expected = 1.0 + rank;
+-        if (actual - expected > 1e-10) {
++        if (fabs(actual - expected) > 1e-10) {
+           printf("%d: Data validation failed at [%d, %d] expected=%f 
actual=%f\n",
+               rank, j, i, expected, actual);
+           errors++;
+--- a/tests/mpi/test_mpi_indexed_puts_gets.c
++++ b/tests/mpi/test_mpi_indexed_puts_gets.c
+@@ -92,7 +92,7 @@ int main(int argc, char **argv) {
+       for (j = 0; j < SUB_YDIM; j++) {
+         const double actual   = *(win_buf + i + j*XDIM);
+         const double expected = (1.0 + ((rank+nranks-1)%nranks));
+-        if (actual - expected > 1e-10) {
++        if (fabs(actual - expected) > 1e-10) {
+           printf("%d: Data validation failed at [%d, %d] expected=%f 
actual=%f\n",
+               rank, j, i, expected, actual);
+           errors++;
+@@ -104,7 +104,7 @@ int main(int argc, char **argv) {
+       for (j = 0; j < SUB_YDIM; j++) {
+         const double actual   = *(win_buf + i + j*XDIM);
+         const double expected = 1.0 + rank;
+-        if (actual - expected > 1e-10) {
++        if (fabs(actual - expected) > 1e-10) {
+           printf("%d: Data validation failed at [%d, %d] expected=%f 
actual=%f\n",
+               rank, j, i, expected, actual);
+           errors++;
+@@ -116,7 +116,7 @@ int main(int argc, char **argv) {
+       for (j = SUB_YDIM; j < YDIM; j++) {
+         const double actual   = *(win_buf + i + j*XDIM);
+         const double expected = 1.0 + rank;
+-        if (actual - expected > 1e-10) {
++        if (fabs(actual - expected) > 1e-10) {
+           printf("%d: Data validation failed at [%d, %d] expected=%f 
actual=%f\n",
+               rank, j, i, expected, actual);
+           errors++;
+--- a/tests/mpi/test_mpi_subarray_accs.c
++++ b/tests/mpi/test_mpi_subarray_accs.c
+@@ -90,7 +90,7 @@ int main(int argc, char **argv) {
+       for (j = 0; j < SUB_YDIM; j++) {
+         const double actual   = *(win_buf + i + j*XDIM);
+         const double expected = (1.0 + rank) + (1.0 + 
((rank+nranks-1)%nranks)) * (ITERATIONS);
+-        if (actual - expected > 1e-10) {
++        if (fabs(actual - expected) > 1e-10) {
+           printf("%d: Data validation failed at [%d, %d] expected=%f 
actual=%f\n",
+               rank, j, i, expected, actual);
+           errors++;
+@@ -102,7 +102,7 @@ int main(int argc, char **argv) {
+       for (j = 0; j < SUB_YDIM; j++) {
+         const double actual   = *(win_buf + i + j*XDIM);
+         const double expected = 1.0 + rank;
+-        if (actual - expected > 1e-10) {
++        if (fabs(actual - expected) > 1e-10) {
+           printf("%d: Data validation failed at [%d, %d] expected=%f 
actual=%f\n",
+               rank, j, i, expected, actual);
+           errors++;
+@@ -114,7 +114,7 @@ int main(int argc, char **argv) {
+       for (j = SUB_YDIM; j < YDIM; j++) {
+         const double actual   = *(win_buf + i + j*XDIM);
+         const double expected = 1.0 + rank;
+-        if (actual - expected > 1e-10) {
++        if (fabs(actual - expected) > 1e-10) {
+           printf("%d: Data validation failed at [%d, %d] expected=%f 
actual=%f\n",
+               rank, j, i, expected, actual);
+           errors++;
diff -Nru armci-mpi-0.3.1~beta/debian/patches/ftbfs.patch 
armci-mpi-0.3.1~beta/debian/patches/ftbfs.patch
--- armci-mpi-0.3.1~beta/debian/patches/ftbfs.patch     1970-01-01 
01:00:00.000000000 +0100
+++ armci-mpi-0.3.1~beta/debian/patches/ftbfs.patch     2024-03-30 
23:17:18.000000000 +0100
@@ -0,0 +1,71 @@
+https://github.com/pmodels/armci-mpi/pull/48
+
+---
+ tests/contrib/non-blocking/overlap.c   |    1 +
+ tests/mpi/test_mpi_accs.c              |    1 +
+ tests/mpi/test_mpi_indexed_accs.c      |    1 +
+ tests/mpi/test_mpi_indexed_gets.c      |    1 +
+ tests/mpi/test_mpi_indexed_puts_gets.c |    1 +
+ tests/mpi/test_mpi_subarray_accs.c     |    1 +
+ 6 files changed, 6 insertions(+)
+
+--- a/tests/contrib/non-blocking/overlap.c
++++ b/tests/contrib/non-blocking/overlap.c
+@@ -37,6 +37,7 @@
+ #include <unistd.h>
+ #include <math.h>
+ #include <sys/time.h>
++#include <time.h>
+ #include <string.h>
+ #include <assert.h>
+ 
+--- a/tests/mpi/test_mpi_accs.c
++++ b/tests/mpi/test_mpi_accs.c
+@@ -4,6 +4,7 @@
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <math.h>
+ #include <mpi.h>
+ 
+ #define XDIM 1024 
+--- a/tests/mpi/test_mpi_indexed_accs.c
++++ b/tests/mpi/test_mpi_indexed_accs.c
+@@ -15,6 +15,7 @@
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <math.h>
+ #include <mpi.h>
+ 
+ #define XDIM 16
+--- a/tests/mpi/test_mpi_indexed_gets.c
++++ b/tests/mpi/test_mpi_indexed_gets.c
+@@ -15,6 +15,7 @@
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <math.h>
+ #include <mpi.h>
+ 
+ #define XDIM 8
+--- a/tests/mpi/test_mpi_indexed_puts_gets.c
++++ b/tests/mpi/test_mpi_indexed_puts_gets.c
+@@ -15,6 +15,7 @@
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <math.h>
+ #include <mpi.h>
+ 
+ #define XDIM 8
+--- a/tests/mpi/test_mpi_subarray_accs.c
++++ b/tests/mpi/test_mpi_subarray_accs.c
+@@ -15,6 +15,7 @@
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <math.h>
+ #include <mpi.h>
+ 
+ #define XDIM 1024 
diff -Nru armci-mpi-0.3.1~beta/debian/patches/series 
armci-mpi-0.3.1~beta/debian/patches/series
--- armci-mpi-0.3.1~beta/debian/patches/series  2023-03-19 14:08:54.000000000 
+0100
+++ armci-mpi-0.3.1~beta/debian/patches/series  2024-03-30 23:17:18.000000000 
+0100
@@ -1 +1,3 @@
 build_mpi_flavor.patch
+fix-test.patch
+ftbfs.patch

Reply via email to