Esempio n. 1
0
int main_exec(int argc, char **argv)
{
    UINT32 this_tcid;
    UINT32 this_comm;
    UINT32 this_rank;

    task_brd_default_init(argc, argv);
    if(EC_FALSE == task_brd_default_check_validity())
    {
        sys_log(LOGSTDOUT, "error:main_exec: validity checking failed\n");
        task_brd_default_abort();
        return (-1);
    }

    this_tcid = task_brd_default_get_tcid();
    this_comm = task_brd_default_get_comm();
    this_rank = task_brd_default_get_rank();

    if (EC_TRUE == task_brd_check_is_dbg_tcid(this_tcid) && CMPI_DBG_RANK == this_rank)
    {
        do_cmd_default();
    }
    else if (EC_TRUE == task_brd_check_is_monitor_tcid(this_tcid) && CMPI_MON_RANK == this_rank)
    {
        void * mod_mgr_def;

        mod_mgr_def = mod_mgr_new(CMPI_ERROR_MODI, LOAD_BALANCING_LOOP);
        mod_mgr_default_init(mod_mgr_def, CMPI_ANY_TCID, CMPI_ANY_RANK);

        //mod_mgr_excl(this_tcid, CMPI_ANY_COMM, this_rank, CMPI_ANY_MODI, mod_mgr_def);

        sys_log(LOGSTDOUT, "======================================================================\n");
        sys_log(LOGSTDOUT, "                       mod_mgr_default_init finished                  \n");
        sys_log(LOGSTDOUT, "======================================================================\n");
        mod_mgr_print(LOGSTDOUT, mod_mgr_def);

        mod_mgr_free(mod_mgr_def);

        do_slave_wait_default();
    }
#if 1
    /*fwd rank entrance*/
    else if (CMPI_FWD_RANK == this_rank)
    {
        sys_log(LOGSTDOUT,"======================================================================\n");
        sys_log(LOGSTDOUT,"                taskc_mgr in (tcid %s, rank %ld)                     \n", c_word_to_ipv4(this_tcid), this_rank);
        super_show_work_client(task_brd_default_get_super(), LOGSTDOUT);/*debug only*/
        sys_log(LOGSTDOUT,"======================================================================\n");

        do_slave_wait_default();
    }
#endif
    /*work process*/
    else
    {
        do_slave_wait_default();
    }

    return (0);
}
Esempio n. 2
0
int main_crfs(int argc, char **argv)
{
    UINT32 crfs_rank;
    UINT32 tester_rank;
    
    task_brd_default_init(argc, argv);
    if(EC_FALSE == task_brd_default_check_validity())
    {
        sys_log(LOGSTDOUT, "error:main_crfs: validity checking failed\n");
        task_brd_default_abort();
        return (-1);
    }

    crfs_rank = CRFS_TEST_RANK;
    tester_rank = 0;

    /*define specific runner for each (tcid, rank)*/
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.1"), crfs_rank  , __test_crfs_runner);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.2"), tester_rank, __test_crfs_write_supplier_1);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.3"), tester_rank, __test_crfs_read_consumer_1);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.4"), tester_rank, __test_crfs_write_supplier_2);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.5"), tester_rank, __test_crfs_read_consumer_2);

    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.101"), tester_rank, __test_crfs_check_content_consumer_1);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.102"), tester_rank, __test_crfs_check_content_consumer_2);

    /*start the defined runner on current (tcid, rank)*/
    task_brd_default_start_runner();    

    return (0);
}
Esempio n. 3
0
int main_mxnp_nxdn(int argc, char **argv)
{
    task_brd_default_init(argc, argv);
    if(EC_FALSE == task_brd_default_check_validity())
    {
        dbg_log(SEC_0137_DEMO, 0)(LOGSTDOUT, "error:main_mxnp_nxdn: validity checking failed\n");
        task_brd_default_abort();
        return (-1);
    }

    /*define specific runner for each (tcid, rank)*/
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.1"), CMPI_CDFS_RANK, __test_cdfs_np_runner);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.20.1"), CMPI_CDFS_RANK, __test_cdfs_np_runner);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.2"), CMPI_CDFS_RANK, __test_cdfs_dn_runner);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.3"), CMPI_CDFS_RANK, __test_cdfs_dn_runner);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.4"), CMPI_CDFS_RANK, __test_cdfs_dn_runner);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.5"), CMPI_CDFS_RANK, __test_cdfs_write_supplier_1);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.6"), CMPI_CDFS_RANK, __test_cdfs_read_consumer_1);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.7"), CMPI_CDFS_RANK, __test_cdfs_write_supplier_2);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.8"), CMPI_CDFS_RANK, __test_cdfs_read_consumer_2);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.91"), CMPI_CDFS_RANK, __test_cdfs_check_replica_consumer_1);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.92"), CMPI_CDFS_RANK, __test_cdfs_check_replica_consumer_2);

    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.101"), CMPI_CDFS_RANK, __test_cdfs_check_content_consumer_1);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.102"), CMPI_CDFS_RANK, __test_cdfs_check_content_consumer_2);

    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.201"), CMPI_CDFS_RANK, __test_cdfs_cfuse_consumer);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.202"), CMPI_CDFS_RANK, __test_cdfs_cfuse_consumer);

    /*start the defined runner on current (tcid, rank)*/
    task_brd_default_start_runner();    

    return (0);
}
Esempio n. 4
0
int main_cbgt(int argc, char **argv)
{
    task_brd_default_init(argc, argv);
    if(EC_FALSE == task_brd_default_check_validity())
    {
        sys_log(LOGSTDOUT, "error:main_cbgt: validity checking failed\n");
        task_brd_default_abort();
        return (-1);
    }

    //__test_cbgt_suite_01();
    __test_cbgt_suite_02();
    
    return (0);
}
Esempio n. 5
0
int main_cscore(int argc, char **argv)
{
    task_brd_default_init(argc, argv);
    if(EC_FALSE == task_brd_default_check_validity())
    {
        dbg_log(SEC_0137_DEMO, 0)(LOGSTDOUT, "error:main_cscore: validity checking failed\n");
        task_brd_default_abort();
        return (-1);
    }

    /*define specific runner for each (tcid, rank)*/
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.1"), 1, __test_cscore_cbgt_root_server_runner);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.2"), 1, __test_cscore_cases_runner);

    /*start the defined runner on current (tcid, rank)*/
    task_brd_default_start_runner();

    return (0);
}
Esempio n. 6
0
int main_ict(int argc, char **argv)
{
    task_brd_default_init(argc, argv);
    if(EC_FALSE == task_brd_default_check_validity())
    {
        sys_log(LOGSTDOUT, "error:main_ict: validity checking failed\n");
        task_brd_default_abort();
        return (-1);
    }
    
    /*define specific runner for each (tcid, rank)*/
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.1") , CMPI_FWD_RANK, __test_ict_data_supplier);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.2") , CMPI_FWD_RANK, __test_ict_data_supplier);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.3") , CMPI_FWD_RANK, __test_ict_data_supplier);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.4") , CMPI_FWD_RANK, __test_ict_data_supplier);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.5") , CMPI_FWD_RANK, __test_ict_data_supplier);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.6") , CMPI_FWD_RANK, __test_ict_data_supplier);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.7") , CMPI_FWD_RANK, __test_ict_data_supplier);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.8") , CMPI_FWD_RANK, __test_ict_data_supplier);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.9") , CMPI_FWD_RANK, __test_ict_data_supplier);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.10"), CMPI_FWD_RANK, __test_ict_data_supplier);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.11"), CMPI_FWD_RANK, __test_ict_data_supplier);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.12"), CMPI_FWD_RANK, __test_ict_data_supplier);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.13"), CMPI_FWD_RANK, __test_ict_data_supplier);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.14"), CMPI_FWD_RANK, __test_ict_data_supplier);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.15"), CMPI_FWD_RANK, __test_ict_data_supplier);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.16"), CMPI_FWD_RANK, __test_ict_data_supplier);

    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.20"), CMPI_FWD_RANK, __test_ict_data_consumer_1);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.21"), CMPI_FWD_RANK, __test_ict_data_consumer_2);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.22"), CMPI_FWD_RANK, __test_ict_data_consumer_2);
    task_brd_default_add_runner(c_ipv4_to_word("10.10.10.23"), CMPI_FWD_RANK, __test_ict_data_consumer_2);

    /*start the defined runner on current (tcid, rank)*/
    task_brd_default_start_runner();

    return (0);
}
Esempio n. 7
0
int main_udp(int argc, char **argv)
{
    UINT32 this_tcid;
    UINT32 this_comm;
    UINT32 this_rank;

    task_brd_default_init(argc, argv);
    if(EC_FALSE == task_brd_default_check_validity())
    {
        sys_log(LOGSTDOUT, "error:main_trans: validity checking failed\n");
        task_brd_default_abort();
        return (-1);
    }

    this_tcid = task_brd_default_get_tcid();
    this_comm = task_brd_default_get_comm();
    this_rank = task_brd_default_get_rank();

    if (EC_TRUE == task_brd_check_is_dbg_tcid(this_tcid) && CMPI_DBG_RANK == this_rank)
    {
        do_cmd_default();
    }
    else if (EC_TRUE == task_brd_check_is_monitor_tcid(this_tcid) && CMPI_MON_RANK == this_rank)
    {
        void * mod_mgr_def;

        mod_mgr_def = mod_mgr_new(CMPI_ERROR_MODI, LOAD_BALANCING_LOOP);
        mod_mgr_default_init(mod_mgr_def, CMPI_ANY_TCID, CMPI_ANY_RANK);

        //mod_mgr_excl(this_tcid, CMPI_ANY_COMM, this_rank, CMPI_ANY_MODI, mod_mgr_def);

        sys_log(LOGSTDOUT, "======================================================================\n");
        sys_log(LOGSTDOUT, "                       mod_mgr_default_init finished                  \n");
        sys_log(LOGSTDOUT, "======================================================================\n");
        mod_mgr_print(LOGSTDOUT, mod_mgr_def);

        mod_mgr_free(mod_mgr_def);

        do_slave_wait_default();
    }

    /*fwd rank entrance*/
    else if (c_ipv4_to_word("10.10.10.1") == this_tcid && CMPI_FWD_RANK == this_rank)
    {
        int sockfd;
        const char *mcast_ipaddr_str = "239.2.11.71";/*239.0.0.0бл239.255.255.255*/
        UINT32 mcast_ipaddr;
        UINT32 mcast_port = 8888;

        mcast_ipaddr = c_ipv4_to_word(mcast_ipaddr_str);

        if(EC_FALSE == csocket_start_udp_mcast_recver(mcast_ipaddr, mcast_port, &sockfd))
        {
            sys_log(LOGCONSOLE, "error:start udp server %s:%ld failed\n", mcast_ipaddr_str, mcast_port);
        }
        else
        {
            UINT8 data[256];
            UINT32 dlen;

            sys_log(LOGCONSOLE, "start udp server %s:%ld\n", mcast_ipaddr_str, mcast_port);
            for(;EC_TRUE == csocket_udp_mcast_recvfrom(sockfd, mcast_ipaddr, mcast_port, data, sizeof(data)/sizeof(data[0]), &dlen);)
            {
                sys_log(LOGCONSOLE, "[DEBUG] recv udp data: %.*s\n", dlen, (char *)data);
            }
            csocket_stop_udp_mcast_recver(sockfd, mcast_ipaddr);
        }
        do_slave_wait_default();
    }

    else if (c_ipv4_to_word("10.10.10.7") == this_tcid && CMPI_FWD_RANK == this_rank)
    {
        int sockfd;
        const char *mcast_ipaddr_str = "239.2.11.71";
        UINT32 mcast_ipaddr;
        UINT32 mcast_port = 8888;

        UINT32 loop;

        mcast_ipaddr = c_ipv4_to_word(mcast_ipaddr_str);

        csocket_start_udp_mcast_sender(mcast_ipaddr, mcast_port, &sockfd);
        for(loop = 0; loop < 5; loop ++)
        {
            UINT8  data[256];
            UINT32 dlen;

            snprintf((char *)data, sizeof(data)/sizeof(data[0]), "[loop %ld] hello world!", loop);
            dlen = strlen((char *)data);
            //dlen = sizeof(data)/sizeof(data[0]);
            if(EC_FALSE == csocket_udp_mcast_sendto(sockfd, mcast_ipaddr, mcast_port, data, dlen))
            {
                sys_log(LOGSTDOUT, "error:send udp data to %s:%ld failed\n", mcast_ipaddr_str, mcast_port);
                break;
            }
            sys_log(LOGCONSOLE, "send udp data: %.*s\n", dlen, (char *)data);
            c_sleep(5);
        }
        csocket_stop_udp_mcast_sender(sockfd, c_ipv4_to_word(mcast_ipaddr_str));

        do_slave_wait_default();
    }

    else if (CMPI_FWD_RANK == this_rank)
    {
        sys_log(LOGSTDOUT,"======================================================================\n");
        sys_log(LOGSTDOUT,"                taskc_mgr in (tcid %s, rank %ld)                     \n", c_word_to_ipv4(this_tcid), this_rank);
        super_show_work_client(task_brd_default_get_super(), LOGSTDOUT);/*debug only*/
        sys_log(LOGSTDOUT,"======================================================================\n");

        do_slave_wait_default();
    }

    /*work process*/
    else
    {
        do_slave_wait_default();
    }

    return (0);
}
Esempio n. 8
0
int main_trans(int argc, char **argv)
{
    UINT32 this_tcid;
    UINT32 this_comm;
    UINT32 this_rank;

    task_brd_default_init(argc, argv);
    if(EC_FALSE == task_brd_default_check_validity())
    {
        sys_log(LOGSTDOUT, "error:main_trans: validity checking failed\n");
        task_brd_default_abort();
        return (-1);
    }

    this_tcid = task_brd_default_get_tcid();
    this_comm = task_brd_default_get_comm();
    this_rank = task_brd_default_get_rank();

    if (EC_TRUE == task_brd_check_is_dbg_tcid(this_tcid) && CMPI_DBG_RANK == this_rank)
    {
        do_cmd_default();
    }
    else if (EC_TRUE == task_brd_check_is_monitor_tcid(this_tcid) && CMPI_MON_RANK == this_rank)
    {
        void * mod_mgr_def;

        mod_mgr_def = mod_mgr_new(CMPI_ERROR_MODI, LOAD_BALANCING_LOOP);
        mod_mgr_default_init(mod_mgr_def, CMPI_ANY_TCID, CMPI_ANY_RANK);

        //mod_mgr_excl(this_tcid, CMPI_ANY_COMM, this_rank, CMPI_ANY_MODI, mod_mgr_def);

        sys_log(LOGSTDOUT, "======================================================================\n");
        sys_log(LOGSTDOUT, "                       mod_mgr_default_init finished                  \n");
        sys_log(LOGSTDOUT, "======================================================================\n");
        mod_mgr_print(LOGSTDOUT, mod_mgr_def);

        mod_mgr_free(mod_mgr_def);

        do_slave_wait_default();
    }

    /*fwd rank entrance*/
    else if (c_ipv4_to_word("10.10.10.2") == this_tcid && CMPI_FWD_RANK == this_rank)
    {
        CSTRING *src_fname;
        CSTRING *des_fname;
        UINT32   des_tcid;

        src_fname = cstring_new((UINT8 *)"/home/ezhocha/bgn/bin/CentOS_4.4_DVD.iso", 0);
        des_fname = cstring_new((UINT8 *)"/home/ezhocha/bgn/bin/CentOS_4.4_DVD_des.iso", 0);

        des_tcid = c_ipv4_to_word("10.10.10.1");

        super_transfer(0, src_fname, des_tcid, des_fname);
        do_slave_wait_default();
    }

    else if (CMPI_FWD_RANK == this_rank)
    {
        sys_log(LOGSTDOUT,"======================================================================\n");
        sys_log(LOGSTDOUT,"                taskc_mgr in (tcid %s, rank %ld)                     \n", c_word_to_ipv4(this_tcid), this_rank);
        super_show_work_client(task_brd_default_get_super(), LOGSTDOUT);/*debug only*/
        sys_log(LOGSTDOUT,"======================================================================\n");

        do_slave_wait_default();
    }

    /*work process*/
    else
    {
        do_slave_wait_default();
    }

    return (0);
}
Esempio n. 9
0
int main_cscore0(int argc, char **argv)
{
    UINT32 this_tcid;
    UINT32 this_comm;
    UINT32 this_rank;

    task_brd_default_init(argc, argv);
    if(EC_FALSE == task_brd_default_check_validity())
    {
        dbg_log(SEC_0137_DEMO, 0)(LOGSTDOUT, "error:main_cscore: validity checking failed\n");
        task_brd_default_abort();
        return (-1);
    }

    this_tcid = task_brd_default_get_tcid();
    this_comm = task_brd_default_get_comm();
    this_rank = task_brd_default_get_rank();

    if (EC_TRUE == task_brd_check_is_dbg_tcid(this_tcid) && CMPI_DBG_RANK == this_rank)
    {
        do_cmd_default();
    }
    else if (EC_TRUE == task_brd_check_is_monitor_tcid(this_tcid) && CMPI_MON_RANK == this_rank)
    {
        void * mod_mgr_def;

        mod_mgr_def = mod_mgr_new(CMPI_ERROR_MODI, LOAD_BALANCING_LOOP);
        mod_mgr_default_init(mod_mgr_def, CMPI_ANY_TCID, CMPI_ANY_RANK);

        //mod_mgr_excl(this_tcid, CMPI_ANY_COMM, this_rank, CMPI_ANY_MODI, mod_mgr_def);

        dbg_log(SEC_0137_DEMO, 5)(LOGSTDOUT, "======================================================================\n");
        dbg_log(SEC_0137_DEMO, 5)(LOGSTDOUT, "                       mod_mgr_default_init finished                  \n");
        dbg_log(SEC_0137_DEMO, 5)(LOGSTDOUT, "======================================================================\n");
        mod_mgr_print(LOGSTDOUT, mod_mgr_def);

        mod_mgr_free(mod_mgr_def);

        do_slave_wait_default();
    }

    else if (c_ipv4_to_word("10.10.10.1") == this_tcid && 1 == this_rank)
    {
        UINT32 cbgt_md_id;

        CSTRING *cbgt_db_root_dir;
        CBYTES   root_table_name;

        cbgt_db_root_dir = task_brd_default_get_hsbgt_root_table_dir();
        ASSERT(NULL_PTR != cbgt_db_root_dir);
        cbytes_mount(&root_table_name, strlen("root"), (UINT8 *)"root");

        cbgt_md_id = cbgt_start(CBGT_TYPE_ROOT_SERVER, CBGT_ROOT_TABLE_ID, &root_table_name, NULL_PTR, cbgt_db_root_dir, CBGT_O_RDWR | CBGT_O_CREAT);
        test_case_cbgt_create_table_on_root(cbgt_md_id,
                                            CSCORE_MD_DEFAULT_TABLE_NAME,
                                            1,
                                            CSCORE_MD_DEFAULT_COLF_NAME
                                            );

        ASSERT(ERR_MODULE_ID != cbgt_md_id);

        dbg_log(SEC_0137_DEMO, 9)(LOGSTDOUT, "[DEBUG] main_cbgt: ============================ root server started ====================\n");

        do_slave_wait_default();
    }

    /*fwd rank entrance*/
    else if (c_ipv4_to_word("10.10.10.2") == this_tcid && 1 == this_rank)
    {
        UINT32 cscore_md_id;
        dbg_log(SEC_0137_DEMO, 5)(LOGSTDOUT,"======================================================================\n");
        dbg_log(SEC_0137_DEMO, 5)(LOGSTDOUT,"                taskc_mgr in (tcid %s, rank %ld)                     \n", c_word_to_ipv4(this_tcid), this_rank);
        super_show_work_client(task_brd_default_get_super(), LOGSTDOUT);/*debug only*/
        dbg_log(SEC_0137_DEMO, 5)(LOGSTDOUT,"======================================================================\n");

        cscore_md_id = cscore_start();
        ASSERT(ERR_MODULE_ID != cscore_md_id );
        dbg_log(SEC_0137_DEMO, 9)(LOGSTDOUT, "[DEBUG] main_cscore: cscore_md_id = %ld\n", cscore_md_id);

        //test_case_cscore_001(cscore_md_id);
        //test_case_cscore_002(cscore_md_id);
        //test_case_cscore_003(cscore_md_id);
        //test_case_cscore_004(cscore_md_id);
        test_case_cscore_005(cscore_md_id);

        cscore_end(cscore_md_id);

        do_slave_wait_default();
    }

    /*work process*/
    else
    {
        do_slave_wait_default();
    }

    return (0);
}
Esempio n. 10
0
int main_csolr(int argc, char **argv)
{
    UINT32 this_tcid;
    UINT32 this_comm;
    UINT32 this_rank;

    task_brd_default_init(argc, argv);
    if(EC_FALSE == task_brd_default_check_validity())
    {
        dbg_log(SEC_0137_DEMO, 0)(LOGSTDOUT, "error:main: validity checking failed\n");
        task_brd_default_abort();
        return (-1);
    }

    this_tcid = task_brd_default_get_tcid();
    this_comm = task_brd_default_get_comm();
    this_rank = task_brd_default_get_rank();

    if (EC_TRUE == task_brd_check_is_dbg_tcid(this_tcid) && CMPI_DBG_RANK == this_rank)
    {
        do_cmd_default();
    }
    else if (EC_TRUE == task_brd_check_is_monitor_tcid(this_tcid) && CMPI_MON_RANK == this_rank)
    {
        void * mod_mgr_def;

        mod_mgr_def = mod_mgr_new(CMPI_ERROR_MODI, LOAD_BALANCING_LOOP);
        mod_mgr_default_init(mod_mgr_def, CMPI_ANY_TCID, CMPI_ANY_RANK);

        //mod_mgr_excl(this_tcid, CMPI_ANY_COMM, this_rank, CMPI_ANY_MODI, mod_mgr_def);

        dbg_log(SEC_0137_DEMO, 5)(LOGSTDOUT, "======================================================================\n");
        dbg_log(SEC_0137_DEMO, 5)(LOGSTDOUT, "                       mod_mgr_default_init finished                  \n");
        dbg_log(SEC_0137_DEMO, 5)(LOGSTDOUT, "======================================================================\n");
        mod_mgr_print(LOGSTDOUT, mod_mgr_def);

        //test_case_61(mod_mgr_def);
        //test_case_62(mod_mgr_def);
        //test_case_63(mod_mgr_def);
        //test_case_64(mod_mgr_def);
        //test_case_66(mod_mgr_def);
        //test_case_67(mod_mgr_def);

        mod_mgr_free(mod_mgr_def);

        do_slave_wait_default();
    }
#if 0
    /*fwd rank entrance*/
    else if (CMPI_FWD_RANK == this_rank)
    {
        dbg_log(SEC_0137_DEMO, 5)(LOGSTDOUT,"======================================================================\n");
        dbg_log(SEC_0137_DEMO, 5)(LOGSTDOUT,"                taskc_mgr in (tcid %s, rank %ld)                     \n", c_word_to_ipv4(this_tcid), this_rank);
        super_show_work_client(task_brd_default_get_super(), LOGSTDOUT);/*debug only*/
        dbg_log(SEC_0137_DEMO, 5)(LOGSTDOUT,"======================================================================\n");

        do_slave_wait_default();
    }
#endif
    /*user define the master process*/
    else if (c_ipv4_to_word("10.10.10.1") == this_tcid && 1 == this_rank)
    {
        UINT32 csolr_md_id;

        csolr_md_id = csolr_start();
        task_brd_default_start_csolr_srv(csolr_md_id, task_brd_default_get_srv_ipaddr(), 58111);

        csolr_add_mod(csolr_md_id, c_ipv4_to_word("10.10.10.1"));
        csolr_add_mod(csolr_md_id, c_ipv4_to_word("10.10.10.2"));

        do_slave_wait_default();
    }
    else if (c_ipv4_to_word("10.10.10.2") == this_tcid && 1 == this_rank)
    {
        UINT32 csolr_md_id;

        csolr_md_id = csolr_start();
        task_brd_default_start_csolr_srv(csolr_md_id, task_brd_default_get_srv_ipaddr(), 58112);

        csolr_add_mod(csolr_md_id, c_ipv4_to_word("10.10.10.1"));
        csolr_add_mod(csolr_md_id, c_ipv4_to_word("10.10.10.2"));

        do_slave_wait_default();
    }
#if 1
    /*fwd rank entrance*/
    else if (CMPI_FWD_RANK == this_rank)
    {
        dbg_log(SEC_0137_DEMO, 5)(LOGSTDOUT,"======================================================================\n");
        dbg_log(SEC_0137_DEMO, 5)(LOGSTDOUT,"                taskc_mgr in (tcid %s, rank %ld)                     \n", c_word_to_ipv4(this_tcid), this_rank);
        super_show_work_client(task_brd_default_get_super(), LOGSTDOUT);/*debug only*/
        dbg_log(SEC_0137_DEMO, 5)(LOGSTDOUT,"======================================================================\n");

        do_slave_wait_default();
    }
#endif

    /*work process*/
    else
    {
        do_slave_wait_default();
    }

    return (0);
}