Changeset 4105b3


Ignore:
Timestamp:
05/11/09 14:28:34 (5 years ago)
Author:
Pavan Balaji <balaji@…>
Branches:
master
Children:
56c991e
Parents:
63916a
Message:

[svn-r4508] Removed the control system which was mainly just passing through
commands to the process manager. Now the UI has direct access to the
process manager. Added a new component called as the resource
management kernel (RMK) which essentially plays the same role as the
control system, except that it is only active initially when resources
are being allocated or queried. After that the UI works directly with
the PM.

Location:
src/pm/hydra
Files:
4 added
4 deleted
8 edited
1 copied
5 moved

Legend:

Unmodified
Added
Removed
  • src/pm/hydra/Makefile.sm

    r052f26 r4105b3  
    55# 
    66 
    7 SUBDIRS = utils control bootstrap css demux pm ui . 
     7SUBDIRS = utils rmk bootstrap css demux pm ui . 
    88 
    99all-preamble: 
  • src/pm/hydra/configure.in

    r3dd986 r4105b3  
    121121 
    122122 
     123dnl Check what resource management kernel we should use 
     124AC_ARG_WITH(hydra-rmk, [  --with-hydra-rmk        Resource Management Kernel], 
     125                    [ hydra_rmk=$withval ], 
     126                    [ hydra_rmk="dummy" ]) 
     127AC_MSG_CHECKING(resource management kernel) 
     128AC_MSG_RESULT($hydra_rmk) 
     129hydra_rmk_names="`echo $hydra_rmk | sed -e 's/:/ /g' -e 's/,/ /g'`" 
     130AC_DEFINE_UNQUOTED(HYDRA_RMK_NAMES,"$hydra_rmk_names",[Enabled resource management kernels]) 
     131AC_SUBST(hydra_rmk_names) 
     132 
     133for hydra_rmk_name in ${hydra_rmk_names}; do 
     134    if test -z "${hydra_default_rmk}" ; then 
     135       hydra_default_rmk=$hydra_rmk_name 
     136    fi 
     137    hydra_rmk_makefiles="$hydra_rmk_makefiles rmk/${hydra_rmk_name}/Makefile" 
     138    hydra_rmk_init_decl="${hydra_rmk_init_decl} 
     139HYD_Status HYD_RMKI_${hydra_rmk_name}_init(void);" 
     140    hydra_rmk_name_array="${hydra_rmk_name_array} \"${hydra_rmk_name}\", " 
     141    hydra_rmk_init_array="${hydra_rmk_init_array} HYD_RMKI_${hydra_rmk_name}_init, " 
     142done 
     143hydra_rmk_name_array="${hydra_rmk_name_array} NULL" 
     144hydra_rmk_init_array="${hydra_rmk_init_array} NULL" 
     145AC_DEFINE_UNQUOTED(HYDRA_DEFAULT_RMK,"$hydra_default_rmk",[Default resource management kernel]) 
     146AC_SUBST(hydra_rmk_init_decl) 
     147AC_SUBST(hydra_rmk_name_array) 
     148AC_SUBST(hydra_rmk_init_array) 
     149 
     150 
    123151dnl Check what process manager we should use 
    124152AC_ARG_WITH(hydra-pm, [  --with-hydra-pm               Process Manager], 
     
    136164AC_MSG_RESULT($hydra_ui) 
    137165AC_SUBST(hydra_ui) 
    138  
    139 dnl Check what control system we should use 
    140 AC_ARG_WITH(hydra-control, [  --with-hydra-control               Control System], 
    141                 [ hydra_control=$withval ], 
    142                 [ hydra_control=consys ]) 
    143 AC_MSG_CHECKING(control system) 
    144 AC_MSG_RESULT($hydra_control) 
    145 AC_SUBST(hydra_control) 
    146166 
    147167dnl Check what communication sub-system we should use 
     
    350370        ui/utils/Makefile \ 
    351371        ui/${hydra_ui}/Makefile \ 
    352         control/Makefile \ 
    353         control/utils/Makefile \ 
    354         control/${hydra_control}/Makefile \ 
    355372        pm/Makefile \ 
    356373        pm/utils/Makefile \ 
     
    363380        bootstrap/include/bsci.h \ 
    364381        ${hydra_bss_makefiles} \ 
     382        rmk/Makefile \ 
     383        rmk/utils/Makefile \ 
     384        rmk/src/Makefile \ 
     385        rmk/src/rmki_init.c \ 
     386        rmk/include/rmki.h \ 
     387        ${hydra_rmk_makefiles} \ 
    365388        css/Makefile \ 
    366389        css/utils/Makefile \ 
  • src/pm/hydra/rmk/Makefile.sm

    r62087e r4105b3  
    55# 
    66 
    7 SUBDIRS_hydra_control = consys 
    8 SUBDIRS = utils @hydra_control@ . 
     7SUBDIRS_hydra_rmk_names = dummy 
     8SUBDIRS = utils src @hydra_rmk_names@ . 
  • src/pm/hydra/rmk/dummy/Makefile.sm

    r052f26 r4105b3  
    88 
    99libhydra_a_DIR = ${HYDRA_LIB_PATH} 
    10 libhydra_a_SOURCES = consys_launch.c consys_wait.c consys_finalize.c 
     10libhydra_a_SOURCES = rmk_dummy_init.c 
    1111INCLUDES = -I${abs_srcdir}/../../include \ 
     12        -I../../include \ 
    1213        -I${abs_srcdir}/../../../../include \ 
    13         -I../../include \ 
    1414        -I../../../../include \ 
    1515        -I${abs_srcdir}/../include \ 
     16        -I../include \ 
    1617        -I${abs_srcdir}/../utils \ 
    17         -I${abs_srcdir}/../../pm/include 
     18        -I${abs_srcdir}/../../demux 
  • src/pm/hydra/rmk/dummy/rmk_dummy_init.c

    r0cf007 r4105b3  
    55 */ 
    66 
    7 #include "hydra.h" 
    8 #include "csi.h" 
    9 #include "pmci.h" 
     7#include "hydra_base.h" 
     8#include "rmki.h" 
     9#include "rmk_dummy.h" 
    1010 
    11 HYD_Status HYD_CSI_finalize(void) 
     11struct HYD_RMKI_fns HYD_RMKI_fns; 
     12 
     13HYD_Status HYD_RMKI_dummy_init(void) 
    1214{ 
    1315    HYD_Status status = HYD_SUCCESS; 
     
    1517    HYDU_FUNC_ENTER(); 
    1618 
    17     status = HYD_PMCI_finalize(); 
    18     HYDU_ERR_POP(status, "error returned from PM finalize\n"); 
     19    HYDU_FUNC_EXIT(); 
    1920 
    20   fn_exit: 
    21     HYDU_FUNC_EXIT(); 
    2221    return status; 
    23  
    24   fn_fail: 
    25     goto fn_exit; 
    2622} 
  • src/pm/hydra/rmk/src/Makefile.sm

    r052f26 r4105b3  
    88 
    99libhydra_a_DIR = ${HYDRA_LIB_PATH} 
    10 libhydra_a_SOURCES = csiu.c 
     10libhydra_a_SOURCES = rmki_init.c 
    1111INCLUDES = -I${abs_srcdir}/../../include \ 
     12        -I../../include \ 
    1213        -I${abs_srcdir}/../../../../include \ 
    13         -I../../include \ 
    1414        -I../../../../include \ 
    1515        -I${abs_srcdir}/../include \ 
    16         -I${abs_srcdir}/../../pm/include \ 
     16        -I../include \ 
     17        -I${abs_srcdir}/../utils \ 
    1718        -I${abs_srcdir}/../../demux 
  • src/pm/hydra/rmk/utils/Makefile.sm

    r052f26 r4105b3  
    88 
    99libhydra_a_DIR = ${HYDRA_LIB_PATH} 
    10 libhydra_a_SOURCES = csiu.c 
     10libhydra_a_SOURCES = rmku_query_node_list.c 
    1111INCLUDES = -I${abs_srcdir}/../../include \ 
     12        -I../../include \ 
    1213        -I${abs_srcdir}/../../../../include \ 
    13         -I../../include \ 
    1414        -I../../../../include \ 
    1515        -I${abs_srcdir}/../include \ 
    16         -I${abs_srcdir}/../../pm/include \ 
    1716        -I${abs_srcdir}/../../demux 
  • src/pm/hydra/rmk/utils/rmku_query_node_list.c

    rffd234 r4105b3  
    55 */ 
    66 
    7 #include "hydra.h" 
     7#include "hydra_base.h" 
    88#include "hydra_utils.h" 
    9 #include "csi.h" 
    10 #include "pmci.h" 
     9#include "rmku.h" 
    1110 
    12 extern HYD_Handle handle; 
    13  
    14 HYD_Status HYD_CSI_launch_procs(void) 
     11HYD_Status HYD_RMKU_query_node_list(int num_nodes) 
    1512{ 
    1613    HYD_Status status = HYD_SUCCESS; 
     
    1815    HYDU_FUNC_ENTER(); 
    1916 
    20     status = HYD_PMCI_launch_procs(); 
    21     HYDU_ERR_POP(status, "PM returned error while launching processes\n"); 
     17    HYDU_FUNC_EXIT(); 
    2218 
    23   fn_exit: 
    24     HYDU_FUNC_EXIT(); 
    2519    return status; 
    26  
    27   fn_fail: 
    28     goto fn_exit; 
    2920} 
  • src/pm/hydra/ui/mpiexec/Makefile.sm

    r052f26 r4105b3  
    1313        -I../../../../include \ 
    1414        -I${abs_srcdir}/../utils \ 
    15         -I${abs_srcdir}/../../control/include \ 
    1615        -I${abs_srcdir}/../../demux 
    1716install_BIN = mpiexec 
  • src/pm/hydra/ui/mpiexec/callback.c

    reeabeb r4105b3  
    88#include "hydra_utils.h" 
    99#include "mpiexec.h" 
    10 #include "csi.h" 
    1110#include "demux.h" 
    1211 
  • src/pm/hydra/ui/mpiexec/mpiexec.c

    r3dd986 r4105b3  
    99#include "mpiexec.h" 
    1010#include "uiu.h" 
    11 #include "csi.h" 
    1211#include "demux.h" 
    1312 
     
    167166 
    168167    /* Launch the processes */ 
    169     status = HYD_CSI_launch_procs(); 
    170     HYDU_ERR_POP(status, "control system error launching processes\n"); 
     168    status = HYD_PMCI_launch_procs(); 
     169    HYDU_ERR_POP(status, "process manager returned error launching processes\n"); 
    171170 
    172171    /* During shutdown, no processes are launched, so there is nothing 
     
    180179    if (handle.launch_mode == HYD_LAUNCH_SHUTDOWN) { 
    181180        /* Call finalize functions for lower layers to cleanup their resources */ 
    182         status = HYD_CSI_finalize(); 
    183         HYDU_ERR_POP(status, "control system error on finalize\n"); 
     181        status = HYD_PMCI_finalize(); 
     182        HYDU_ERR_POP(status, "process manager error on finalize\n"); 
    184183 
    185184        /* Free the mpiexec params */ 
     
    213212 
    214213    /* Wait for their completion */ 
    215     status = HYD_CSI_wait_for_completion(); 
    216     HYDU_ERR_POP(status, "control system error waiting for completion\n"); 
     214    status = HYD_PMCI_wait_for_completion(); 
     215    HYDU_ERR_POP(status, "process manager error waiting for completion\n"); 
    217216 
    218217    /* Check for the exit status for all the processes */ 
     
    240239 
    241240    /* Call finalize functions for lower layers to cleanup their resources */ 
    242     status = HYD_CSI_finalize(); 
    243     HYDU_ERR_POP(status, "control system error on finalize\n"); 
     241    status = HYD_PMCI_finalize(); 
     242    HYDU_ERR_POP(status, "process manager error on finalize\n"); 
    244243 
    245244    /* Free the mpiexec params */ 
  • src/pm/hydra/ui/mpiexec/utils.c

    r031c66b r4105b3  
    368368            if (argv[1] && IS_HELP(argv[1])) { 
    369369                printf("\n"); 
    370                 printf("--boot-foreground-proxies: Launch persistent proxies in foreground\n\n"); 
     370                printf("--boot-foreground-proxies: "); 
     371                printf("Launch persistent proxies in foreground\n\n"); 
    371372                HYDU_ERR_SETANDJUMP(status, HYD_GRACEFUL_ABORT, ""); 
    372373            } 
  • src/pm/hydra/ui/utils/uiu.c

    r572ede r4105b3  
    365365        for (segment = partition->segment_list; segment; segment = segment->next) 
    366366            HYDU_Dump("          Start PID: %d; Process count: %d\n", 
    367                        segment->start_pid, segment->proc_count); 
     367                      segment->start_pid, segment->proc_count); 
    368368        HYDU_Dump("\n"); 
    369369        HYDU_Dump("        Partition exec list:\n"); 
     
    371371        for (exec = partition->exec_list; exec; exec = exec->next) 
    372372            HYDU_Dump("          Exec: %s; Process count: %d\n", exec->exec[0], 
    373                        exec->proc_count); 
     373                      exec->proc_count); 
    374374    } 
    375375 
  • src/pm/hydra/utils/args/args.c

    r821eb0 r4105b3  
    1212 
    1313    if ((stat(filename, &file_stat) < 0) || !(S_ISREG(file_stat.st_mode))) { 
    14         return 0; /* no such file, or not a regular file */ 
     14        return 0;       /* no such file, or not a regular file */ 
    1515    } 
    1616 
     
    2727    /* The executable is somewhere in the user's path. We need to find 
    2828     * it. */ 
    29     if (getenv("PATH")) { /* If the PATH environment exists */ 
     29    if (getenv("PATH")) {       /* If the PATH environment exists */ 
    3030        user_path = HYDU_strdup(getenv("PATH")); 
    3131        test_loc = strtok(user_path, ";:"); 
     
    4747                HYDU_ERR_POP(status, "unable to join strings\n"); 
    4848 
    49                 goto fn_exit; /* We are done */ 
     49                goto fn_exit;   /* We are done */ 
    5050            } 
    5151 
Note: See TracChangeset for help on using the changeset viewer.