=head1 NAME

  CFX5::Parallel::Reqs::ibmmpi_maxpart - Check for supported maximum number of partitions

This prerequisite performs a check required for IBM MPI
parallel where the maximum supported number of partitions is currently 4096.
A warning is printed if more partitions are requested.

=cut

package CFX5::Parallel::Reqs::ibmmpi_maxpart;

use CFX5::Parallel::Reqs::Base;
push @ISA, qw(CFX5::Parallel::Reqs::Base);

use CFX5::Output qw(:all);

use strict;

sub setup {
  my $self=shift;

  if ($self->ppe()->partitions() > 4096) {
    _warn("The IBM MPI software included with ANSYS products allows for a maximum of 4096 processes to be included in a single parallel calculation. You will need to obtain an additional license from International Business Machines Corp. (IBM) for higher process counts. Alternatively, you can use a different MPI for your parallel calculation.");
  }
  1;
}

1;
