r"""1"""2#*****************************************************************************3# Copyright (C) 2016 Paul Leopardi [email protected]4#5# Distributed under the terms of the GNU General Public License (GPL)6# as published by the Free Software Foundation; either version 2 of7# the License, or (at your option) any later version.8# http://www.gnu.org/licenses/9#*****************************************************************************1011import sys1213from mpi4py import MPI14from sage.all_cmdline import *1516from boolean_cayley_graphs.classify_in_mpi_parallel import save_class_parts_in_parallel1718r"""19"""20# Check that the correct number arguments exist.21if len(sys.argv) != 4:22print("Usage: save_dim_in_mpi_parallel dim fnbr c_len")23sys.exit(1)2425# Convert the arguments to int.26dim = int(sys.argv[1])27fnbr = int(sys.argv[2])28c_len = int(sys.argv[3])2930# Get our MPI rank.31comm = MPI.COMM_WORLD32rank = comm.Get_rank()3334# Load the required bent function.35load("bent_function_extended_affine_representative_polynomials.sage")36list_of_f = bent_function_extended_affine_representative_polynomials(dim)37bentf = list_of_f[fnbr]3839# Save the classification in parts with c_len matrix rows each.40save_class_parts_in_parallel(comm, "p"+str(dim)+"_"+str(fnbr)+"_test", bentf, c_len=c_len)41sys.exit(0)42434445