Assure compatibility with gcc 4.3

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1375 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
fatene 2009-01-29 16:33:58 +00:00
commit b4763185cb
9 changed files with 139 additions and 79 deletions

View file

@ -40,9 +40,9 @@ CTEST_CONFIG=$CTEST_DEFAULT_CONFIG
MIN_CMAKE_FLAGS='-DENABLE_MINIMAL_CMAKE_TESTING=TRUE' MIN_CMAKE_FLAGS='-DENABLE_MINIMAL_CMAKE_TESTING=TRUE'
# install types to select in the main menu # install types to select in the main menu
P_FULL_INSTALL=1 P_BASIC_INSTALL=1
P_BASIC_INSTALL=2 P_PARALLEL_INSTALL=2
P_PARALLEL_INSTALL=3 P_FULL_INSTALL=3
P_RM_PREVIOUS_INSTALLL=4 P_RM_PREVIOUS_INSTALLL=4
P_EXIT_INSTALL=5 P_EXIT_INSTALL=5
@ -75,34 +75,34 @@ S_CHECK_AUTOTOOLS=1018
#### define what are the possible installs and their content #### define what are the possible installs and their content
# full install # full install
FULL_INSTALL="$S_INTRODUCTION $S_UNPACK_LIBXML $S_UNPACK_MPICH $S_INSTALL_EO $S_INSTALL_MO $S_INSTALL_MOEO $S_CHECK_AUTOTOOLS $S_INSTALL_LIBXML $S_REMOVE_TEMP_LIBXML $S_INSTALL_MPICH $S_REMOVE_TEMP_MPICH $S_CONFIGURE_ENV $S_INSTALL_PEO $S_CONFIGURE_MPD $S_END" FULL_INSTALL="$S_INTRODUCTION $S_UNPACK_LIBXML $S_UNPACK_MPICH $S_INSTALL_EO $S_INSTALL_MO $S_INSTALL_MOEO $S_CHECK_AUTOTOOLS $S_INSTALL_LIBXML $S_REMOVE_TEMP_LIBXML $S_INSTALL_MPICH $S_REMOVE_TEMP_MPICH $S_CONFIGURE_ENV $S_CONFIGURE_MPD $S_INSTALL_PEO $S_END"
FULL_INSTALL_WITHOUT_LIBXML2="$S_INTRODUCTION $S_UNPACK_MPICH $S_INSTALL_EO $S_INSTALL_MO $S_INSTALL_MOEO $S_CHECK_AUTOTOOLS $S_INSTALL_MPICH $S_REMOVE_TEMP_MPICH $S_CONFIGURE_MPICH_ENV $S_INSTALL_PEO $S_CONFIGURE_MPD $S_END" FULL_INSTALL_WITHOUT_LIBXML2="$S_INTRODUCTION $S_UNPACK_MPICH $S_INSTALL_EO $S_INSTALL_MO $S_INSTALL_MOEO $S_CHECK_AUTOTOOLS $S_INSTALL_MPICH $S_REMOVE_TEMP_MPICH $S_CONFIGURE_MPICH_ENV $S_CONFIGURE_MPD $S_INSTALL_PEO $S_END"
FULL_INSTALL_WITHOUT_MPICH2="$S_INTRODUCTION $S_UNPACK_LIBXML $S_INSTALL_EO $S_INSTALL_MO $S_INSTALL_MOEO $S_CHECK_AUTOTOOLS $S_INSTALL_LIBXML $S_REMOVE_TEMP_LIBXML $S_CONFIGURE_LIBXML2_ENV $S_INSTALL_PEO $S_CONFIGURE_MPD $S_END" FULL_INSTALL_WITHOUT_MPICH2="$S_INTRODUCTION $S_UNPACK_LIBXML $S_INSTALL_EO $S_INSTALL_MO $S_INSTALL_MOEO $S_CHECK_AUTOTOOLS $S_INSTALL_LIBXML $S_REMOVE_TEMP_LIBXML $S_CONFIGURE_LIBXML2_ENV $S_CONFIGURE_MPD $S_INSTALL_PEO $S_END"
FULL_INSTALL_WITHOUT_LIBXML2_MPICH2="$S_INTRODUCTION $S_INSTALL_EO $S_INSTALL_MO $S_INSTALL_MOEO $S_INSTALL_PEO $S_CONFIGURE_MPD $S_END_WITHOUT_INFO" FULL_INSTALL_WITHOUT_LIBXML2_MPICH2="$S_INTRODUCTION $S_INSTALL_EO $S_INSTALL_MO $S_INSTALL_MOEO $S_CONFIGURE_MPD $S_INSTALL_PEO $S_END_WITHOUT_INFO"
# basic install # basic install
BASIC_INSTALL="$S_INTRODUCTION $S_INSTALL_EO $S_INSTALL_MO $S_INSTALL_MOEO $S_END" BASIC_INSTALL="$S_INTRODUCTION $S_INSTALL_EO $S_INSTALL_MO $S_INSTALL_MOEO $S_END"
# install only paradiseo-peo # install only paradiseo-peo
PARALLEL_INSTALL="$S_PEO_CHECK $S_INTRODUCTION $S_UNPACK_LIBXML $S_CHECK_AUTOTOOLS $S_INSTALL_LIBXML $S_REMOVE_TEMP_LIBXML $S_UNPACK_MPICH $S_INSTALL_MPICH $S_REMOVE_TEMP_MPICH $S_CONFIGURE_ENV $S_INSTALL_PEO $S_CONFIGURE_MPD $S_END" PARALLEL_INSTALL="$S_PEO_CHECK $S_INTRODUCTION $S_UNPACK_LIBXML $S_CHECK_AUTOTOOLS $S_INSTALL_LIBXML $S_REMOVE_TEMP_LIBXML $S_UNPACK_MPICH $S_INSTALL_MPICH $S_REMOVE_TEMP_MPICH $S_CONFIGURE_ENV $S_CONFIGURE_MPD $S_INSTALL_PEO $S_END"
PARALLEL_INSTALL_WITHOUT_LIBXML2="$S_PEO_CHECK $S_INTRODUCTION $S_UNPACK_MPICH $S_CHECK_AUTOTOOLS $S_INSTALL_MPICH $S_REMOVE_TEMP_MPICH $S_CONFIGURE_MPICH_ENV $S_INSTALL_PEO $S_CONFIGURE_MPD $S_END" PARALLEL_INSTALL_WITHOUT_LIBXML2="$S_PEO_CHECK $S_INTRODUCTION $S_UNPACK_MPICH $S_CHECK_AUTOTOOLS $S_INSTALL_MPICH $S_REMOVE_TEMP_MPICH $S_CONFIGURE_MPICH_ENV $S_CONFIGURE_MPD $S_INSTALL_PEO $S_END"
PARALLEL_INSTALL_WITHOUT_MPICH2="$S_PEO_CHECK $S_INTRODUCTION $S_CHECK_AUTOTOOLS $S_UNPACK_LIBXML $S_INSTALL_LIBXML $S_REMOVE_TEMP_LIBXML $S_CONFIGURE_LIBXML2_ENV $S_INSTALL_PEO $S_CONFIGURE_MPD $S_END" PARALLEL_INSTALL_WITHOUT_MPICH2="$S_PEO_CHECK $S_INTRODUCTION $S_CHECK_AUTOTOOLS $S_UNPACK_LIBXML $S_INSTALL_LIBXML $S_REMOVE_TEMP_LIBXML $S_CONFIGURE_LIBXML2_ENV $S_CONFIGURE_MPD $S_INSTALL_PEO $S_END"
PARALLEL_INSTALL_WITHOUT_LIBXML2_MPICH2="$S_PEO_CHECK $S_INTRODUCTION $S_INSTALL_PEO $S_CONFIGURE_MPD $S_END_WITHOUT_INFO" PARALLEL_INSTALL_WITHOUT_LIBXML2_MPICH2="$S_PEO_CHECK $S_INTRODUCTION $S_CONFIGURE_MPD $S_INSTALL_PEO $S_END_WITHOUT_INFO"
# remove a previous install # remove a previous install
RM_PREVIOUS_INSTALL="$S_REMOVE_INSTALL" RM_PREVIOUS_INSTALL="$S_REMOVE_INSTALL"
#others #others
LIBS_PATH=lib LIBS_PATH=lib
LIBXML2_ARCHIVE=libxml2-2.6.0 LIBXML2_ARCHIVE=libxml2-2.7.3
LIBXML2_ARCHIVE_SUFFIX=.tar.bz2 LIBXML2_ARCHIVE_SUFFIX=.tar.gz
MPICH2_ARCHIVE=mpich2-1.0.3 MPICH2_ARCHIVE=mpich2-1.0.8
MPICH2_ARCHIVE_SUFFIX=.tar.gz MPICH2_ARCHIVE_SUFFIX=.tar.gz
# errors # errors
SUCCESSFUL_STEP=0 SUCCESSFUL_STEP=0
@ -353,7 +353,7 @@ function run_install_step()
execute_cmd "rm -Rf $installKitPath/$LIBXML2_ARCHIVE_SUFFIX" "[$currentStepCounter-1] Remove potential existing dir $installKitPath/$LIBXML2_ARCHIVE" $SPY execute_cmd "rm -Rf $installKitPath/$LIBXML2_ARCHIVE_SUFFIX" "[$currentStepCounter-1] Remove potential existing dir $installKitPath/$LIBXML2_ARCHIVE" $SPY
RETURN=$? RETURN=$?
execute_cmd "tar xvjf $resourceKitPath/$LIBS_PATH/$LIBXML2_ARCHIVE$LIBXML2_ARCHIVE_SUFFIX --directory $installKitPath" "[$currentStepCounter-2] Unpack Libxml2" $SPY execute_cmd "tar xzvf $resourceKitPath/$LIBS_PATH/$LIBXML2_ARCHIVE$LIBXML2_ARCHIVE_SUFFIX --directory $installKitPath" "[$currentStepCounter-2] Unpack Libxml2" $SPY
if [ ! "$?" = "0" ] if [ ! "$?" = "0" ]
then then
echo '' echo ''
@ -558,7 +558,7 @@ function run_install_step()
execute_cmd "mkdir $installKitPath/libxml2" "[$currentStepCounter-1] Create libxml2 dir" $SPY execute_cmd "mkdir $installKitPath/libxml2" "[$currentStepCounter-1] Create libxml2 dir" $SPY
RETURN=$? RETURN=$?
execute_cmd "cd $installKitPath/libxml2-2.6.0/" "[$currentStepCounter-2] Go in libxml2-2.6.0 dir" $SPY execute_cmd "cd $installKitPath/$LIBXML2_ARCHIVE/" "[$currentStepCounter-2] Go in $LIBXML2_ARCHIVE dir" $SPY
RETURN=`expr $RETURN + $?` RETURN=`expr $RETURN + $?`
execute_cmd "./configure --prefix=$installKitPath/libxml2/ --exec-prefix=$installKitPath/libxml2/" "[$currentStepCounter-3] Run configure for libxml2" $SPY execute_cmd "./configure --prefix=$installKitPath/libxml2/ --exec-prefix=$installKitPath/libxml2/" "[$currentStepCounter-3] Run configure for libxml2" $SPY
RETURN=`expr $RETURN + $?` RETURN=`expr $RETURN + $?`
@ -588,7 +588,7 @@ function run_install_step()
execute_cmd "mkdir $installKitPath/mpich2" "[$currentStepCounter-1] Create mpich2 dir" $SPY execute_cmd "mkdir $installKitPath/mpich2" "[$currentStepCounter-1] Create mpich2 dir" $SPY
RETURN=$? RETURN=$?
execute_cmd "cd $installKitPath/mpich2-1.0.3/" "[$currentStepCounter-2] Go in mpich2-1.0.3 dir" $SPY execute_cmd "cd $installKitPath/$MPICH2_ARCHIVE/" "[$currentStepCounter-2] Go in $MPICH2_ARCHIVE dir" $SPY
RETURN=`expr $RETURN + $?` RETURN=`expr $RETURN + $?`
execute_cmd "./configure --prefix=$installKitPath/mpich2/" "[$currentStepCounter-3] Run configure for mpich2" $SPY execute_cmd "./configure --prefix=$installKitPath/mpich2/" "[$currentStepCounter-3] Run configure for mpich2" $SPY
RETURN=`expr $RETURN + $?` RETURN=`expr $RETURN + $?`
@ -613,11 +613,11 @@ function run_install_step()
echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m " echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m "
echo ' --> Removing libxml2 temp install directory ...' echo ' --> Removing libxml2 temp install directory ...'
execute_cmd "rm -fr $installKitPath/libxml2-2.6.0" "[$currentStepCounter] Remove Libxml2 temporary directory" $SPY execute_cmd "rm -fr $installKitPath/$LIBXML2_ARCHIVE" "[$currentStepCounter] Remove Libxml2 temporary directory" $SPY
if [ ! "$?" = "0" ] if [ ! "$?" = "0" ]
then then
echo '' echo ''
echo " --> Error when removing $installKitPath/libxml2-2.6.0" echo " --> Error when removing $installKitPath/$LIBXML2_ARCHIVE"
echo -e ' \033[40m\033[1;33m### END ### \033[0m ' echo -e ' \033[40m\033[1;33m### END ### \033[0m '
return $REMOVE_TEMP_DIRECTORY_ERROR return $REMOVE_TEMP_DIRECTORY_ERROR
else else
@ -632,11 +632,11 @@ function run_install_step()
echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m " echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m "
echo ' --> Removing mpich2 temp install directory ...' echo ' --> Removing mpich2 temp install directory ...'
execute_cmd "rm -fr $installKitPath/mpich2-1.0.3" "[$currentStepCounter] Remove Mpich2 temporary directory" $SPY execute_cmd "rm -fr $installKitPath/$MPICH2_ARCHIVE" "[$currentStepCounter] Remove Mpich2 temporary directory" $SPY
if [ ! "$?" = "0" ] if [ ! "$?" = "0" ]
then then
echo '' echo ''
echo " --> Error when removing $installKitPath/mpich2-1.0.3" echo " --> Error when removing $installKitPath/$MPICH2_ARCHIVE"
echo -e ' \033[40m\033[1;33m### END ### \033[0m ' echo -e ' \033[40m\033[1;33m### END ### \033[0m '
return $REMOVE_TEMP_DIRECTORY_ERROR return $REMOVE_TEMP_DIRECTORY_ERROR
else else
@ -776,48 +776,6 @@ function run_install_step()
return $SUCCESSFUL_STEP return $SUCCESSFUL_STEP
fi fi
;; ;;
$S_INSTALL_PEO)
######## installing paradiseo-peo ##########
echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m "
echo ' --> Installing Paradiseo-PEO. Please wait ...'
if [ ! "$installKitPath" = "$resourceKitPath" ]
then
cp -Rf $resourceKitPath/paradiseo-peo/ $installKitPath/
rm -Rf $installKitPath/paradiseo-peo/build/*
fi
execute_cmd "cd $installKitPath/paradiseo-peo/build" "[$currentStepCounter-1] Go in Paradiseo-PEO dir" $SPY
RETURN=$?
execute_cmd " echo \"cmake ../ -Dconfig=$installKitPath/$CMAKE_PRIMARY_CONFIG_FILE -G\"$BUILD_PROCESS_TYPE\" $MIN_CMAKE_FLAGS $OPTIONNAL_CMAKE_FLAGS \"" "[$currentStepCounter-2] Run CMake using generator $BUILD_PROCESS_TYPE -Dconfig=$installKitPath/$CMAKE_PRIMARY_CONFIG_FILE" $SPY
cmake ../ -Dconfig=$installKitPath/$CMAKE_PRIMARY_CONFIG_FILE -G"$BUILD_PROCESS_TYPE" $MIN_CMAKE_FLAGS $OPTIONNAL_CMAKE_FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE >> ${SPY} 2>> ${SPY}
RETURN=`expr $RETURN + $?`
if [ "$COMPILE_PARADISEO" = "1" ]
then
execute_cmd "ctest $CTEST_CONFIG" "[$currentStepCounter-3] Compile ParadisEO-PEO using CTest" $SPY
LAST_RETURN=$?
# don't consider a submission error as a "right error"
if [ ! "$LAST_RETURN" = "$DART_SUBMISSION_ERROR" ]
then
RETURN=`expr $RETURN + $LAST_RETURN`
fi
fi
if [ ! $(($RETURN)) = 0 ]
then
echo ''
echo " --> Error when installing Paradiseo-PEO"
echo -e ' \033[40m\033[1;33m### END ### \033[0m '
return $PARADISEO_INSTALL_ERROR
else
echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m"
echo
return $SUCCESSFUL_STEP
fi
;;
$S_CONFIGURE_MPD) $S_CONFIGURE_MPD)
######## copy .mpd.conf file in your HOME directory or in /etc if you are root (required for mpich2) ######## copy .mpd.conf file in your HOME directory or in /etc if you are root (required for mpich2)
echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m " echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m "
@ -848,6 +806,72 @@ function run_install_step()
return $SUCCESSFUL_STEP return $SUCCESSFUL_STEP
fi fi
;; ;;
$S_INSTALL_PEO)
######## installing paradiseo-peo ##########
echo -e " \033[40m\033[1;34m# STEP $currentStepCounter \033[0m "
echo ' --> Installing Paradiseo-PEO. Please wait ...'
####################################################
## Fichier d'installation revu par mahmoud FATENE ##
####################################################
#if [ "$UID" = "0" ]
#then
# execute_cmd "source /root/.bashrc" "[$currentStepCounter-5] Export variables" $SPY
# RETURN=$?
#else
# execute_cmd "source $HOME/.bashrc" "[$currentStepCounter-5] Export variables" $SPY
# RETURN=$?
#fi
#if [ ! $(($RETURN)) = 0 ]
#then
# echo ''
# echo " --> Error on sourcing .bashrc "
# echo -e ' \033[40m\033[1;33m### END ### \033[0m '
# return $SOURCE_ERROR
#else
# echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m"
# echo
# return $SUCCESSFUL_STEP
#fi
#
#if [ ! "$installKitPath" = "$resourceKitPath" ]
# then
# cp -Rf $resourceKitPath/paradiseo-peo/ $installKitPath/
# rm -Rf $installKitPath/paradiseo-peo/build/*
#fi
#######################################################
## Fin de la modification ##
#######################################################
execute_cmd "source $HOME/.bashrc" "[$currentStepCounter-5] Export variables" $SPY
execute_cmd "cd $installKitPath/paradiseo-peo/build" "[$currentStepCounter-1] Go in Paradiseo-PEO dir" $SPY
RETURN=$?
execute_cmd " echo \"cmake ../ -Dconfig=$installKitPath/$CMAKE_PRIMARY_CONFIG_FILE -G\"$BUILD_PROCESS_TYPE\" $MIN_CMAKE_FLAGS $OPTIONNAL_CMAKE_FLAGS \"" "[$currentStepCounter-2] Run CMake using generator $BUILD_PROCESS_TYPE -Dconfig=$installKitPath/$CMAKE_PRIMARY_CONFIG_FILE" $SPY
cmake ../ -Dconfig=$installKitPath/$CMAKE_PRIMARY_CONFIG_FILE -G"$BUILD_PROCESS_TYPE" $MIN_CMAKE_FLAGS $OPTIONNAL_CMAKE_FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE >> ${SPY} 2>> ${SPY}
RETURN=`expr $RETURN + $?`
if [ "$COMPILE_PARADISEO" = "1" ]
then
execute_cmd "ctest $CTEST_CONFIG" "[$currentStepCounter-3] Compile ParadisEO-PEO using CTest" $SPY
LAST_RETURN=$?
# don't consider a submission error as a "right error"
if [ ! "$LAST_RETURN" = "$DART_SUBMISSION_ERROR" ]
then
RETURN=`expr $RETURN + $LAST_RETURN`
fi
fi
if [ ! $(($RETURN)) = 0 ]
then
echo ''
echo " --> Error when installing Paradiseo-PEO"
echo -e ' \033[40m\033[1;33m### END ### \033[0m '
return $PARADISEO_INSTALL_ERROR
else
echo -e " \033[40m\033[1;34m# STEP $currentStepCounter OK \033[0m"
echo
return $SUCCESSFUL_STEP
fi
;;
$S_PEO_CHECK) $S_PEO_CHECK)
if [ -d paradiseo-eo -a -d paradiseo-mo -a -d paradiseo-moeo ] if [ -d paradiseo-eo -a -d paradiseo-mo -a -d paradiseo-moeo ]
@ -1232,9 +1256,9 @@ do
echo echo
echo -e ' \033[40m\033[1;33m### Please select your install for ParadisEO : ### \033[0m ' echo -e ' \033[40m\033[1;33m### Please select your install for ParadisEO : ### \033[0m '
echo echo
echo " 1 : Full install (all the components : EO,MO,MOEO and PEO)" echo " 1 : Basic install: only EO,MO and MOEO components will be installed."
echo " 2 : Basic install: only EO,MO and MOEO components will be installed." echo " 2 : ParadisEO-PEO install. I've already installed the basic version and I want to install ParadisEO-PEO"
echo " 3 : ParadisEO-PEO install. I've already installed the basic version and I want to install ParadisEO-PEO" echo " 3 : Full install (all the components : EO,MO,MOEO and PEO)"
echo " 4 : Remove a previous install of ParadisEO located in $INSTALL_PATH" echo " 4 : Remove a previous install of ParadisEO located in $INSTALL_PATH"
echo " 5 : Exit install" echo " 5 : Exit install"
read INSTALL_TYPE read INSTALL_TYPE

View file

@ -35,6 +35,7 @@
*/ */
#include <vector> #include <vector>
#include <iostream>
#include "runner.h" #include "runner.h"
#include "reac_thread.h" #include "reac_thread.h"
@ -106,17 +107,37 @@ void initializeContext ()
{ {
num_local_exec_runners = 0; num_local_exec_runners = 0;
/*
std :: cout << " Hi, I'm thread number \t" << getNodeRank () << std::endl;
int err_code = MPI_Barrier(MPI_COMM_WORLD);
if ( err_code != MPI_SUCCESS )
{
std :: cout << " Synchronisation error code \t" << err_code << std::endl;
}
*/
synchronizeNodes ();
// setting up the execution IDs & counting the number of local exec. runners // setting up the execution IDs & counting the number of local exec. runners
for (unsigned i = 0; i < the_runners.size (); i ++) for (unsigned i = 0; i < the_runners.size (); i ++)
{ {
the_runners [i] -> setExecutionID ( my_node -> execution_id_run[ i ] ); the_runners [i] -> setExecutionID ( my_node -> execution_id_run[ i ] );
if (the_runners [i] -> isAssignedLocally ()) num_local_exec_runners ++; if (the_runners [i] -> isAssignedLocally ()) num_local_exec_runners ++;
} }
/*
std :: cout << " num_local_exec_runners \t" << num_local_exec_runners << std::endl;
std :: cout << " num_exec_runners \t" << num_exec_runners << std::endl;
*/
synchronizeNodes ();
collectiveCountOfRunners( &num_local_exec_runners, &num_exec_runners ); collectiveCountOfRunners( &num_local_exec_runners, &num_exec_runners );
/*
// synchronizeNodes (); err_code = iCollectiveCountOfRunners( &num_local_exec_runners, &num_exec_runners );
std :: cout << " Error code \t" << err_code << "\t MPI_SUCCESS\t " << MPI_SUCCESS << std::endl;
if ( err_code != MPI_SUCCESS )
{
std :: cout << " Something strange in the neighbourhood \t" << err_code << std::endl;
}
*/
for (unsigned i = 0; i < the_runners.size (); i ++) for (unsigned i = 0; i < the_runners.size (); i ++)
if (the_runners [i] -> isAssignedLocally ()) the_runners [i] -> notifyContextInitialized (); if (the_runners [i] -> isAssignedLocally ()) the_runners [i] -> notifyContextInitialized ();

View file

@ -122,6 +122,13 @@ void collectiveCountOfRunners ( unsigned int* num_local_exec_runners, unsigned i
MPI_Allreduce( num_local_exec_runners, num_exec_runners, 1, MPI_UNSIGNED, MPI_SUM, MPI_COMM_WORLD ); MPI_Allreduce( num_local_exec_runners, num_exec_runners, 1, MPI_UNSIGNED, MPI_SUM, MPI_COMM_WORLD );
} }
// Return the code of execution of MPI_Allreduce
int iCollectiveCountOfRunners ( unsigned int* num_local_exec_runners, unsigned int* num_exec_runners )
{
return MPI_Allreduce( num_local_exec_runners, num_exec_runners, 1, MPI_UNSIGNED, MPI_SUM, MPI_COMM_WORLD );
}
int getRankFromName (const std :: string & __name) int getRankFromName (const std :: string & __name)
{ {

View file

@ -67,6 +67,8 @@ extern int getNumberOfNodes (); /* It gives the size of the environment (Total n
extern void collectiveCountOfRunners ( unsigned int* num_local_exec_runners, unsigned int* num_exec_runners ); extern void collectiveCountOfRunners ( unsigned int* num_local_exec_runners, unsigned int* num_exec_runners );
extern int iCollectiveCountOfRunners ( unsigned int* num_local_exec_runners, unsigned int* num_exec_runners );
extern int getRankFromName (const std :: string & __name); /* It gives the rank of the process extern int getRankFromName (const std :: string & __name); /* It gives the rank of the process
expressed by its name */ expressed by its name */

View file

@ -34,10 +34,12 @@
* *
*/ */
#include <iostream>
#include <set> #include <set>
#include <cassert> #include <cassert>
#include "schema.h" #include "schema.h"
#include "mess.h"
#include "xml_parser.h" #include "xml_parser.h"
#include "comm.h" #include "comm.h"
#include "node.h" #include "node.h"
@ -131,6 +133,7 @@ bool isScheduleNode ()
void loadSchema (const char * __filename) void loadSchema (const char * __filename)
{ {
// std :: cout << " I'm node number \t" << getNodeRank () << std :: endl;
openXMLDocument (__filename); openXMLDocument (__filename);
std :: string name; std :: string name;
@ -204,4 +207,5 @@ void loadSchema (const char * __filename)
} }
closeXMLDocument (); closeXMLDocument ();
//synchronizeNodes ();
} }

View file

@ -74,6 +74,7 @@ ENDFOREACH (test)
IF(ENABLE_MINIMAL_CMAKE_TESTING) IF(ENABLE_MINIMAL_CMAKE_TESTING)
SET (MIN_TEST_LIST t-MultiStart) SET (MIN_TEST_LIST t-MultiStart)
FOREACH (testrun ${TEST_RUN}) FOREACH (testrun ${TEST_RUN})

View file

@ -7,7 +7,6 @@
<node name="1" num_workers="0"> <node name="1" num_workers="0">
<runner>1</runner> <runner>1</runner>
<runner>2</runner>
</node> </node>
<node name="2" num_workers="1"> <node name="2" num_workers="1">

View file

@ -35,8 +35,9 @@
*/ */
#include <iostream> #include <iostream>
#include <stdlib.h>
int main (int __argc, char *__argv[]) int main (int __argc, char *__argv[])
{ {
system("mpdallexit"); int success = system("mpdallexit");
} }

View file

@ -35,8 +35,9 @@
*/ */
#include <iostream> #include <iostream>
#include <stdlib.h>
int main (int __argc, char *__argv[]) int main (int __argc, char *__argv[])
{ {
system("mpdboot"); int success = system("mpdboot");
} }