oshmpi icon indicating copy to clipboard operation
oshmpi copied to clipboard

shmem_ctx_putmem() spits assertion fail error

Open ShunyuYao515 opened this issue 4 years ago • 0 comments

I am doing a simple code test on oshmpi using shmem_ctx_putmem(), it keeps giving me this error:

OSHMPI assert fail in [./src/internal/rma_impl.h:140]: "sobj_attr && ictx" Abort(-1)` on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, -1) - process 0

And the code I am using:

    int main(void){
            int total_pe;
            struct utsname node;
            int this_pe;
            int ctx_crt_ret;
            shmem_ctx_t ctx;
            int *source, *dest;
            shmem_init();
            total_pe = shmem_n_pes();
            this_pe = shmem_my_pe();
            ctx_crt_ret = shmem_ctx_create(SHMEM_CTX_PRIVATE, &ctx);
            uname(&node);
            shmem_barrier_all();

            source = shmem_malloc(sizeof(int)*256*1024);
            dest = shmem_malloc(sizeof(int)*256*1024);
            if(this_pe==0){
                    for(int i=0; i<256*1024; i++){
                            source[i]=i+1;
                    }
            }

            if (this_pe==0){
                    shmem_ctx_putmem(ctx, dest, source, 4, 1);
            }
            shmem_free(source);
            shmem_free(dest);

            shmem_barrier_all();

        shmem_ctx_destroy(ctx);
        shmem_finalize();

        return 0;

    }

It is replicable on multiple environment.

ShunyuYao515 avatar Jul 07 '21 17:07 ShunyuYao515