From 2783b5ae6199ca005e4ffbca25f8dc2d915fcd4d Mon Sep 17 00:00:00 2001
From: Thomas Baumann <39156931+brownbaerchen@users.noreply.github.com>
Date: Fri, 25 Oct 2024 10:56:45 +0200
Subject: [PATCH] Switched from allreduce to Allreduce in spectral helper

---
 pySDC/helpers/spectral_helper.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/pySDC/helpers/spectral_helper.py b/pySDC/helpers/spectral_helper.py
index 0fc885a35..7381b33e6 100644
--- a/pySDC/helpers/spectral_helper.py
+++ b/pySDC/helpers/spectral_helper.py
@@ -1471,7 +1471,10 @@ class SpectralHelper:
             if padding is not None:
                 shape = list(v.shape)
                 if self.comm:
-                    shape[0] = self.comm.allreduce(v.shape[0])
+                    send_buf = np.array(v.shape[0])
+                    recv_buf = np.array(v.shape[0])
+                    self.comm.Allreduce(send_buf, recv_buf)
+                    shape[0] = int(recv_buf)
                 fft = self.get_fft(axes, 'forward', shape=shape)
             else:
                 fft = self.get_fft(axes, 'forward', **kwargs)
@@ -1643,7 +1646,10 @@ class SpectralHelper:
                 if padding[axis] != 1:
                     shape = list(v.shape)
                     if self.comm:
-                        shape[0] = self.comm.allreduce(v.shape[0])
+                        send_buf = np.array(v.shape[0])
+                        recv_buf = np.array(v.shape[0])
+                        self.comm.Allreduce(send_buf, recv_buf)
+                        shape[0] = int(recv_buf)
                     ifft = self.get_fft(axes, 'backward', shape=shape)
                 else:
                     ifft = self.get_fft(axes, 'backward', padding=padding, **kwargs)
-- 
GitLab