From 3a44bb2508ba127c9ef331fde2318c30ea1b9af6 Mon Sep 17 00:00:00 2001
From: Ali Mohammed <ali.mohammed@hpe.com>
Date: Fri, 5 Nov 2021 19:38:45 +0100
Subject: [PATCH] refactor the mstro_pm_handle_demands and around it to allow
 for dist cdos and send multiple init_transport messages

---
 include/maestro/i_pool_manager_registry.h | 9 +++++++++
 tests/check_pm_dist_cdo.sh.in             | 3 ++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/include/maestro/i_pool_manager_registry.h b/include/maestro/i_pool_manager_registry.h
index 5b3ae049..2d952926 100644
--- a/include/maestro/i_pool_manager_registry.h
+++ b/include/maestro/i_pool_manager_registry.h
@@ -339,6 +339,7 @@ mstro_pm__mmbLayoutIntersecton_to_candidates(
                             struct per_app_cdo_entries *app_to_attributes_table,
                             mstro_pm_candidates **candidates);
 
+
 /** Find an offered distributed cdo with the required exact layout
   * (including index),i.e., 1:1 mapping
 **/
@@ -351,12 +352,20 @@ mstro_pm__find_cdo_with_layout(
                           uint64_t *local_id);
 
 
+/** Create and allocate  mstro_pm_candidates needed to hold the list of
+ * applications and local cdo ids that fullfill the current demand
+**/
+static inline
+mstro_status
+mstro__pool_create_candidates(mstro_pm_candidates **candidates, size_t length);
+
 /** Destroy mstro_pm_candidates **/
 static inline
 mstro_status
 mstro_pm_candidates_destroy(mstro_pm_candidates *candidates);
 
 
+
 /**@} (end of group MSTRO_I_PM_Registry) */
 /**@} (end of group MSTRO_Internal) */
 
diff --git a/tests/check_pm_dist_cdo.sh.in b/tests/check_pm_dist_cdo.sh.in
index 0214e271..2472f220 100644
--- a/tests/check_pm_dist_cdo.sh.in
+++ b/tests/check_pm_dist_cdo.sh.in
@@ -97,7 +97,8 @@ export MSTRO_POOL_MANAGER_INFO
 
 wait %1 || exit 99
 wait %2 || exit 99
-
+wait %3 || exit 99
+wait %4 || exit 99
 
 # trap normal script termination: close pipe to pool manager
 terminate ${PM_PID} 0
-- 
GitLab