cast pointer to avoid compiler warnings
set next_proc to NULL with just one rank, and abort req for work early