bug in chunk assignment for shmem fixed. local_shmem is of correct type.