On success, S3L_set_process_grid returns S3L_SUCCESS.
S3L_set_process_grid performs generic checking of the validity of the arrays it accepts as arguments. If an array argument contains an invalid or corrupted value, the function terminates and an error code indicating which value of the array handle was invalid is returned. See Appendix A of this manual for a detailed list of these error codes.
In addition, the following conditions will cause the function to terminate and return the associated error code.
S3L_ERR_ARG_RANK - Invalid rank.
S3L_ERR_ARG_MAJOR - Invalid majorness.
S3L_ERR_PGRID_EXTENTS - Grid size (calculated as product of process grid extents) is less than 1.
S3L_ERR_ARRTOOSMALL - plist_length is greater than 0 but less than the size of the grid (calculated from the product of process grid extents).
S3L_ERR_ARG_NULL - In a C/C++ program, plist_length is greater than 0 but process_list is a NULL pointer.