String baseFilename = args[0];
int nShards = Integer.parseInt(args[1]);
String fileType = (args.length >= 3 ? args[2] : null);
/* Create shards */
FastSharder sharder = createSharder(baseFilename, nShards);
sharder.setAllowSparseDegreesAndVertexData(false);
if (baseFilename.equals("pipein")) { // Allow piping graph in
sharder.shard(System.in);
} else {
sharder.shard(new FileInputStream(new File(baseFilename)), fileType);
}
/* Run engine */
GraphChiEngine<Integer, Integer> engine = new GraphChiEngine<Integer, Integer>(baseFilename, nShards);
engine.setEdataConverter(new IntConverter());