Esempio n. 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;
}
Esempio n. 2
0
extern int run_old(int argc, char **argv)
{
	int cc;

	profile_init_old();

	switch (params.mode) {
		case SH5UTIL_MODE_MERGE:
			cc = _merge_step_files();
			break;
		case SH5UTIL_MODE_EXTRACT:
			cc = _extract_data();
			break;
		case SH5UTIL_MODE_ITEM_EXTRACT:
			cc = _series_data();
			break;
		case SH5UTIL_MODE_ITEM_LIST:
			cc = SLURM_ERROR;
			break;
		default:
			error("Unknown type %d", params.mode);
			break;
	}

	profile_fini_old();

	return cc;
}