index.js
/*
 * initiates the klyng app parameters and runs the app in a fiber
 * @param app_main {Function}: the entry function of the app
 */
initiates the klyng app parameters and runs the app in a fiber
@param app_main {Function}: the entry function of the app
initiates the klyng app parameters and runs the app in a fiber @param app_main { Function } : the entry function of the app
function init(app_main) {
    if(!process.send) {
        console.log("klyng apps cannot be run directly with node");
        console.log("You must run it using klyng");
        process.exit(1);
    }
    else {
        job_size = parseInt(process.argv[2]);
        process_rank = parseInt(process.argv[3]);
        process_fiber = fiber(app_main);
        process_fiber.run();
    }
}
function init ( app_main ) { if ( ! process . send ) { console . log ( "klyng apps cannot be run directly with node" ) ; console . log ( "You must run it using klyng" ) ; process . exit ( 1 ) ; } else { job_size = parseInt ( process . argv [ 2 ] ) ; process_rank = parseInt ( process . argv [ 3 ] ) ; process_fiber = fiber ( app_main ) ; process_fiber . run ( ) ; } }
initiates the klyng app parameters and runs the app in a fiber
 @param app_main {Function}: the entry function of the app
initiates the klyng app parameters and runs the app in a fiber @param app_main { Function } : the entry function of the app
// first check if the process is running as a child process with an open ipc // read the app parameters from the process arguments