mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-10-12 17:51:11 -04:00
sys-cluster/opencoarrays: replace patch set with package commit tarball
Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
This commit is contained in:
14 files changed
+4
-2774
No files matched your search
@@ -1 +1 @@
|
|||||||
DIST OpenCoarrays-2.10.3_p20251223.tar.gz 351175 BLAKE2B 8398ec1000358b495f7c126b40eb12fc742cb796c9da8fb04bbffdf13bc9f5fa42d029312a751505db63700d1be33d7ff9a18a124789a3580f88204a1b02aac3 SHA512 4daf632f6ca32b96e1a81504caef94535926552c194e6a509182f5182e4f88aecf2012d3e044a821b6c4c9a88945af1735ca900411c920f902763ad1323031e1
|
DIST opencoarrays-2.10.3_p20251223.tar.gz 356351 BLAKE2B 7df0ae26d277a7472c9e6b4b9027dab975b53d168c2c575f56e666ec46cb0b7fe2efa4ccf0b942d13ab5fb632dabe9a649bd41ec7a86694a8fc5ac79f710cf86 SHA512 2e86cff19fdba91d94d61a33db1f14dfc7cf621636367d4b912ea63698ae1c8ab678ca06a673a702795698d4d0c56c7978b3cd30a1ae4b4293db509aa6991e90
|
||||||
-1300
File diff suppressed because it is too large.
Load diff
@@ -1,159 +0,0 @@
|
|||||||
From 9a82ef47e7d0d19fdc493506cb7197b4901f2070 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andre Vehreschild <vehre@gmx.de>
|
|
||||||
Date: Mon, 28 Apr 2025 09:00:46 +0200
|
|
||||||
Subject: [PATCH] Fix team_number test.
|
|
||||||
|
|
||||||
---
|
|
||||||
CMakeLists.txt | 4 +-
|
|
||||||
src/tests/unit/teams/CMakeLists.txt | 3 +-
|
|
||||||
.../{team_number.f90 => team_number.F90} | 4 +-
|
|
||||||
src/tests/unit/teams/team_number_pre15.f90 | 71 -------------------
|
|
||||||
4 files changed, 5 insertions(+), 77 deletions(-)
|
|
||||||
rename src/tests/unit/teams/{team_number.f90 => team_number.F90} (98%)
|
|
||||||
delete mode 100644 src/tests/unit/teams/team_number_pre15.f90
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 888613454..8f9ee35ae 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -806,6 +806,7 @@ if(opencoarrays_aware_compiler)
|
|
||||||
add_caf_test(comp_allocated_2 2 comp_allocated_2)
|
|
||||||
add_caf_test(alloc_comp_get_convert_nums 2 alloc_comp_get_convert_nums)
|
|
||||||
if(NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 8)
|
|
||||||
+ add_caf_test(team_number 8 team_number)
|
|
||||||
add_caf_test(teams_subset 3 teams_subset)
|
|
||||||
add_caf_test(get_communicator 3 get_communicator)
|
|
||||||
add_caf_test(teams_coarray_get 5 teams_coarray_get)
|
|
||||||
@@ -818,11 +819,8 @@ if(opencoarrays_aware_compiler)
|
|
||||||
set_tests_properties(alloc_comp_multidim_shape PROPERTIES TIMEOUT 300)
|
|
||||||
endif()
|
|
||||||
if(NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 15)
|
|
||||||
- add_caf_test(team_number 8 team_number)
|
|
||||||
add_caf_test(teams_this_image 8 teams_this_image)
|
|
||||||
add_caf_test(teams_num_images 8 teams_num_images)
|
|
||||||
- else()
|
|
||||||
- add_caf_test(team_number_pre15 8 team_number_pre15)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
diff --git a/src/tests/unit/teams/CMakeLists.txt b/src/tests/unit/teams/CMakeLists.txt
|
|
||||||
index e5d5eb9db..8307b0788 100644
|
|
||||||
--- a/src/tests/unit/teams/CMakeLists.txt
|
|
||||||
+++ b/src/tests/unit/teams/CMakeLists.txt
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-caf_compile_executable(team_number_pre15 team_number_pre15.f90)
|
|
||||||
+caf_compile_executable(team_number team_number.F90)
|
|
||||||
caf_compile_executable(teams_subset teams_subset.f90)
|
|
||||||
caf_compile_executable(get_communicator get-communicator.F90)
|
|
||||||
caf_compile_executable(teams_coarray_get teams_coarray_get.f90)
|
|
||||||
@@ -8,7 +8,6 @@ caf_compile_executable(teams_coarray_send_by_ref teams_coarray_send.f90)
|
|
||||||
caf_compile_executable(teams_coarray_sendget teams_coarray_sendget.f90)
|
|
||||||
caf_compile_executable(sync_team sync-team.f90)
|
|
||||||
if (gfortran_compiler AND (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 16.0.0))
|
|
||||||
- caf_compile_executable(team_number team_number.f90)
|
|
||||||
caf_compile_executable(teams_this_image teams_this_image.f90)
|
|
||||||
caf_compile_executable(teams_num_images teams_num_images.f90)
|
|
||||||
endif()
|
|
||||||
diff --git a/src/tests/unit/teams/team_number.f90 b/src/tests/unit/teams/team_number.F90
|
|
||||||
similarity index 98%
|
|
||||||
rename from src/tests/unit/teams/team_number.f90
|
|
||||||
rename to src/tests/unit/teams/team_number.F90
|
|
||||||
index e34b339d2..a50ebd676 100644
|
|
||||||
--- a/src/tests/unit/teams/team_number.f90
|
|
||||||
+++ b/src/tests/unit/teams/team_number.F90
|
|
||||||
@@ -29,7 +29,7 @@
|
|
||||||
! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
program main
|
|
||||||
!! summary: Test team_number intrinsic function
|
|
||||||
- use iso_fortran_env, only : team_type, current_team
|
|
||||||
+ use, intrinsic :: iso_fortran_env
|
|
||||||
use iso_c_binding, only : c_loc
|
|
||||||
use oc_assertions_interface, only : assert
|
|
||||||
|
|
||||||
@@ -43,7 +43,9 @@ program main
|
|
||||||
|
|
||||||
call assert(team_number()==standard_initial_value,"initial team number conforms with Fortran standard before 'change team'")
|
|
||||||
|
|
||||||
+#ifdef GCC_GE_15
|
|
||||||
call assert(team_number(get_team(current_team))==standard_initial_value,"initial team number conforms with Fortran standard before 'change team'")
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
after_change_team: block
|
|
||||||
associate(parent_team_number => 100 + (num_images()-1)/4, child_team_number => 1000 + mod(num_images()-1,4)/2)
|
|
||||||
diff --git a/src/tests/unit/teams/team_number_pre15.f90 b/src/tests/unit/teams/team_number_pre15.f90
|
|
||||||
deleted file mode 100644
|
|
||||||
index 7cc1a8758..000000000
|
|
||||||
--- a/src/tests/unit/teams/team_number_pre15.f90
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,71 +0,0 @@
|
|
||||||
-! BSD 3-Clause License
|
|
||||||
-!
|
|
||||||
-! Copyright (c) 2018-2019, Sourcery Institute
|
|
||||||
-! All rights reserved.
|
|
||||||
-!
|
|
||||||
-! Redistribution and use in source and binary forms, with or without
|
|
||||||
-! modification, are permitted provided that the following conditions are met:
|
|
||||||
-!
|
|
||||||
-! * Redistributions of source code must retain the above copyright notice, this
|
|
||||||
-! list of conditions and the following disclaimer.
|
|
||||||
-!
|
|
||||||
-! * Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
-! this list of conditions and the following disclaimer in the documentation
|
|
||||||
-! and/or other materials provided with the distribution.
|
|
||||||
-!
|
|
||||||
-! * Neither the name of the copyright holder nor the names of its
|
|
||||||
-! contributors may be used to endorse or promote products derived from
|
|
||||||
-! this software without specific prior written permission.
|
|
||||||
-!
|
|
||||||
-! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
-! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
-! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
-! DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
||||||
-! FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
-! DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
||||||
-! SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
||||||
-! CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
||||||
-! OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
-! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
-program main
|
|
||||||
- !! summary: Test team_number intrinsic function
|
|
||||||
- use iso_fortran_env, only : team_type
|
|
||||||
- use iso_c_binding, only : c_loc
|
|
||||||
- use oc_assertions_interface, only : assert
|
|
||||||
-
|
|
||||||
- implicit none
|
|
||||||
-
|
|
||||||
- integer, parameter :: standard_initial_value=-1
|
|
||||||
-
|
|
||||||
- type(team_type) :: parent, child
|
|
||||||
-
|
|
||||||
- if (num_images() < 8) error stop "I need at least 8 images to function."
|
|
||||||
-
|
|
||||||
- call assert(team_number()==standard_initial_value,"initial team number conforms with Fortran standard before 'change team'")
|
|
||||||
-
|
|
||||||
- !call assert(
|
|
||||||
- ! team_number(c_loc(home))==standard_initial_value,"initial team number conforms with Fortran standard before 'change team'"
|
|
||||||
- !)
|
|
||||||
- !! TODO: uncomment the above assertion after implementing support for team_number's optional argument:
|
|
||||||
-
|
|
||||||
- after_change_team: block
|
|
||||||
- associate(parent_team_number => 100 + (num_images()-1)/4, child_team_number => 1000 + mod(num_images()-1,4)/2)
|
|
||||||
- !! Prepare for forming two teams: my_team = 1 for even image numbers in the initial team; 2 for odd image numbers
|
|
||||||
- form team(parent_team_number,parent)
|
|
||||||
- change team(parent)
|
|
||||||
- call assert(team_number()==parent_team_number,"team number conforms with Fortran standard after 'change team'")
|
|
||||||
- form team (child_team_number, child)
|
|
||||||
- change team(child)
|
|
||||||
- call assert(team_number()==child_team_number,"team number conforms with Fortran standard after 'change team'")
|
|
||||||
- call assert(team_number(child)==child_team_number,"team_number(child) conforms with Fortran standard after 'change team'")
|
|
||||||
- call assert(team_number(parent)==parent_team_number,"team_number(parent) conforms with Fortran standard")
|
|
||||||
- end team
|
|
||||||
- end team
|
|
||||||
- call assert(team_number()==standard_initial_value,"initial team number conforms with Fortran standard")
|
|
||||||
- end associate
|
|
||||||
- end block after_change_team
|
|
||||||
-
|
|
||||||
- sync all
|
|
||||||
- if (this_image()==1) print *,"Test passed."
|
|
||||||
-
|
|
||||||
-end program
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
From c49237b2319016bfbd0acdf50de607339005c378 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andre Vehreschild <vehre@gmx.de>
|
|
||||||
Date: Mon, 14 Apr 2025 10:54:16 +0200
|
|
||||||
Subject: [PATCH] Remove wrong error.
|
|
||||||
|
|
||||||
Issuing this error was a misinterpretation of the standard.
|
|
||||||
---
|
|
||||||
src/runtime-libraries/mpi/mpi_caf.c | 8 --------
|
|
||||||
1 file changed, 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/runtime-libraries/mpi/mpi_caf.c b/src/runtime-libraries/mpi/mpi_caf.c
|
|
||||||
index 98d2a306..39dadf7d 100644
|
|
||||||
--- a/src/runtime-libraries/mpi/mpi_caf.c
|
|
||||||
+++ b/src/runtime-libraries/mpi/mpi_caf.c
|
|
||||||
@@ -10357,8 +10357,6 @@ void
|
|
||||||
PREFIX(form_team)(int team_id, caf_team_t *team, int *new_index, int *stat,
|
|
||||||
char *errmsg, charlen_t errmsg_len)
|
|
||||||
{
|
|
||||||
- static const char *duplicate_team_id
|
|
||||||
- = "FORM TEAM: Team ids have to be unique";
|
|
||||||
static const char *negative_team_id
|
|
||||||
= "FORM TEAM: Team id shall be a positive unique integer";
|
|
||||||
static const char *negative_new_index
|
|
||||||
@@ -10371,12 +10369,6 @@ PREFIX(form_team)(int team_id, caf_team_t *team, int *new_index, int *stat,
|
|
||||||
if (stat)
|
|
||||||
*stat = 0;
|
|
||||||
|
|
||||||
- for (caf_teams_list_t *cur = teams_list; cur; cur = cur->prev)
|
|
||||||
- if (cur->team_id == team_id)
|
|
||||||
- {
|
|
||||||
- caf_internal_error(duplicate_team_id, stat, errmsg, errmsg_len);
|
|
||||||
- return;
|
|
||||||
- }
|
|
||||||
if (team_id < 0)
|
|
||||||
{
|
|
||||||
caf_internal_error(negative_team_id, stat, errmsg, errmsg_len);
|
|
||||||
-100
@@ -1,100 +0,0 @@
|
|||||||
From e24b96abe083753dc5595ea5a1b4b26e6104280c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andre Vehreschild <vehre@gmx.de>
|
|
||||||
Date: Wed, 16 Apr 2025 13:38:57 +0200
|
|
||||||
Subject: [PATCH] Enhance debug logging.
|
|
||||||
|
|
||||||
---
|
|
||||||
src/runtime-libraries/mpi/mpi_caf.c | 30 +++++++++++++++++++++++------
|
|
||||||
1 file changed, 24 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/runtime-libraries/mpi/mpi_caf.c b/src/runtime-libraries/mpi/mpi_caf.c
|
|
||||||
index 39dadf7d..90b5c952 100644
|
|
||||||
--- a/src/runtime-libraries/mpi/mpi_caf.c
|
|
||||||
+++ b/src/runtime-libraries/mpi/mpi_caf.c
|
|
||||||
@@ -69,10 +69,19 @@ static char *caf_ref_type_str[] = {
|
|
||||||
#define dprint(...)
|
|
||||||
#define chk_err(...)
|
|
||||||
#else
|
|
||||||
+#ifdef GCC_GE_16
|
|
||||||
+#define dprint(format, ...) \
|
|
||||||
+ fprintf(stderr, "%d/%d (t(%d):%d/%d): %s(%d) " format, \
|
|
||||||
+ global_this_image + 1, global_num_images, \
|
|
||||||
+ current_team ? current_team->team_list_elem->team_id : -99, \
|
|
||||||
+ caf_this_image, caf_num_images, __FUNCTION__, __LINE__, \
|
|
||||||
+ ##__VA_ARGS__)
|
|
||||||
+#else
|
|
||||||
#define dprint(format, ...) \
|
|
||||||
- fprintf(stderr, "%d/%d (t:%d/%d): %s(%d) " format, global_this_image + 1, \
|
|
||||||
+ fprintf(stderr, "%d/%d (%d/%d): %s(%d) " format, global_this_image + 1, \
|
|
||||||
global_num_images, caf_this_image, caf_num_images, __FUNCTION__, \
|
|
||||||
__LINE__, ##__VA_ARGS__)
|
|
||||||
+#endif
|
|
||||||
#define chk_err(ierr) \
|
|
||||||
do \
|
|
||||||
{ \
|
|
||||||
@@ -2384,13 +2393,11 @@ PREFIX(deregister)(caf_token_t *token, int *stat, char *errmsg,
|
|
||||||
if (cur->token == *token)
|
|
||||||
{
|
|
||||||
p = TOKEN(*token);
|
|
||||||
-#ifdef GCC_GE_7
|
|
||||||
- dprint("Found regular token %p for memptr_win: %d.\n", *token,
|
|
||||||
- ((mpi_caf_token_t *)*token)->memptr_win);
|
|
||||||
-#endif
|
|
||||||
+ dprint("Found regular token %p for memptr_win: %d.\n", *token, *p);
|
|
||||||
CAF_Win_unlock_all(*p);
|
|
||||||
ierr = MPI_Win_free(p);
|
|
||||||
chk_err(ierr);
|
|
||||||
+ dprint("Window destroyed.\n");
|
|
||||||
|
|
||||||
if (cur == current_team->allocated_tokens)
|
|
||||||
current_team->allocated_tokens = cur->next;
|
|
||||||
@@ -2536,7 +2543,13 @@ PREFIX(sync_all)(int *stat, char *errmsg, charlen_t errmsg_len)
|
|
||||||
ierr = MPI_Barrier(CAF_COMM_WORLD);
|
|
||||||
chk_err(ierr);
|
|
||||||
#endif
|
|
||||||
- dprint("MPI_Barrier = %d.\n", err);
|
|
||||||
+ dprint("Sync all on team %d, MPI_Barrier = %d.\n",
|
|
||||||
+#ifdef GCC_GE_16
|
|
||||||
+ current_team->team_list_elem->team_id,
|
|
||||||
+#else
|
|
||||||
+ -1,
|
|
||||||
+#endif
|
|
||||||
+ err);
|
|
||||||
if (ierr == STAT_FAILED_IMAGE)
|
|
||||||
err = STAT_FAILED_IMAGE;
|
|
||||||
else if (ierr != 0)
|
|
||||||
@@ -10448,6 +10461,7 @@ PREFIX(change_team)(caf_team_t team, int *stat, char *errmsg,
|
|
||||||
chk_err(ierr);
|
|
||||||
ierr = MPI_Barrier(CAF_COMM_WORLD);
|
|
||||||
chk_err(ierr);
|
|
||||||
+ dprint("changed to team %d.\n", current_team->team_list_elem->team_id);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
void
|
|
||||||
@@ -10582,6 +10596,7 @@ PREFIX(end_team)(int *stat, char *errmsg, charlen_t errmsg_len)
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ dprint("ending team %d.\n", ending_team->team_list_elem->team_id);
|
|
||||||
for (struct allocated_tokens_t *ac = current_team->allocated_tokens; ac;)
|
|
||||||
{
|
|
||||||
struct allocated_tokens_t *nac = ac->next;
|
|
||||||
@@ -10601,6 +10616,7 @@ PREFIX(end_team)(int *stat, char *errmsg, charlen_t errmsg_len)
|
|
||||||
ierr = MPI_Comm_size(CAF_COMM_WORLD, &caf_num_images);
|
|
||||||
chk_err(ierr);
|
|
||||||
free(ending_team);
|
|
||||||
+ dprint("switched to team %d.\n", current_team->team_list_elem->team_id);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
void
|
|
||||||
@@ -10660,8 +10676,10 @@ PREFIX(sync_team)(caf_team_t team, int *stat, char *errmsg,
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ dprint("syncing team %d.\n", current_team->team_list_elem->team_id);
|
|
||||||
int ierr = MPI_Barrier(team_to_sync->communicator);
|
|
||||||
chk_err(ierr);
|
|
||||||
+ dprint("synced team %d.\n", current_team->team_list_elem->team_id);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
void
|
|
||||||
-115
@@ -1,115 +0,0 @@
|
|||||||
From 2431ff99e0dcd01ae98e598a7c96d26b62b7bc41 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andre Vehreschild <vehre@gmx.de>
|
|
||||||
Date: Wed, 16 Apr 2025 13:41:56 +0200
|
|
||||||
Subject: [PATCH] Add owning memory flag.
|
|
||||||
|
|
||||||
---
|
|
||||||
src/application-binary-interface/libcaf.h | 5 +-
|
|
||||||
src/runtime-libraries/mpi/mpi_caf.c | 57 +++++++++++++++++++++--
|
|
||||||
2 files changed, 58 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/application-binary-interface/libcaf.h b/src/application-binary-interface/libcaf.h
|
|
||||||
index 66a93767..bd22d5eb 100644
|
|
||||||
--- a/src/application-binary-interface/libcaf.h
|
|
||||||
+++ b/src/application-binary-interface/libcaf.h
|
|
||||||
@@ -88,7 +88,10 @@ typedef enum caf_register_t
|
|
||||||
CAF_REGTYPE_EVENT_STATIC,
|
|
||||||
CAF_REGTYPE_EVENT_ALLOC,
|
|
||||||
CAF_REGTYPE_COARRAY_ALLOC_REGISTER_ONLY,
|
|
||||||
- CAF_REGTYPE_COARRAY_ALLOC_ALLOCATE_ONLY
|
|
||||||
+ CAF_REGTYPE_COARRAY_ALLOC_ALLOCATE_ONLY,
|
|
||||||
+#ifdef GCC_GE_16
|
|
||||||
+ CAF_REGTYPE_COARRAY_MAP_EXISTING,
|
|
||||||
+#endif
|
|
||||||
} caf_register_t;
|
|
||||||
|
|
||||||
/* Describes the action to take on _caf_deregister. Keep in sync with
|
|
||||||
diff --git a/src/runtime-libraries/mpi/mpi_caf.c b/src/runtime-libraries/mpi/mpi_caf.c
|
|
||||||
index 90b5c952..1d6075b5 100644
|
|
||||||
--- a/src/runtime-libraries/mpi/mpi_caf.c
|
|
||||||
+++ b/src/runtime-libraries/mpi/mpi_caf.c
|
|
||||||
@@ -121,6 +121,11 @@ typedef struct mpi_caf_token_t
|
|
||||||
/* The pointer to the primary array, i.e., to coarrays that are arrays and
|
|
||||||
* not a derived type. */
|
|
||||||
gfc_descriptor_t *desc;
|
|
||||||
+#ifdef GCC_GE_16
|
|
||||||
+ /* Only set to false, when this token maps memory into another token's
|
|
||||||
+ * memory segment. This only happens when in an associate or a change team. */
|
|
||||||
+ int owning_memory;
|
|
||||||
+#endif
|
|
||||||
} mpi_caf_token_t;
|
|
||||||
|
|
||||||
/* For components of derived type coarrays a slave_token is needed when the
|
|
||||||
@@ -2147,6 +2152,38 @@ void PREFIX(register)(size_t size, caf_register_t type, caf_token_t *token,
|
|
||||||
slave_token, slave_token->memptr, slave_token->desc);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
+#ifdef GCC_GE_16
|
|
||||||
+ case CAF_REGTYPE_COARRAY_MAP_EXISTING:
|
|
||||||
+ {
|
|
||||||
+ mpi_caf_token_t *mpi_token;
|
|
||||||
+ MPI_Win *p;
|
|
||||||
+
|
|
||||||
+ *token = calloc(1, sizeof(mpi_caf_token_t));
|
|
||||||
+ mpi_token = (mpi_caf_token_t *)(*token);
|
|
||||||
+ p = TOKEN(mpi_token);
|
|
||||||
+ mem = desc->base_addr;
|
|
||||||
+ ierr = MPI_Win_create(mem, actual_size, 1, MPI_INFO_NULL,
|
|
||||||
+ CAF_COMM_WORLD, p);
|
|
||||||
+ chk_err(ierr);
|
|
||||||
+ CAF_Win_lock_all(*p);
|
|
||||||
+ mpi_token->owning_memory = 0;
|
|
||||||
+
|
|
||||||
+ struct allocated_tokens_t *allocated_token
|
|
||||||
+ = malloc(sizeof(struct allocated_tokens_t));
|
|
||||||
+ allocated_token->next = current_team->allocated_tokens;
|
|
||||||
+ allocated_token->token = *token;
|
|
||||||
+ current_team->allocated_tokens = allocated_token;
|
|
||||||
+
|
|
||||||
+ if (stat)
|
|
||||||
+ *stat = 0;
|
|
||||||
+
|
|
||||||
+ mpi_token->memptr = mem;
|
|
||||||
+ dprint("Token %p on exit of mapping: mpi_caf_token_t "
|
|
||||||
+ "{ (local_)memptr: %p (size: %zd), memptr_win: %d }\n",
|
|
||||||
+ mpi_token, mpi_token->memptr, size, mpi_token->memptr_win);
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
mpi_caf_token_t *mpi_token;
|
|
||||||
@@ -2168,6 +2205,9 @@ void PREFIX(register)(size_t size, caf_register_t type, caf_token_t *token,
|
|
||||||
CAF_COMM_WORLD, p);
|
|
||||||
chk_err(ierr);
|
|
||||||
#endif // MPI_VERSION
|
|
||||||
+#ifdef GCC_GE_16
|
|
||||||
+ mpi_token->owning_memory = 1;
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
#ifndef GCC_GE_8
|
|
||||||
if (GFC_DESCRIPTOR_RANK(desc) != 0)
|
|
||||||
@@ -10601,9 +10641,20 @@ PREFIX(end_team)(int *stat, char *errmsg, charlen_t errmsg_len)
|
|
||||||
{
|
|
||||||
struct allocated_tokens_t *nac = ac->next;
|
|
||||||
|
|
||||||
- PREFIX(deregister)((void **)&ac->token,
|
|
||||||
- CAF_DEREGTYPE_COARRAY_DEALLOCATE_ONLY, stat, errmsg,
|
|
||||||
- errmsg_len);
|
|
||||||
+ if (((mpi_caf_token_t *)ac->token)->owning_memory)
|
|
||||||
+ PREFIX(deregister)((void **)&ac->token,
|
|
||||||
+ CAF_DEREGTYPE_COARRAY_DEALLOCATE_ONLY, stat, errmsg,
|
|
||||||
+ errmsg_len);
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ MPI_Win *p = TOKEN(ac->token);
|
|
||||||
+
|
|
||||||
+ CAF_Win_unlock_all(*p);
|
|
||||||
+ ierr = MPI_Win_free(p);
|
|
||||||
+ chk_err(ierr);
|
|
||||||
+
|
|
||||||
+ free(ac->token);
|
|
||||||
+ }
|
|
||||||
free(ac);
|
|
||||||
ac = nac;
|
|
||||||
}
|
|
||||||
-32
@@ -1,32 +0,0 @@
|
|||||||
From d1ab79d2459f10ca2b239bfeb03aa6e0e30c236b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andre Vehreschild <vehre@gmx.de>
|
|
||||||
Date: Wed, 16 Apr 2025 13:55:46 +0200
|
|
||||||
Subject: [PATCH] Keep team_translate rework.
|
|
||||||
|
|
||||||
---
|
|
||||||
src/runtime-libraries/mpi/mpi_caf.c | 11 +++++++++++
|
|
||||||
1 file changed, 11 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/runtime-libraries/mpi/mpi_caf.c b/src/runtime-libraries/mpi/mpi_caf.c
|
|
||||||
index 1d6075b5..500a4316 100644
|
|
||||||
--- a/src/runtime-libraries/mpi/mpi_caf.c
|
|
||||||
+++ b/src/runtime-libraries/mpi/mpi_caf.c
|
|
||||||
@@ -5752,7 +5752,18 @@ team_translate(int *remote_image, int *this_image, caf_token_t token,
|
|
||||||
|
|
||||||
#ifdef GCC_GE_16
|
|
||||||
if (team)
|
|
||||||
+ {
|
|
||||||
+ caf_team_stack_node_t *cur = current_team;
|
|
||||||
+ while (cur && cur->team_list_elem != *team)
|
|
||||||
+ cur = cur->parent;
|
|
||||||
+ if (!cur)
|
|
||||||
+ {
|
|
||||||
+ caf_internal_error("Team %d is not active", stat, NULL, 0,
|
|
||||||
+ (*(caf_teams_list_t **)team)->team_id);
|
|
||||||
+ return false;
|
|
||||||
+ }
|
|
||||||
comm = (*(caf_teams_list_t **)team)->communicator;
|
|
||||||
+ }
|
|
||||||
else if (team_number)
|
|
||||||
{
|
|
||||||
bool found = false;
|
|
||||||
-430
@@ -1,430 +0,0 @@
|
|||||||
From 85914915f543ee3ccf1ea0f826f3af0c1d59789f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andre Vehreschild <vehre@gmx.de>
|
|
||||||
Date: Mon, 28 Apr 2025 09:08:06 +0200
|
|
||||||
Subject: [PATCH] Use COMM_TEAM instead of COMM_WORLD.
|
|
||||||
|
|
||||||
Revert changes to CAF_COMM_WORLD and introduce CAF_COMM_TEAM.
|
|
||||||
Let all communication happen on CAF_COMM_WORLD and map the
|
|
||||||
image indexes accordingly. Use CAF_COMM_TEAM for all collective
|
|
||||||
ops.
|
|
||||||
---
|
|
||||||
src/runtime-libraries/mpi/mpi_caf.c | 155 ++++++++++++++--------------
|
|
||||||
1 file changed, 78 insertions(+), 77 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/runtime-libraries/mpi/mpi_caf.c b/src/runtime-libraries/mpi/mpi_caf.c
|
|
||||||
index 500a4316..c1599af3 100644
|
|
||||||
--- a/src/runtime-libraries/mpi/mpi_caf.c
|
|
||||||
+++ b/src/runtime-libraries/mpi/mpi_caf.c
|
|
||||||
@@ -358,11 +358,12 @@ typedef struct gfc_max_dim_descriptor_t
|
|
||||||
|
|
||||||
char err_buffer[MPI_MAX_ERROR_STRING];
|
|
||||||
|
|
||||||
-#ifdef GCC_GE_16
|
|
||||||
/* All CAF runtime calls should use this comm instead of MPI_COMM_WORLD for
|
|
||||||
* interoperability purposes. */
|
|
||||||
-MPI_Comm *CAF_COMM_WORLD_store;
|
|
||||||
-#define CAF_COMM_WORLD (*CAF_COMM_WORLD_store)
|
|
||||||
+MPI_Comm CAF_COMM_WORLD;
|
|
||||||
+
|
|
||||||
+#ifdef GCC_GE_16
|
|
||||||
+#define CAF_COMM_TEAM current_team->team_list_elem->communicator
|
|
||||||
|
|
||||||
typedef struct caf_teams_list
|
|
||||||
{
|
|
||||||
@@ -390,10 +391,10 @@ typedef struct caf_team_stack_node
|
|
||||||
|
|
||||||
static caf_teams_list_t *teams_list = NULL;
|
|
||||||
static caf_team_stack_node_t *current_team = NULL, *initial_team;
|
|
||||||
+
|
|
||||||
#else
|
|
||||||
-/* All CAF runtime calls should use this comm instead of MPI_COMM_WORLD for
|
|
||||||
- * interoperability purposes. */
|
|
||||||
-MPI_Comm CAF_COMM_WORLD;
|
|
||||||
+
|
|
||||||
+#define CAF_COMM_TEAM CAF_COMM_WORLD
|
|
||||||
|
|
||||||
typedef struct caf_teams_list
|
|
||||||
{
|
|
||||||
@@ -1527,9 +1528,6 @@ PREFIX(init)(int *argc, char ***argv)
|
|
||||||
/* Flag rc as unused, because conditional compilation. */
|
|
||||||
int ierr = 0, i = 0, j = 0, rc __attribute__((unused)), prov_lev = 0;
|
|
||||||
int is_init = 0, prior_thread_level = MPI_THREAD_MULTIPLE;
|
|
||||||
-#ifdef GCC_GE_16
|
|
||||||
- MPI_Comm tmp_world;
|
|
||||||
-#endif
|
|
||||||
|
|
||||||
ierr = MPI_Initialized(&is_init);
|
|
||||||
chk_err(ierr);
|
|
||||||
@@ -1576,12 +1574,8 @@ PREFIX(init)(int *argc, char ***argv)
|
|
||||||
|
|
||||||
/* Duplicate MPI_COMM_WORLD so that no CAF internal functions use it.
|
|
||||||
* This is critical for MPI-interoperability. */
|
|
||||||
-#ifdef GCC_GE_16
|
|
||||||
- rc = MPI_Comm_dup(MPI_COMM_WORLD, &tmp_world);
|
|
||||||
- CAF_COMM_WORLD_store = &tmp_world;
|
|
||||||
-#else
|
|
||||||
rc = MPI_Comm_dup(MPI_COMM_WORLD, &CAF_COMM_WORLD);
|
|
||||||
-#endif
|
|
||||||
+
|
|
||||||
#ifdef WITH_FAILED_IMAGES
|
|
||||||
flag = (MPI_SUCCESS == rc);
|
|
||||||
rc = MPIX_Comm_agree(MPI_COMM_WORLD, &flag);
|
|
||||||
@@ -1625,8 +1619,8 @@ PREFIX(init)(int *argc, char ***argv)
|
|
||||||
/* BEGIN teams preparations. */
|
|
||||||
#ifdef GCC_GE_16
|
|
||||||
teams_list = (caf_teams_list_t *)malloc(sizeof(caf_teams_list_t));
|
|
||||||
- *teams_list = (struct caf_teams_list){tmp_world, -1, caf_this_image, NULL};
|
|
||||||
- CAF_COMM_WORLD_store = &teams_list->communicator;
|
|
||||||
+ *teams_list
|
|
||||||
+ = (struct caf_teams_list){CAF_COMM_WORLD, -1, caf_this_image, NULL};
|
|
||||||
current_team
|
|
||||||
= (caf_team_stack_node_t *)malloc(sizeof(caf_team_stack_node_t));
|
|
||||||
*current_team = (struct caf_team_stack_node){teams_list, NULL};
|
|
||||||
@@ -2162,8 +2156,8 @@ void PREFIX(register)(size_t size, caf_register_t type, caf_token_t *token,
|
|
||||||
mpi_token = (mpi_caf_token_t *)(*token);
|
|
||||||
p = TOKEN(mpi_token);
|
|
||||||
mem = desc->base_addr;
|
|
||||||
- ierr = MPI_Win_create(mem, actual_size, 1, MPI_INFO_NULL,
|
|
||||||
- CAF_COMM_WORLD, p);
|
|
||||||
+ ierr = MPI_Win_create(mem, actual_size, 1, MPI_INFO_NULL, CAF_COMM_TEAM,
|
|
||||||
+ p);
|
|
||||||
chk_err(ierr);
|
|
||||||
CAF_Win_lock_all(*p);
|
|
||||||
mpi_token->owning_memory = 0;
|
|
||||||
@@ -2194,15 +2188,15 @@ void PREFIX(register)(size_t size, caf_register_t type, caf_token_t *token,
|
|
||||||
p = TOKEN(mpi_token);
|
|
||||||
|
|
||||||
#if MPI_VERSION >= 3
|
|
||||||
- ierr = MPI_Win_allocate(actual_size, 1, MPI_INFO_NULL, CAF_COMM_WORLD,
|
|
||||||
+ ierr = MPI_Win_allocate(actual_size, 1, MPI_INFO_NULL, CAF_COMM_TEAM,
|
|
||||||
&mem, p);
|
|
||||||
chk_err(ierr);
|
|
||||||
CAF_Win_lock_all(*p);
|
|
||||||
#else
|
|
||||||
ierr = MPI_Alloc_mem(actual_size, MPI_INFO_NULL, &mem);
|
|
||||||
chk_err(ierr);
|
|
||||||
- ierr = MPI_Win_create(mem, actual_size, 1, MPI_INFO_NULL,
|
|
||||||
- CAF_COMM_WORLD, p);
|
|
||||||
+ ierr = MPI_Win_create(mem, actual_size, 1, MPI_INFO_NULL, CAF_COMM_TEAM,
|
|
||||||
+ p);
|
|
||||||
chk_err(ierr);
|
|
||||||
#endif // MPI_VERSION
|
|
||||||
#ifdef GCC_GE_16
|
|
||||||
@@ -2415,7 +2409,7 @@ PREFIX(deregister)(caf_token_t *token, int *stat, char *errmsg,
|
|
||||||
/* Sync all images only, when deregistering the token. Just freeing the
|
|
||||||
* memory needs no sync. */
|
|
||||||
#ifdef WITH_FAILED_IMAGES
|
|
||||||
- ierr = MPI_Barrier(CAF_COMM_WORLD);
|
|
||||||
+ ierr = MPI_Barrier(CAF_COMM_TEAM);
|
|
||||||
chk_err(ierr);
|
|
||||||
#else
|
|
||||||
PREFIX(sync_all)(NULL, NULL, 0);
|
|
||||||
@@ -5742,13 +5736,13 @@ get_from_self(caf_token_t token, const gfc_descriptor_t *opt_src_desc,
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
|
||||||
-team_translate(int *remote_image, int *this_image, caf_token_t token,
|
|
||||||
- int image_index, caf_team_t *team, int *team_number, int *stat)
|
|
||||||
+team_translate(int *remote_image, int *this_image,
|
|
||||||
+ caf_token_t token __attribute__((unused)), int image_index,
|
|
||||||
+ caf_team_t *team, int *team_number, int *stat)
|
|
||||||
{
|
|
||||||
- MPI_Group current_team_group, win_group;
|
|
||||||
- int ierr;
|
|
||||||
- int trans_ranks[2];
|
|
||||||
- MPI_Comm comm = CAF_COMM_WORLD;
|
|
||||||
+ MPI_Group world_group, team_group, remote_group;
|
|
||||||
+ int ierr, trans, team_id = current_team->team_list_elem->team_id;
|
|
||||||
+ MPI_Comm remote_comm = MPI_COMM_NULL;
|
|
||||||
|
|
||||||
#ifdef GCC_GE_16
|
|
||||||
if (team)
|
|
||||||
@@ -5762,7 +5756,8 @@ team_translate(int *remote_image, int *this_image, caf_token_t token,
|
|
||||||
(*(caf_teams_list_t **)team)->team_id);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
- comm = (*(caf_teams_list_t **)team)->communicator;
|
|
||||||
+ remote_comm = (*(caf_teams_list_t **)team)->communicator;
|
|
||||||
+ team_id = (*(caf_teams_list_t **)team)->team_id;
|
|
||||||
}
|
|
||||||
else if (team_number)
|
|
||||||
{
|
|
||||||
@@ -5770,7 +5765,8 @@ team_translate(int *remote_image, int *this_image, caf_token_t token,
|
|
||||||
for (caf_team_stack_node_t *cur = current_team; cur; cur = cur->parent)
|
|
||||||
if (cur->team_list_elem->team_id == *team_number)
|
|
||||||
{
|
|
||||||
- comm = cur->team_list_elem->communicator;
|
|
||||||
+ remote_comm = cur->team_list_elem->communicator;
|
|
||||||
+ team_id = cur->team_list_elem->team_id;
|
|
||||||
found = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
@@ -5783,20 +5779,30 @@ team_translate(int *remote_image, int *this_image, caf_token_t token,
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
- ierr = MPI_Comm_group(comm, ¤t_team_group);
|
|
||||||
+ ierr = MPI_Comm_group(CAF_COMM_WORLD, &world_group);
|
|
||||||
chk_err(ierr);
|
|
||||||
- ierr = MPI_Win_get_group(*TOKEN(token), &win_group);
|
|
||||||
+ if (remote_comm == MPI_COMM_NULL)
|
|
||||||
+ ierr = MPI_Comm_group(CAF_COMM_TEAM, &remote_group);
|
|
||||||
+ else
|
|
||||||
+ ierr = MPI_Comm_group(remote_comm, &remote_group);
|
|
||||||
chk_err(ierr);
|
|
||||||
- ierr = MPI_Group_translate_ranks(current_team_group, 2,
|
|
||||||
- (int[]){image_index - 1, mpi_this_image},
|
|
||||||
- win_group, trans_ranks);
|
|
||||||
+ ierr = MPI_Comm_group(CAF_COMM_TEAM, &team_group);
|
|
||||||
chk_err(ierr);
|
|
||||||
- *remote_image = trans_ranks[0];
|
|
||||||
- *this_image = trans_ranks[1];
|
|
||||||
- ierr = MPI_Group_free(¤t_team_group);
|
|
||||||
+ trans = image_index - 1;
|
|
||||||
+ ierr = MPI_Group_translate_ranks(team_group, 1, &mpi_this_image, world_group,
|
|
||||||
+ this_image);
|
|
||||||
chk_err(ierr);
|
|
||||||
- ierr = MPI_Group_free(&win_group);
|
|
||||||
+ ierr = MPI_Group_translate_ranks(remote_group, 1, &trans, world_group,
|
|
||||||
+ remote_image);
|
|
||||||
+ chk_err(ierr);
|
|
||||||
+ ierr = MPI_Group_free(&remote_group);
|
|
||||||
+ chk_err(ierr);
|
|
||||||
+ ierr = MPI_Group_free(&team_group);
|
|
||||||
chk_err(ierr);
|
|
||||||
+ ierr = MPI_Group_free(&world_group);
|
|
||||||
+ chk_err(ierr);
|
|
||||||
+ dprint("this: %d -> %d, rmt: %d -> %d on team %d.\n", caf_this_image,
|
|
||||||
+ *this_image + 1, image_index, *remote_image + 1, team_id);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -5889,7 +5895,7 @@ PREFIX(get_from_remote)(caf_token_t token, const gfc_descriptor_t *opt_src_desc,
|
|
||||||
msg->transfer_size = dst_size;
|
|
||||||
msg->opt_charlen = opt_src_charlen ? *opt_src_charlen : 0;
|
|
||||||
msg->win = *TOKEN(token);
|
|
||||||
- msg->dest_image = mpi_this_image;
|
|
||||||
+ msg->dest_image = this_image;
|
|
||||||
msg->dest_tag = CAF_CT_TAG + 1;
|
|
||||||
msg->dest_opt_charlen = opt_dst_charlen ? *opt_dst_charlen : 1;
|
|
||||||
msg->flags = (opt_dst_desc ? CT_DST_HAS_DESC : 0)
|
|
||||||
@@ -5932,13 +5938,12 @@ PREFIX(get_from_remote)(caf_token_t token, const gfc_descriptor_t *opt_src_desc,
|
|
||||||
caf_runtime_error("Unable to allocate memory "
|
|
||||||
"for internal buffer in get_from_remote().");
|
|
||||||
}
|
|
||||||
- dprint("waiting to receive %zd bytes from %d.\n", dst_size,
|
|
||||||
- image_index - 1);
|
|
||||||
- ierr = MPI_Recv(t_buff, dst_size, MPI_BYTE, image_index - 1, msg->dest_tag,
|
|
||||||
+ dprint("waiting to receive %zd bytes from %d.\n", dst_size, remote_image);
|
|
||||||
+ ierr = MPI_Recv(t_buff, dst_size, MPI_BYTE, remote_image, msg->dest_tag,
|
|
||||||
CAF_COMM_WORLD, MPI_STATUS_IGNORE);
|
|
||||||
chk_err(ierr);
|
|
||||||
dprint("received %zd bytes as requested from %d.\n", dst_size,
|
|
||||||
- image_index - 1);
|
|
||||||
+ remote_image);
|
|
||||||
// dump_mem("get_from_remote", t_buff, dst_size);
|
|
||||||
memcpy(*dst_data, t_buff, dst_size);
|
|
||||||
|
|
||||||
@@ -6276,7 +6281,7 @@ PREFIX(send_to_remote)(caf_token_t token, gfc_descriptor_t *opt_dst_desc,
|
|
||||||
msg->transfer_size = src_size;
|
|
||||||
msg->opt_charlen = opt_src_charlen ? *opt_src_charlen : 0;
|
|
||||||
msg->win = *TOKEN(token);
|
|
||||||
- msg->dest_image = mpi_this_image;
|
|
||||||
+ msg->dest_image = this_image;
|
|
||||||
msg->dest_tag = CAF_CT_TAG + 1;
|
|
||||||
msg->dest_opt_charlen = opt_dst_charlen ? *opt_dst_charlen : 1;
|
|
||||||
msg->flags = (opt_dst_desc ? CT_DST_HAS_DESC : 0)
|
|
||||||
@@ -6317,13 +6322,13 @@ PREFIX(send_to_remote)(caf_token_t token, gfc_descriptor_t *opt_dst_desc,
|
|
||||||
|
|
||||||
{
|
|
||||||
char c;
|
|
||||||
- dprint("waiting to receive %d bytes from %d on tag %d.\n", 1, image_index,
|
|
||||||
+ dprint("waiting to receive 1 byte from %d on tag %d.\n", remote_image,
|
|
||||||
msg->dest_tag);
|
|
||||||
- ierr = MPI_Recv(&c, 1, MPI_BYTE, image_index - 1, msg->dest_tag,
|
|
||||||
+ ierr = MPI_Recv(&c, 1, MPI_BYTE, remote_image, msg->dest_tag,
|
|
||||||
CAF_COMM_WORLD, MPI_STATUS_IGNORE);
|
|
||||||
chk_err(ierr);
|
|
||||||
- dprint("received %d bytes as requested from %d on tag %d.\n", 1,
|
|
||||||
- image_index, msg->dest_tag);
|
|
||||||
+ dprint("received 1 byte as requested from %d on tag %d.\n", remote_image,
|
|
||||||
+ msg->dest_tag);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (running_accesses == rat)
|
|
||||||
@@ -6383,9 +6388,7 @@ PREFIX(transfer_between_remotes)(
|
|
||||||
caf_team_t *dst_team, int *dst_team_number, caf_team_t *src_team,
|
|
||||||
int *src_team_number)
|
|
||||||
{
|
|
||||||
- MPI_Group current_team_group, win_group;
|
|
||||||
int ierr, this_image, src_remote_image, dst_remote_image;
|
|
||||||
- int trans_ranks[3];
|
|
||||||
bool free_msg;
|
|
||||||
ct_msg_t *full_msg, *dst_msg;
|
|
||||||
struct transfer_msg_data_t *tmd;
|
|
||||||
@@ -6545,7 +6548,7 @@ PREFIX(transfer_between_remotes)(
|
|
||||||
dst_msg->transfer_size = src_size;
|
|
||||||
dst_msg->opt_charlen = opt_src_charlen ? *opt_src_charlen : 0;
|
|
||||||
dst_msg->win = *TOKEN(dst_token);
|
|
||||||
- dst_msg->dest_image = mpi_this_image;
|
|
||||||
+ dst_msg->dest_image = this_image;
|
|
||||||
dst_msg->dest_tag = CAF_CT_TAG + 1;
|
|
||||||
dst_msg->dest_opt_charlen = opt_dst_charlen ? *opt_dst_charlen : 1;
|
|
||||||
dst_msg->flags
|
|
||||||
@@ -6588,15 +6591,15 @@ PREFIX(transfer_between_remotes)(
|
|
||||||
|
|
||||||
{
|
|
||||||
char c;
|
|
||||||
- dprint("waiting to receive %d bytes from %d on tag %d.\n", 1,
|
|
||||||
- dst_image_index, dst_msg->dest_tag);
|
|
||||||
- ierr = MPI_Recv(&c, 1, MPI_BYTE, dst_image_index - 1, dst_msg->dest_tag,
|
|
||||||
+ dprint("waiting to receive 1 byte from %d on tag %d.\n", dst_remote_image,
|
|
||||||
+ dst_msg->dest_tag);
|
|
||||||
+ ierr = MPI_Recv(&c, 1, MPI_BYTE, dst_remote_image, dst_msg->dest_tag,
|
|
||||||
CAF_COMM_WORLD, MPI_STATUS_IGNORE);
|
|
||||||
chk_err(ierr);
|
|
||||||
if (dst_stat)
|
|
||||||
*dst_stat = c;
|
|
||||||
- dprint("received %d bytes as requested from %d on tag %d.\n", 1,
|
|
||||||
- dst_image_index, dst_msg->dest_tag);
|
|
||||||
+ dprint("received 1 byte as requested from %d on tag %d.\n",
|
|
||||||
+ dst_remote_image, dst_msg->dest_tag);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (running_accesses == rat)
|
|
||||||
@@ -9509,19 +9512,19 @@ internal_co_reduce(MPI_Op op, gfc_descriptor_t *source, int result_image,
|
|
||||||
if (result_image == 0)
|
|
||||||
{
|
|
||||||
ierr = MPI_Allreduce(MPI_IN_PLACE, source->base_addr, size, datatype, op,
|
|
||||||
- CAF_COMM_WORLD);
|
|
||||||
+ CAF_COMM_TEAM);
|
|
||||||
chk_err(ierr);
|
|
||||||
}
|
|
||||||
else if (result_image == caf_this_image)
|
|
||||||
{
|
|
||||||
ierr = MPI_Reduce(MPI_IN_PLACE, source->base_addr, size, datatype, op,
|
|
||||||
- result_image - 1, CAF_COMM_WORLD);
|
|
||||||
+ result_image - 1, CAF_COMM_TEAM);
|
|
||||||
chk_err(ierr);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ierr = MPI_Reduce(source->base_addr, NULL, size, datatype, op,
|
|
||||||
- result_image - 1, CAF_COMM_WORLD);
|
|
||||||
+ result_image - 1, CAF_COMM_TEAM);
|
|
||||||
chk_err(ierr);
|
|
||||||
}
|
|
||||||
if (ierr)
|
|
||||||
@@ -9543,19 +9546,19 @@ internal_co_reduce(MPI_Op op, gfc_descriptor_t *source, int result_image,
|
|
||||||
+ array_offset_sr * GFC_DESCRIPTOR_SIZE(source));
|
|
||||||
if (result_image == 0)
|
|
||||||
{
|
|
||||||
- ierr = MPI_Allreduce(MPI_IN_PLACE, sr, 1, datatype, op, CAF_COMM_WORLD);
|
|
||||||
+ ierr = MPI_Allreduce(MPI_IN_PLACE, sr, 1, datatype, op, CAF_COMM_TEAM);
|
|
||||||
chk_err(ierr);
|
|
||||||
}
|
|
||||||
else if (result_image == caf_this_image)
|
|
||||||
{
|
|
||||||
ierr = MPI_Reduce(MPI_IN_PLACE, sr, 1, datatype, op, result_image - 1,
|
|
||||||
- CAF_COMM_WORLD);
|
|
||||||
+ CAF_COMM_TEAM);
|
|
||||||
chk_err(ierr);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ierr = MPI_Reduce(sr, NULL, 1, datatype, op, result_image - 1,
|
|
||||||
- CAF_COMM_WORLD);
|
|
||||||
+ CAF_COMM_TEAM);
|
|
||||||
chk_err(ierr);
|
|
||||||
}
|
|
||||||
if (ierr)
|
|
||||||
@@ -9618,13 +9621,13 @@ PREFIX(co_broadcast)(gfc_descriptor_t *a, int source_image, int *stat,
|
|
||||||
if (datatype == MPI_BYTE)
|
|
||||||
{
|
|
||||||
ierr = MPI_Bcast(a->base_addr, size * GFC_DESCRIPTOR_SIZE(a), datatype,
|
|
||||||
- source_image - 1, CAF_COMM_WORLD);
|
|
||||||
+ source_image - 1, CAF_COMM_TEAM);
|
|
||||||
chk_err(ierr);
|
|
||||||
}
|
|
||||||
else if (datatype != MPI_CHARACTER)
|
|
||||||
{
|
|
||||||
ierr = MPI_Bcast(a->base_addr, size, datatype, source_image - 1,
|
|
||||||
- CAF_COMM_WORLD);
|
|
||||||
+ CAF_COMM_TEAM);
|
|
||||||
chk_err(ierr);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
@@ -9633,13 +9636,13 @@ PREFIX(co_broadcast)(gfc_descriptor_t *a, int source_image, int *stat,
|
|
||||||
if (caf_this_image == source_image)
|
|
||||||
a_length = strlen(a->base_addr);
|
|
||||||
/* Broadcast the string lenth */
|
|
||||||
- ierr = MPI_Bcast(&a_length, 1, MPI_INT, source_image - 1, CAF_COMM_WORLD);
|
|
||||||
+ ierr = MPI_Bcast(&a_length, 1, MPI_INT, source_image - 1, CAF_COMM_TEAM);
|
|
||||||
chk_err(ierr);
|
|
||||||
if (ierr)
|
|
||||||
goto error;
|
|
||||||
/* Broadcast the string itself */
|
|
||||||
ierr = MPI_Bcast(a->base_addr, a_length, datatype, source_image - 1,
|
|
||||||
- CAF_COMM_WORLD);
|
|
||||||
+ CAF_COMM_TEAM);
|
|
||||||
chk_err(ierr);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -9668,7 +9671,7 @@ PREFIX(co_broadcast)(gfc_descriptor_t *a, int source_image, int *stat,
|
|
||||||
void *sr = (void *)((char *)a->base_addr
|
|
||||||
+ array_offset * GFC_DESCRIPTOR_SIZE(a));
|
|
||||||
|
|
||||||
- ierr = MPI_Bcast(sr, 1, datatype, source_image - 1, CAF_COMM_WORLD);
|
|
||||||
+ ierr = MPI_Bcast(sr, 1, datatype, source_image - 1, CAF_COMM_TEAM);
|
|
||||||
chk_err(ierr);
|
|
||||||
|
|
||||||
if (ierr)
|
|
||||||
@@ -10426,7 +10429,7 @@ PREFIX(form_team)(int team_id, caf_team_t *team, int *new_index, int *stat,
|
|
||||||
static const char *negative_new_index
|
|
||||||
= "FORM TEAM: NEW_INDEX= shall be a positive unique integer";
|
|
||||||
caf_teams_list_t *new_team;
|
|
||||||
- MPI_Comm current_comm = CAF_COMM_WORLD;
|
|
||||||
+ MPI_Comm current_comm = CAF_COMM_TEAM;
|
|
||||||
int ierr;
|
|
||||||
int key = new_index ? *new_index : caf_this_image;
|
|
||||||
|
|
||||||
@@ -10504,13 +10507,12 @@ PREFIX(change_team)(caf_team_t team, int *stat, char *errmsg,
|
|
||||||
= (caf_team_stack_node_t){provisioned_team, NULL, current_team};
|
|
||||||
|
|
||||||
current_team = new_current_team;
|
|
||||||
- CAF_COMM_WORLD_store = ¤t_team->team_list_elem->communicator;
|
|
||||||
- ierr = MPI_Comm_rank(CAF_COMM_WORLD, &mpi_this_image);
|
|
||||||
+ ierr = MPI_Comm_rank(CAF_COMM_TEAM, &mpi_this_image);
|
|
||||||
chk_err(ierr);
|
|
||||||
caf_this_image = mpi_this_image + 1;
|
|
||||||
- ierr = MPI_Comm_size(CAF_COMM_WORLD, &caf_num_images);
|
|
||||||
+ ierr = MPI_Comm_size(CAF_COMM_TEAM, &caf_num_images);
|
|
||||||
chk_err(ierr);
|
|
||||||
- ierr = MPI_Barrier(CAF_COMM_WORLD);
|
|
||||||
+ ierr = MPI_Barrier(CAF_COMM_TEAM);
|
|
||||||
chk_err(ierr);
|
|
||||||
dprint("changed to team %d.\n", current_team->team_list_elem->team_id);
|
|
||||||
}
|
|
||||||
@@ -10638,7 +10640,7 @@ PREFIX(end_team)(int *stat, char *errmsg, charlen_t errmsg_len)
|
|
||||||
if (stat)
|
|
||||||
*stat = 0;
|
|
||||||
|
|
||||||
- ierr = MPI_Barrier(CAF_COMM_WORLD);
|
|
||||||
+ ierr = MPI_Barrier(CAF_COMM_TEAM);
|
|
||||||
chk_err(ierr);
|
|
||||||
if (current_team->parent == NULL)
|
|
||||||
{
|
|
||||||
@@ -10671,11 +10673,10 @@ PREFIX(end_team)(int *stat, char *errmsg, charlen_t errmsg_len)
|
|
||||||
}
|
|
||||||
current_team = current_team->parent;
|
|
||||||
|
|
||||||
- CAF_COMM_WORLD_store = ¤t_team->team_list_elem->communicator;
|
|
||||||
- ierr = MPI_Comm_rank(CAF_COMM_WORLD, &mpi_this_image);
|
|
||||||
+ ierr = MPI_Comm_rank(CAF_COMM_TEAM, &mpi_this_image);
|
|
||||||
chk_err(ierr);
|
|
||||||
caf_this_image = mpi_this_image + 1;
|
|
||||||
- ierr = MPI_Comm_size(CAF_COMM_WORLD, &caf_num_images);
|
|
||||||
+ ierr = MPI_Comm_size(CAF_COMM_TEAM, &caf_num_images);
|
|
||||||
chk_err(ierr);
|
|
||||||
free(ending_team);
|
|
||||||
dprint("switched to team %d.\n", current_team->team_list_elem->team_id);
|
|
||||||
-232
@@ -1,232 +0,0 @@
|
|||||||
From a13970883e7b9cc7989efd7877534252c0317f06 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andre Vehreschild <vehre@gmx.de>
|
|
||||||
Date: Thu, 17 Apr 2025 11:57:47 +0200
|
|
||||||
Subject: [PATCH] Add more "beefy" tests.
|
|
||||||
|
|
||||||
Add tests that really make use of teams and not only a smoke test.
|
|
||||||
---
|
|
||||||
CMakeLists.txt | 4 +-
|
|
||||||
src/tests/unit/teams/CMakeLists.txt | 2 +
|
|
||||||
src/tests/unit/teams/teams_coindexed.f90 | 111 +++++++++++++++++++++++
|
|
||||||
src/tests/unit/teams/test_teams_1.f90 | 66 ++++++++++++++
|
|
||||||
4 files changed, 182 insertions(+), 1 deletion(-)
|
|
||||||
create mode 100644 src/tests/unit/teams/teams_coindexed.f90
|
|
||||||
create mode 100644 src/tests/unit/teams/test_teams_1.f90
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 8f9ee35a..0dbb85a0 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -818,9 +818,11 @@ if(opencoarrays_aware_compiler)
|
|
||||||
add_caf_test(alloc_comp_multidim_shape 2 alloc_comp_multidim_shape)
|
|
||||||
set_tests_properties(alloc_comp_multidim_shape PROPERTIES TIMEOUT 300)
|
|
||||||
endif()
|
|
||||||
- if(NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 15)
|
|
||||||
+ if(NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 16)
|
|
||||||
add_caf_test(teams_this_image 8 teams_this_image)
|
|
||||||
add_caf_test(teams_num_images 8 teams_num_images)
|
|
||||||
+ add_caf_test(test_teams_1 9 test_teams_1)
|
|
||||||
+ add_caf_test(teams_coindexed 2 teams_coindexed)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
diff --git a/src/tests/unit/teams/CMakeLists.txt b/src/tests/unit/teams/CMakeLists.txt
|
|
||||||
index 8307b078..2ef2ee8e 100644
|
|
||||||
--- a/src/tests/unit/teams/CMakeLists.txt
|
|
||||||
+++ b/src/tests/unit/teams/CMakeLists.txt
|
|
||||||
@@ -10,4 +10,6 @@ caf_compile_executable(sync_team sync-team.f90)
|
|
||||||
if (gfortran_compiler AND (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 16.0.0))
|
|
||||||
caf_compile_executable(teams_this_image teams_this_image.f90)
|
|
||||||
caf_compile_executable(teams_num_images teams_num_images.f90)
|
|
||||||
+ caf_compile_executable(test_teams_1 test_teams_1.f90)
|
|
||||||
+ caf_compile_executable(teams_coindexed teams_coindexed.f90)
|
|
||||||
endif()
|
|
||||||
diff --git a/src/tests/unit/teams/teams_coindexed.f90 b/src/tests/unit/teams/teams_coindexed.f90
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..5c3fab91
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/src/tests/unit/teams/teams_coindexed.f90
|
|
||||||
@@ -0,0 +1,111 @@
|
|
||||||
+! BSD 3-Clause License
|
|
||||||
+!
|
|
||||||
+! Copyright (c) 2018-2025, Sourcery Institute
|
|
||||||
+! All rights reserved.
|
|
||||||
+!
|
|
||||||
+! Redistribution and use in source and binary forms, with or without
|
|
||||||
+! modification, are permitted provided that the following conditions are met:
|
|
||||||
+!
|
|
||||||
+! * Redistributions of source code must retain the above copyright notice, this
|
|
||||||
+! list of conditions and the following disclaimer.
|
|
||||||
+!
|
|
||||||
+! * Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
+! this list of conditions and the following disclaimer in the documentation
|
|
||||||
+! and/or other materials provided with the distribution.
|
|
||||||
+!
|
|
||||||
+! * Neither the name of the copyright holder nor the names of its
|
|
||||||
+! contributors may be used to endorse or promote products derived from
|
|
||||||
+! this software without specific prior written permission.
|
|
||||||
+!
|
|
||||||
+! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
+! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
+! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
+! DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
||||||
+! FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
+! DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
||||||
+! SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
||||||
+! CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
||||||
+! OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
+! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
+
|
|
||||||
+program teams_coindexed
|
|
||||||
+ use, intrinsic :: iso_fortran_env
|
|
||||||
+
|
|
||||||
+ type(team_type) :: parentteam, team, formed_team
|
|
||||||
+ integer :: t_num= 42, stat = 42, lhs
|
|
||||||
+ integer(kind=2) :: st_num=42
|
|
||||||
+ integer :: caf(2)[*]
|
|
||||||
+
|
|
||||||
+ parentteam = get_team()
|
|
||||||
+
|
|
||||||
+ caf = [23, 32]
|
|
||||||
+ form team(t_num, team)
|
|
||||||
+ form team(t_num, formed_team)
|
|
||||||
+
|
|
||||||
+ associate(me => this_image())
|
|
||||||
+ change team(team, cell[*] => caf(2))
|
|
||||||
+ ! for get_from_remote
|
|
||||||
+ ! Checking against caf_single is very limitted.
|
|
||||||
+ if (cell[me, team_number=t_num] /= 32) stop 1
|
|
||||||
+ if (cell[me, team_number=st_num] /= 32) stop 2
|
|
||||||
+ if (cell[me, team=parentteam] /= 32) stop 3
|
|
||||||
+
|
|
||||||
+ ! Check that team_number is validated
|
|
||||||
+ lhs = cell[me, team_number=5, stat=stat]
|
|
||||||
+ if (stat /= 1) stop 4
|
|
||||||
+
|
|
||||||
+ ! Check that only access to active teams is valid
|
|
||||||
+ stat = 42
|
|
||||||
+ lhs = cell[me, team=formed_team, stat=stat]
|
|
||||||
+ if (stat /= 1) stop 5
|
|
||||||
+
|
|
||||||
+ ! for send_to_remote
|
|
||||||
+ ! Checking against caf_single is very limitted.
|
|
||||||
+ cell[me, team_number=t_num] = 45
|
|
||||||
+ if (cell /= 45) stop 11
|
|
||||||
+ cell[me, team_number=st_num] = 46
|
|
||||||
+ if (cell /= 46) stop 12
|
|
||||||
+ cell[me, team=parentteam] = 47
|
|
||||||
+ if (cell /= 47) stop 13
|
|
||||||
+
|
|
||||||
+ ! Check that team_number is validated
|
|
||||||
+ stat = -1
|
|
||||||
+ cell[me, team_number=5, stat=stat] = 0
|
|
||||||
+ if (stat /= 1) stop 14
|
|
||||||
+
|
|
||||||
+ ! Check that only access to active teams is valid
|
|
||||||
+ stat = 42
|
|
||||||
+ cell[me, team=formed_team, stat=stat] = -1
|
|
||||||
+ if (stat /= 1) stop 15
|
|
||||||
+
|
|
||||||
+ ! for transfer_between_remotes
|
|
||||||
+ ! Checking against caf_single is very limitted.
|
|
||||||
+ cell[me, team_number=t_num] = caf(1)[me, team_number=-1]
|
|
||||||
+ if (cell /= 23) stop 21
|
|
||||||
+ cell[me, team_number=st_num] = caf(2)[me, team_number=-1]
|
|
||||||
+ ! cell is an alias for caf(2) and has been overwritten by caf(1)!
|
|
||||||
+ if (cell /= 23) stop 22
|
|
||||||
+ cell[me, team=parentteam] = caf(1)[me, team= team]
|
|
||||||
+ if (cell /= 23) stop 23
|
|
||||||
+
|
|
||||||
+ ! Check that team_number is validated
|
|
||||||
+ stat = -1
|
|
||||||
+ cell[me, team_number=5, stat=stat] = caf(1)[me, team_number= -1]
|
|
||||||
+ if (stat /= 1) stop 24
|
|
||||||
+ stat = -1
|
|
||||||
+ cell[me, team_number=t_num] = caf(1)[me, team_number= -2, stat=stat]
|
|
||||||
+ if (stat /= 1) stop 25
|
|
||||||
+
|
|
||||||
+ ! Check that only access to active teams is valid
|
|
||||||
+ stat = 42
|
|
||||||
+ cell[me, team=formed_team, stat=stat] = caf(1)[me]
|
|
||||||
+ if (stat /= 1) stop 26
|
|
||||||
+ stat = 42
|
|
||||||
+ cell[me] = caf(1)[me, team=formed_team, stat=stat]
|
|
||||||
+ if (stat /= 1) stop 27
|
|
||||||
+ end team
|
|
||||||
+
|
|
||||||
+ sync all
|
|
||||||
+ if (me == 1) print *, "Test passed."
|
|
||||||
+ end associate
|
|
||||||
+end program teams_coindexed
|
|
||||||
diff --git a/src/tests/unit/teams/test_teams_1.f90 b/src/tests/unit/teams/test_teams_1.f90
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..3d94c535
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/src/tests/unit/teams/test_teams_1.f90
|
|
||||||
@@ -0,0 +1,66 @@
|
|
||||||
+! BSD 3-Clause License
|
|
||||||
+!
|
|
||||||
+! Copyright (c) 2018-2025, Sourcery Institute
|
|
||||||
+! All rights reserved.
|
|
||||||
+!
|
|
||||||
+! Redistribution and use in source and binary forms, with or without
|
|
||||||
+! modification, are permitted provided that the following conditions are met:
|
|
||||||
+!
|
|
||||||
+! * Redistributions of source code must retain the above copyright notice, this
|
|
||||||
+! list of conditions and the following disclaimer.
|
|
||||||
+!
|
|
||||||
+! * Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
+! this list of conditions and the following disclaimer in the documentation
|
|
||||||
+! and/or other materials provided with the distribution.
|
|
||||||
+!
|
|
||||||
+! * Neither the name of the copyright holder nor the names of its
|
|
||||||
+! contributors may be used to endorse or promote products derived from
|
|
||||||
+! this software without specific prior written permission.
|
|
||||||
+!
|
|
||||||
+! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
+! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
+! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
+! DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
||||||
+! FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
+! DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
||||||
+! SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
||||||
+! CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
||||||
+! OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
+! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
+
|
|
||||||
+program test_teams_1
|
|
||||||
+ use, intrinsic :: iso_fortran_env
|
|
||||||
+ use oc_assertions_interface, only : assert
|
|
||||||
+
|
|
||||||
+ integer :: caf(3,3)[*] != 42
|
|
||||||
+ type(team_type) :: row_team, column_team
|
|
||||||
+
|
|
||||||
+ caf = reshape((/(-i, i = 1, 9 )/), [3,3])
|
|
||||||
+ associate(me => this_image(), np => num_images())
|
|
||||||
+ call assert(np == 9, "I need exactly 9 teams.")
|
|
||||||
+
|
|
||||||
+ ! Form a row team
|
|
||||||
+ form team((me - 1) / 3 + 1, row_team, new_index=mod(me - 1, 3) + 1)
|
|
||||||
+ row_t: change team(row_team, row[*] => caf(:, team_number(row_team)))
|
|
||||||
+ ! Form column teams; each team has only one image
|
|
||||||
+ form team (team_number(), column_team)
|
|
||||||
+ col_t: change team(column_team, cell[*] => row(this_image()))
|
|
||||||
+ cell = team_number()
|
|
||||||
+ if (this_image() /= 1) row(this_image())[1] = cell
|
|
||||||
+ end team col_t
|
|
||||||
+ sync team(row_team)
|
|
||||||
+ if (this_image() == 1) caf(:, team_number(row_team))[1, team_number = -1] = row
|
|
||||||
+ end team row_t
|
|
||||||
+ sync all
|
|
||||||
+ if (me == 1) then
|
|
||||||
+ if (all(caf == reshape([1,1,1,2,2,2,3,3,3], [3, 3]))) then
|
|
||||||
+ print *, "Test passed."
|
|
||||||
+ else
|
|
||||||
+ print *, "Test failed."
|
|
||||||
+ print *, "Expected:", reshape([1,1,1,2,2,2,3,3,3], [3, 3])
|
|
||||||
+ print *, "Got :", caf
|
|
||||||
+ end if
|
|
||||||
+ end if
|
|
||||||
+ end associate
|
|
||||||
+
|
|
||||||
+end program test_teams_1
|
|
||||||
-29
@@ -1,29 +0,0 @@
|
|||||||
From 9c740b95f62bf1fc5bffed475e8f2bd2f471d830 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andre Vehreschild <vehre@gmx.de>
|
|
||||||
Date: Thu, 17 Apr 2025 15:42:36 +0200
|
|
||||||
Subject: [PATCH] Add comments to teams_num_images test.
|
|
||||||
|
|
||||||
---
|
|
||||||
src/tests/unit/teams/teams_num_images.f90 | 3 +++
|
|
||||||
1 file changed, 3 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/tests/unit/teams/teams_num_images.f90 b/src/tests/unit/teams/teams_num_images.f90
|
|
||||||
index b90a9105..9f539676 100644
|
|
||||||
--- a/src/tests/unit/teams/teams_num_images.f90
|
|
||||||
+++ b/src/tests/unit/teams/teams_num_images.f90
|
|
||||||
@@ -35,12 +35,15 @@
|
|
||||||
sync all
|
|
||||||
form team(MOD(me, 2) + 1, team)
|
|
||||||
|
|
||||||
+ ! Test no parameter gives all images in curren team.
|
|
||||||
j1 = num_images()
|
|
||||||
if (j1 /= num) stop 1
|
|
||||||
|
|
||||||
+ ! Test that a team_type parameter gives the #images in that team.
|
|
||||||
j2 = num_images(team)
|
|
||||||
if (j2 /= num / 2) stop 2
|
|
||||||
|
|
||||||
+ ! Same but using the number of the team.
|
|
||||||
j3 = num_images(MOD(me, 2) + 1)
|
|
||||||
if (j3 /= num / 2) stop 3
|
|
||||||
|
|
||||||
-224
@@ -1,224 +0,0 @@
|
|||||||
From 3d5c515ae0ff4636a5d3272ce838c2873d117b98 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andre Vehreschild <vehre@gmx.de>
|
|
||||||
Date: Mon, 28 Apr 2025 09:42:27 +0200
|
|
||||||
Subject: [PATCH] Fixes for use with gcc<16.
|
|
||||||
|
|
||||||
---
|
|
||||||
CMakeLists.txt | 4 +-
|
|
||||||
src/runtime-libraries/mpi/mpi_caf.c | 72 ++++++++++++++++++++++++++--
|
|
||||||
src/tests/unit/teams/team_number.F90 | 2 +-
|
|
||||||
3 files changed, 70 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 0dbb85a0..e9694b4e 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -233,10 +233,10 @@ endif()
|
|
||||||
if ( gfortran_compiler AND ( NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 8.0.0 ) )
|
|
||||||
add_definitions(-DGCC_GE_8) # Tell library to build against GFortran 8.x bindings w/ descriptor change
|
|
||||||
endif()
|
|
||||||
- if ( gfortran_compiler AND ( NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 15.0.0 ) )
|
|
||||||
+ if ( gfortran_compiler AND ( NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS_EQUAL 15.0.0 ) )
|
|
||||||
add_definitions(-DGCC_GE_15) # Tell library to build against GFortran 15.x bindings
|
|
||||||
endif()
|
|
||||||
- if ( gfortran_compiler AND ( NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 16.0.0 ) )
|
|
||||||
+ if ( gfortran_compiler AND ( CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0.0 ) )
|
|
||||||
add_definitions(-DGCC_GE_16) # Tell library to build against GFortran 16.x bindings
|
|
||||||
endif()
|
|
||||||
|
|
||||||
diff --git a/src/runtime-libraries/mpi/mpi_caf.c b/src/runtime-libraries/mpi/mpi_caf.c
|
|
||||||
index c1599af3..91784a52 100644
|
|
||||||
--- a/src/runtime-libraries/mpi/mpi_caf.c
|
|
||||||
+++ b/src/runtime-libraries/mpi/mpi_caf.c
|
|
||||||
@@ -226,7 +226,7 @@ static win_sync *pending_puts = NULL;
|
|
||||||
/* Linked list of static coarrays registered. Do not expose to public in the
|
|
||||||
* header, because it is implementation specific.
|
|
||||||
*
|
|
||||||
- * From gcc-15 on, this list is contained in the teams handling. */
|
|
||||||
+ * From gcc-16 on, this list is contained in the teams handling. */
|
|
||||||
struct caf_allocated_tokens_t
|
|
||||||
{
|
|
||||||
caf_token_t token;
|
|
||||||
@@ -839,7 +839,11 @@ handle_is_present_message(ct_msg_t *msg, void *baseptr)
|
|
||||||
+= sizeof_desc_for_rank(GFC_DESCRIPTOR_RANK((gfc_descriptor_t *)ptr));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
+#ifdef GCC_GE_16
|
|
||||||
ptr = &baseptr;
|
|
||||||
+#else
|
|
||||||
+ ptr = baseptr;
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
accessor_hash_table[msg->accessor_index].u.is_present(
|
|
||||||
add_data, &msg->dest_image, &result, ptr, &src_token, 0);
|
|
||||||
@@ -5740,11 +5744,11 @@ team_translate(int *remote_image, int *this_image,
|
|
||||||
caf_token_t token __attribute__((unused)), int image_index,
|
|
||||||
caf_team_t *team, int *team_number, int *stat)
|
|
||||||
{
|
|
||||||
+#ifdef GCC_GE_16
|
|
||||||
MPI_Group world_group, team_group, remote_group;
|
|
||||||
int ierr, trans, team_id = current_team->team_list_elem->team_id;
|
|
||||||
MPI_Comm remote_comm = MPI_COMM_NULL;
|
|
||||||
|
|
||||||
-#ifdef GCC_GE_16
|
|
||||||
if (team)
|
|
||||||
{
|
|
||||||
caf_team_stack_node_t *cur = current_team;
|
|
||||||
@@ -5777,7 +5781,6 @@ team_translate(int *remote_image, int *this_image,
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-#endif
|
|
||||||
|
|
||||||
ierr = MPI_Comm_group(CAF_COMM_WORLD, &world_group);
|
|
||||||
chk_err(ierr);
|
|
||||||
@@ -5803,6 +5806,27 @@ team_translate(int *remote_image, int *this_image,
|
|
||||||
chk_err(ierr);
|
|
||||||
dprint("this: %d -> %d, rmt: %d -> %d on team %d.\n", caf_this_image,
|
|
||||||
*this_image + 1, image_index, *remote_image + 1, team_id);
|
|
||||||
+#else
|
|
||||||
+ MPI_Group current_team_group, win_group;
|
|
||||||
+ int ierr, trans_ranks[2];
|
|
||||||
+
|
|
||||||
+ ierr = MPI_Comm_group(CAF_COMM_WORLD, ¤t_team_group);
|
|
||||||
+ chk_err(ierr);
|
|
||||||
+ ierr = MPI_Win_get_group(*TOKEN(token), &win_group);
|
|
||||||
+ chk_err(ierr);
|
|
||||||
+ ierr = MPI_Group_translate_ranks(current_team_group, 2,
|
|
||||||
+ (int[]){image_index - 1, mpi_this_image},
|
|
||||||
+ win_group, trans_ranks);
|
|
||||||
+ chk_err(ierr);
|
|
||||||
+ *remote_image = trans_ranks[0];
|
|
||||||
+ *this_image = trans_ranks[1];
|
|
||||||
+ ierr = MPI_Group_free(¤t_team_group);
|
|
||||||
+ chk_err(ierr);
|
|
||||||
+ ierr = MPI_Group_free(&win_group);
|
|
||||||
+ chk_err(ierr);
|
|
||||||
+ dprint("this: %d -> %d, rmt: %d -> %d.\n", caf_this_image, *this_image + 1,
|
|
||||||
+ image_index, *remote_image + 1);
|
|
||||||
+#endif
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -5895,7 +5919,11 @@ PREFIX(get_from_remote)(caf_token_t token, const gfc_descriptor_t *opt_src_desc,
|
|
||||||
msg->transfer_size = dst_size;
|
|
||||||
msg->opt_charlen = opt_src_charlen ? *opt_src_charlen : 0;
|
|
||||||
msg->win = *TOKEN(token);
|
|
||||||
+#ifdef GCC_GE_16
|
|
||||||
msg->dest_image = this_image;
|
|
||||||
+#else
|
|
||||||
+ msg->dest_image = mpi_this_image;
|
|
||||||
+#endif
|
|
||||||
msg->dest_tag = CAF_CT_TAG + 1;
|
|
||||||
msg->dest_opt_charlen = opt_dst_charlen ? *opt_dst_charlen : 1;
|
|
||||||
msg->flags = (opt_dst_desc ? CT_DST_HAS_DESC : 0)
|
|
||||||
@@ -5939,8 +5967,13 @@ PREFIX(get_from_remote)(caf_token_t token, const gfc_descriptor_t *opt_src_desc,
|
|
||||||
"for internal buffer in get_from_remote().");
|
|
||||||
}
|
|
||||||
dprint("waiting to receive %zd bytes from %d.\n", dst_size, remote_image);
|
|
||||||
+#ifdef GCC_GE_16
|
|
||||||
ierr = MPI_Recv(t_buff, dst_size, MPI_BYTE, remote_image, msg->dest_tag,
|
|
||||||
CAF_COMM_WORLD, MPI_STATUS_IGNORE);
|
|
||||||
+#else
|
|
||||||
+ ierr = MPI_Recv(t_buff, dst_size, MPI_BYTE, image_index - 1, msg->dest_tag,
|
|
||||||
+ CAF_COMM_WORLD, MPI_STATUS_IGNORE);
|
|
||||||
+#endif
|
|
||||||
chk_err(ierr);
|
|
||||||
dprint("received %zd bytes as requested from %d.\n", dst_size,
|
|
||||||
remote_image);
|
|
||||||
@@ -5958,8 +5991,13 @@ PREFIX(get_from_remote)(caf_token_t token, const gfc_descriptor_t *opt_src_desc,
|
|
||||||
|
|
||||||
dprint("probing for incoming message from %d, tag %d.\n", image_index - 1,
|
|
||||||
msg->dest_tag);
|
|
||||||
+#ifdef GCC_GE_16
|
|
||||||
+ ierr = MPI_Mprobe(remote_image, msg->dest_tag, CAF_COMM_WORLD, &msg_han,
|
|
||||||
+ &status);
|
|
||||||
+#else
|
|
||||||
ierr = MPI_Mprobe(image_index - 1, msg->dest_tag, CAF_COMM_WORLD, &msg_han,
|
|
||||||
&status);
|
|
||||||
+#endif
|
|
||||||
chk_err(ierr);
|
|
||||||
if (ierr == MPI_SUCCESS)
|
|
||||||
{
|
|
||||||
@@ -6062,8 +6100,14 @@ PREFIX(is_present_on_remote)(caf_token_t token, const int image_index,
|
|
||||||
void *src_ptr = ((mpi_caf_token_t *)token)->memptr;
|
|
||||||
|
|
||||||
dprint("Shortcutting due to self access on image %d.\n", image_index);
|
|
||||||
- accessor_hash_table[is_present_index].u.is_present(
|
|
||||||
- add_data, &this_image, &result, &src_ptr, &src_token, 0);
|
|
||||||
+ accessor_hash_table[is_present_index].u.is_present(add_data, &this_image,
|
|
||||||
+ &result,
|
|
||||||
+#ifdef GCC_GE_16
|
|
||||||
+ &src_ptr,
|
|
||||||
+#else
|
|
||||||
+ src_ptr,
|
|
||||||
+#endif
|
|
||||||
+ &src_token, 0);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
@@ -6281,7 +6325,11 @@ PREFIX(send_to_remote)(caf_token_t token, gfc_descriptor_t *opt_dst_desc,
|
|
||||||
msg->transfer_size = src_size;
|
|
||||||
msg->opt_charlen = opt_src_charlen ? *opt_src_charlen : 0;
|
|
||||||
msg->win = *TOKEN(token);
|
|
||||||
+#ifdef GCC_GE_16
|
|
||||||
msg->dest_image = this_image;
|
|
||||||
+#else
|
|
||||||
+ msg->dest_image = mpi_this_image;
|
|
||||||
+#endif
|
|
||||||
msg->dest_tag = CAF_CT_TAG + 1;
|
|
||||||
msg->dest_opt_charlen = opt_dst_charlen ? *opt_dst_charlen : 1;
|
|
||||||
msg->flags = (opt_dst_desc ? CT_DST_HAS_DESC : 0)
|
|
||||||
@@ -6324,8 +6372,13 @@ PREFIX(send_to_remote)(caf_token_t token, gfc_descriptor_t *opt_dst_desc,
|
|
||||||
char c;
|
|
||||||
dprint("waiting to receive 1 byte from %d on tag %d.\n", remote_image,
|
|
||||||
msg->dest_tag);
|
|
||||||
+#ifdef GCC_GE_16
|
|
||||||
ierr = MPI_Recv(&c, 1, MPI_BYTE, remote_image, msg->dest_tag,
|
|
||||||
CAF_COMM_WORLD, MPI_STATUS_IGNORE);
|
|
||||||
+#else
|
|
||||||
+ ierr = MPI_Recv(&c, 1, MPI_BYTE, image_index - 1, msg->dest_tag,
|
|
||||||
+ CAF_COMM_WORLD, MPI_STATUS_IGNORE);
|
|
||||||
+#endif
|
|
||||||
chk_err(ierr);
|
|
||||||
dprint("received 1 byte as requested from %d on tag %d.\n", remote_image,
|
|
||||||
msg->dest_tag);
|
|
||||||
@@ -6548,7 +6601,11 @@ PREFIX(transfer_between_remotes)(
|
|
||||||
dst_msg->transfer_size = src_size;
|
|
||||||
dst_msg->opt_charlen = opt_src_charlen ? *opt_src_charlen : 0;
|
|
||||||
dst_msg->win = *TOKEN(dst_token);
|
|
||||||
+#ifdef GCC_GE_16
|
|
||||||
dst_msg->dest_image = this_image;
|
|
||||||
+#else
|
|
||||||
+ dst_msg->dest_image = mpi_this_image;
|
|
||||||
+#endif
|
|
||||||
dst_msg->dest_tag = CAF_CT_TAG + 1;
|
|
||||||
dst_msg->dest_opt_charlen = opt_dst_charlen ? *opt_dst_charlen : 1;
|
|
||||||
dst_msg->flags
|
|
||||||
@@ -6593,8 +6650,13 @@ PREFIX(transfer_between_remotes)(
|
|
||||||
char c;
|
|
||||||
dprint("waiting to receive 1 byte from %d on tag %d.\n", dst_remote_image,
|
|
||||||
dst_msg->dest_tag);
|
|
||||||
+#ifdef GCC_GE_16
|
|
||||||
ierr = MPI_Recv(&c, 1, MPI_BYTE, dst_remote_image, dst_msg->dest_tag,
|
|
||||||
CAF_COMM_WORLD, MPI_STATUS_IGNORE);
|
|
||||||
+#else
|
|
||||||
+ ierr = MPI_Recv(&c, 1, MPI_BYTE, dst_image_index - 1, dst_msg->dest_tag,
|
|
||||||
+ CAF_COMM_WORLD, MPI_STATUS_IGNORE);
|
|
||||||
+#endif
|
|
||||||
chk_err(ierr);
|
|
||||||
if (dst_stat)
|
|
||||||
*dst_stat = c;
|
|
||||||
diff --git a/src/tests/unit/teams/team_number.F90 b/src/tests/unit/teams/team_number.F90
|
|
||||||
index a50ebd67..07d15778 100644
|
|
||||||
--- a/src/tests/unit/teams/team_number.F90
|
|
||||||
+++ b/src/tests/unit/teams/team_number.F90
|
|
||||||
@@ -43,7 +43,7 @@ program main
|
|
||||||
|
|
||||||
call assert(team_number()==standard_initial_value,"initial team number conforms with Fortran standard before 'change team'")
|
|
||||||
|
|
||||||
-#ifdef GCC_GE_15
|
|
||||||
+#ifdef GCC_GE_16
|
|
||||||
call assert(team_number(get_team(current_team))==standard_initial_value,"initial team number conforms with Fortran standard before 'change team'")
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-71
@@ -1,71 +0,0 @@
|
|||||||
From 8d19ac523d137d6738eb6091cd1695b4d798c044 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andre Vehreschild <vehre@gmx.de>
|
|
||||||
Date: Fri, 4 Jul 2025 13:53:18 +0200
|
|
||||||
Subject: [PATCH] Ensure gcc-16 compatibility.
|
|
||||||
|
|
||||||
Fix is_present for descriptor arrays in gcc-16.
|
|
||||||
Remove compiling warning from test_case.
|
|
||||||
---
|
|
||||||
src/runtime-libraries/mpi/mpi_caf.c | 16 ++++++++--------
|
|
||||||
src/tests/unit/collectives/co_reduce_string.f90 | 5 ++---
|
|
||||||
2 files changed, 10 insertions(+), 11 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/runtime-libraries/mpi/mpi_caf.c b/src/runtime-libraries/mpi/mpi_caf.c
|
|
||||||
index 91784a529..f235ae792 100644
|
|
||||||
--- a/src/runtime-libraries/mpi/mpi_caf.c
|
|
||||||
+++ b/src/runtime-libraries/mpi/mpi_caf.c
|
|
||||||
@@ -6095,19 +6095,19 @@ PREFIX(is_present_on_remote)(caf_token_t token, const int image_index,
|
|
||||||
|
|
||||||
if (this_image == remote_image)
|
|
||||||
{
|
|
||||||
+ mpi_caf_token_t *mpi_token = (mpi_caf_token_t *)token;
|
|
||||||
int32_t result = 0;
|
|
||||||
mpi_caf_token_t src_token = {get_data, MPI_WIN_NULL, NULL};
|
|
||||||
- void *src_ptr = ((mpi_caf_token_t *)token)->memptr;
|
|
||||||
-
|
|
||||||
- dprint("Shortcutting due to self access on image %d.\n", image_index);
|
|
||||||
- accessor_hash_table[is_present_index].u.is_present(add_data, &this_image,
|
|
||||||
- &result,
|
|
||||||
#ifdef GCC_GE_16
|
|
||||||
- &src_ptr,
|
|
||||||
+ void *src_ptr
|
|
||||||
+ = mpi_token->desc ? mpi_token->desc : (void *)&mpi_token->memptr;
|
|
||||||
#else
|
|
||||||
- src_ptr,
|
|
||||||
+ void *src_ptr = mpi_token->memptr;
|
|
||||||
#endif
|
|
||||||
- &src_token, 0);
|
|
||||||
+
|
|
||||||
+ dprint("Shortcutting due to self access on image %d.\n", image_index);
|
|
||||||
+ accessor_hash_table[is_present_index].u.is_present(
|
|
||||||
+ add_data, &this_image, &result, src_ptr, &src_token, 0);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
diff --git a/src/tests/unit/collectives/co_reduce_string.f90 b/src/tests/unit/collectives/co_reduce_string.f90
|
|
||||||
index ad094f92a..7b7dad797 100644
|
|
||||||
--- a/src/tests/unit/collectives/co_reduce_string.f90
|
|
||||||
+++ b/src/tests/unit/collectives/co_reduce_string.f90
|
|
||||||
@@ -40,7 +40,7 @@ program co_reduce_strings
|
|
||||||
associate (me => this_image())
|
|
||||||
allocate(strarr(numstrings)[*])
|
|
||||||
do i = 1, numstrings
|
|
||||||
- write(strarr(i), "('foo'I02)") i * me
|
|
||||||
+ write(strarr(i), "('foo',I02)") i * me
|
|
||||||
end do
|
|
||||||
! Collectively reduce the maximum string.
|
|
||||||
call co_reduce(strarr, strmax)
|
|
||||||
@@ -50,7 +50,7 @@ program co_reduce_strings
|
|
||||||
! implicitly synchronizes.
|
|
||||||
associate (np => num_images())
|
|
||||||
do i = 1, np
|
|
||||||
- write (expect, "('foo'I02)") i * np
|
|
||||||
+ write (expect, "('foo',I02)") i * np
|
|
||||||
if (strarr(i) /= expect) then
|
|
||||||
! On errror print what we got and what we expected.
|
|
||||||
print *, "Got: ", strarr(i), ", expected: ", expect
|
|
||||||
@@ -77,4 +77,3 @@ pure function strmax(lhs, rhs) result(maxstr) bind(C,name="strmax")
|
|
||||||
end function
|
|
||||||
|
|
||||||
end program co_reduce_strings
|
|
||||||
-
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
From 74a5d0ac3f2d6ee5f985a13478a87f309a444b07 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Andre Vehreschild <vehre@gmx.de>
|
|
||||||
Date: Wed, 9 Jul 2025 13:33:13 +0200
|
|
||||||
Subject: [PATCH] Fix team's testcase.
|
|
||||||
|
|
||||||
---
|
|
||||||
src/tests/unit/teams/test_teams_1.f90 | 6 +++---
|
|
||||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/tests/unit/teams/test_teams_1.f90 b/src/tests/unit/teams/test_teams_1.f90
|
|
||||||
index 3d94c535..b3f6523d 100644
|
|
||||||
--- a/src/tests/unit/teams/test_teams_1.f90
|
|
||||||
+++ b/src/tests/unit/teams/test_teams_1.f90
|
|
||||||
@@ -43,10 +43,10 @@ program test_teams_1
|
|
||||||
form team((me - 1) / 3 + 1, row_team, new_index=mod(me - 1, 3) + 1)
|
|
||||||
row_t: change team(row_team, row[*] => caf(:, team_number(row_team)))
|
|
||||||
! Form column teams; each team has only one image
|
|
||||||
- form team (team_number(), column_team)
|
|
||||||
+ form team (this_image(), column_team)
|
|
||||||
col_t: change team(column_team, cell[*] => row(this_image()))
|
|
||||||
- cell = team_number()
|
|
||||||
- if (this_image() /= 1) row(this_image())[1] = cell
|
|
||||||
+ cell = team_number(row_team)
|
|
||||||
+ if (this_image(row_team) /= 1) row(this_image(row_team))[1, team=row_team] = cell
|
|
||||||
end team col_t
|
|
||||||
sync team(row_team)
|
|
||||||
if (this_image() == 1) caf(:, team_number(row_team))[1, team_number = -1] = row
|
|
||||||
@@ -9,13 +9,13 @@ FORTRAN_STANDARD="2003"
|
|||||||
inherit cmake flag-o-matic fortran-2
|
inherit cmake flag-o-matic fortran-2
|
||||||
|
|
||||||
MY_PN="OpenCoarrays"
|
MY_PN="OpenCoarrays"
|
||||||
MY_PV="${PV%_*}"
|
COMMIT="74a5d0ac3f2d6ee5f985a13478a87f309a444b07"
|
||||||
|
|
||||||
DESCRIPTION="A parallel application binary interface for Fortran 2018 compilers"
|
DESCRIPTION="A parallel application binary interface for Fortran 2018 compilers"
|
||||||
HOMEPAGE="http://www.opencoarrays.org/"
|
HOMEPAGE="http://www.opencoarrays.org/"
|
||||||
SRC_URI="https://github.com/sourceryinstitute/${MY_PN}/archive/refs/tags/${MY_PV}.tar.gz -> ${MY_PN}-${PV}.tar.gz"
|
SRC_URI="https://github.com/sourceryinstitute/${MY_PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
|
||||||
|
|
||||||
S="${WORKDIR}/${MY_PN}-${MY_PV}"
|
S="${WORKDIR}/${MY_PN}-${COMMIT}"
|
||||||
|
|
||||||
LICENSE="BSD"
|
LICENSE="BSD"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
@@ -38,21 +38,6 @@ DEPEND="
|
|||||||
${RDEPEND}
|
${RDEPEND}
|
||||||
"
|
"
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}/${PN}-${MY_PV}_patch_01_Improve_teams_implementation.patch"
|
|
||||||
"${FILESDIR}/${PN}-${MY_PV}_patch_02_Fix_team_number.patch"
|
|
||||||
"${FILESDIR}/${PN}-${MY_PV}_patch_03_Remove_wrong_error.patch"
|
|
||||||
"${FILESDIR}/${PN}-${MY_PV}_patch_04_Enchance_debug_logging.patch"
|
|
||||||
"${FILESDIR}/${PN}-${MY_PV}_patch_05_Add_owning_memory_flag.patch"
|
|
||||||
"${FILESDIR}/${PN}-${MY_PV}_patch_06_Keep_team_translate_rework.patch"
|
|
||||||
"${FILESDIR}/${PN}-${MY_PV}_patch_07_Use_COMM_TEAM_instead_of_COMM_WORLD.patch"
|
|
||||||
"${FILESDIR}/${PN}-${MY_PV}_patch_08_Add_more_beefy_tests.patch"
|
|
||||||
"${FILESDIR}/${PN}-${MY_PV}_patch_09_Add_comments_to_teams_num_images_test.patch"
|
|
||||||
"${FILESDIR}/${PN}-${MY_PV}_patch_10_Fixes_for_use_with_gcc_lt_16.patch"
|
|
||||||
"${FILESDIR}/${PN}-${MY_PV}_patch_11_Ensure_gcc-16_compatibility.patch"
|
|
||||||
"${FILESDIR}/${PN}-${MY_PV}_patch_12_Fix_teams_testcase.patch"
|
|
||||||
)
|
|
||||||
|
|
||||||
src_configure() {
|
src_configure() {
|
||||||
filter-lto # Bug 860765
|
filter-lto # Bug 860765
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user