Fast parallel calculation of the rank of matrices over a field of arbitrary characteristic