Changeset 5715 in /cluster/svnroot


Ignore:
Timestamp:
May 26, 2016 9:15:50 PM (5 years ago)
Author:
skylar
Message:

free destination matrix on first rank

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bccd-ng/bw-institute/2016/day06/matmul/mpi.c

    r5714 r5715  
    7676        // Allocate full destination matrix on first rank
    7777        // Will be populated via MPI_Gather
    78         dst_m.rows = m1.rows;
    79         dst_m.cols = m2.cols;
     78        dst_m.rows      = m1.rows;
     79        dst_m.cols      = m2.cols;
    8080        dst_m.matrix    = safe_malloc_int(
    8181                dst_m.rows*dst_m.cols,
     
    154154    free(m2.matrix);
    155155    free(local_dst_m.matrix);
     156    if(rank == FIRST_RANK) {
     157        free(dst_m.matrix);
     158    }
    156159
    157160    exit(EXIT_SUCCESS);
Note: See TracChangeset for help on using the changeset viewer.