Пример #1
0
int main (int argc, char **argv)
{
	if (argc <= 1) {
		_help_msg();
		exit(0);
	}
	_set_options(argc, argv);

	profile_init();
	switch (params.mode) {
	case SH5UTIL_MODE_MERGE:
		info("Merging node-step files into %s",
		     params.output);
		_merge_step_files();
		break;
	case SH5UTIL_MODE_EXTRACT:
		info("Extracting job data from %s into %s\n",
		     params.input, params.output);
		_extract_data();
		break;
	default:
		error("Unknown type %d", params.mode);
		break;
	}
	profile_fini();
	xfree(params.dir);
	xfree(params.node);
	return 0;
}
Пример #2
0
extern int acct_gather_profile_p_node_step_end(void)
{
	int rc = SLURM_SUCCESS;
	size_t i;

	xassert(_run_in_daemon());

	xassert(g_profile_running != ACCT_GATHER_PROFILE_NOT_SET);

	// No check for --profile as we always want to close the HDF5 file
	// if it has been opened.


	if (g_profile_running <= ACCT_GATHER_PROFILE_NONE)
		return rc;

	if (debug_flags & DEBUG_FLAG_PROFILE)
		info("PROFILE: node_step_end (shutdown)");

	/* close tables */
	for (i = 0; i < tables_cur_len; ++i) {
		H5PTclose(tables[i].table_id);
	}
	/* close groups */
	for (i = 0; i < groups_len; ++i) {
		H5Gclose(groups[i]);
	}

	if (gid_totals > 0)
		H5Gclose(gid_totals);
	if (gid_samples > 0)
		H5Gclose(gid_samples);
	if (gid_tasks > 0)
		H5Gclose(gid_tasks);
	if (gid_node > 0)
		H5Gclose(gid_node);
	if (file_id > 0)
		H5Fclose(file_id);
	profile_fini();
	file_id = -1;

	return rc;
}
Пример #3
0
static void
dfs_destroy(void *arg)
{
        LOG(LOG_DEBUG, "%p", arg);

        profile_fini();

        if (hash) {
                LOG(LOG_DEBUG, "removing cache files");
                g_hash_table_foreach(hash, cb_hash_unlink, NULL);
                LOG(LOG_DEBUG, "releasing hashtable memory");
                g_hash_table_remove_all(hash);
        }

        if (conf) {
                LOG(LOG_DEBUG, "releasing config memory");
                conf_free(conf);
        }

        LOG(LOG_DEBUG, "freeing libdroplet context");
	dpl_free();

}
Пример #4
0
extern int acct_gather_profile_p_node_step_end()
{
	int rc = SLURM_SUCCESS;

	xassert(_run_in_daemon());

	if (g_job->stepid == NO_VAL)
		return rc;

	xassert(g_profile_running != ACCT_GATHER_PROFILE_NOT_SET);

	// No check for --profile as we always want to close the HDF5 file
	// if it has been opened.


	if (g_profile_running <= ACCT_GATHER_PROFILE_NONE)
		return rc;

	if (debug_flags & DEBUG_FLAG_PROFILE)
		info("PROFILE: node_step_end (shutdown)");

	if (gid_totals > 0)
		H5Gclose(gid_totals);
	if (gid_samples > 0)
		H5Gclose(gid_samples);
	if (gid_tasks > 0)
		H5Gclose(gid_tasks);
	if (gid_node > 0)
		H5Gclose(gid_node);
	if (file_id > 0)
		H5Fclose(file_id);
	profile_fini();
	file_id = -1;

	return rc;
}