Changeset 5706 in /cluster/svnroot


Ignore:
Timestamp:
May 25, 2016 11:35:08 PM (5 years ago)
Author:
skylar
Message:

first pass at MPI

Location:
bccd-ng/bw-institute/2016/day06/matmul
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • bccd-ng/bw-institute/2016/day06/matmul/Makefile

    r5703 r5706  
    22
    33CC                      = gcc
     4MPICC           = mpicc
    45CFLAGS          = -Wall
     6MPI_FLAGS       = -D_MPI
    57ifeq ($(DEBUG),1)
    68        CFLAGS  += -DDEBUG -gstabs+
     
    1113OMP_FLAGS       = -fopenmp
    1214
    13 EXPENDABLES     = serial openmp matmul-serial.o matmul-omp.o
     15EXPENDABLES     = serial openmp mpi-serial matmul-serial.o matmul-omp.o
    1416
    1517matmul-serial.o: matmul.c matmul.h
     
    2527        $(CC) $(CFLAGS) $(OMP_FLAGS) -o $@ matmul-omp.o $<
    2628
     29mpi-serial: mpi.c matmul-serial.o
     30        $(MPICC) $(CFLAGS) $(MPI_FLAGS) -o $@ matmul-serial.o $<
     31
    2732.PHONY: clean
    2833clean:
  • bccd-ng/bw-institute/2016/day06/matmul/README

    r5694 r5706  
    551. Make the serial version: make serial
    662. Make the openmp version: make openmp
     73. Make the openmp version: make mpi
    78
    89Add DEBUG=1 for debugging statements. Add PROFILE=1 for gprof output.
  • bccd-ng/bw-institute/2016/day06/matmul/matmul.h

    r5705 r5706  
    1414#include <time.h> // time(2)
    1515#include <stdbool.h> // bool
     16
     17#ifdef _OPENMP
    1618#include <omp.h>
    17 
    18 #ifndef _OPENMP
     19#else
    1920#include <sys/time.h> // gettimeofday(2)
    2021#endif
Note: See TracChangeset for help on using the changeset viewer.