int main(int argc, char* argv[]) { // Initialize the runtime chpl_rt_init(argc, argv); // Run the main function for this node. chpl_task_callMain(chpl_executable_init); // have everyone exit, returning the value returned by the user written main // or 0 if it didn't return anything chpl_rt_finalize(chpl_gen_main_arg.return_value); return 0; // should never get here }
// // A wrapper around chpl-init.c:chpl_rt_finalize(...), sole purpose is // to provide a "chpl_library_*" interface for the Chapel "library-user". void chpl_library_finalize(void) { chpl_rt_finalize(0); }