Skip to content
Snippets Groups Projects
Makefile 1.64 KiB
Newer Older
  • Learn to ignore specific revisions
  • Camille Coti's avatar
    Camille Coti committed
    CXX = g++
    MPICXX = mpic++
    LD = g++
    MPILD = mpic++
    
    
    ifeq ($(TAU),1)
    	TAUDIR = $(HOME)/logiciels/tau-2.29/x86_64
    	TAUOPT = -DTAUPROF -I$(TAUDIR)/../include
    	TAULIB = -L$(TAUDIR)/lib -lTAU
    
    	MPICXX = tau_cxx.sh
    	CXX = tau_cxx.sh
    	LD = tau_cxx.sh
    	MPILD = tau_cxx.sh
    #	export TAU_MAKEFILE=$(TAUDIR)/lib/Makefile.tau-papi-mpi-pdt-openmp
    else
    	TAUOPT =
    	TAULIB =
    endif
    
    
    Camille Coti's avatar
    Camille Coti committed
    CFLAGS = -Wall -g -O3  -Wno-unused-variable -std=c++17 $(TAUOPT) -DSCATTERGATHER
    LDOPT =  -lmpfr -lgmp -lpthread -pthread -lobake -lmp++ -ltbb -labsl_hashtablez_sampler -labsl_hash -labsl_city -labsl_synchronization -labsl_exponential_biased -labsl_base -labsl_raw_logging_internal -labsl_spinlock_wait -labsl_symbolize -labsl_graphcycles_internal -labsl_debugging_internal -labsl_malloc_internal -labsl_demangle_internal -labsl_time -labsl_int128 -labsl_time_zone -labsl_stacktrace -labsl_debugging_internal -labsl_raw_hash_set -labsl_dynamic_annotations $(TAULIB)
    
    Camille Coti's avatar
    Camille Coti committed
    
    MPIEXEC = mpiexec
    
    Camille Coti's avatar
    Camille Coti committed
    MPISRC = sequential.cpp  tensormatrix_mpi.cpp perf.cpp utils.cpp \
    	masterworker.cpp utils_parall.cpp 
    #mw_addslave.cpp hierarchical.cpp  \
    #         perf.cpp  sequential.cpp  tensormatrix_mpi.cpp      \
    #        profiling.cpp mw_combined.cpp \
    #	 masterworker2.cpp mw_addslave2.cpp hierarchical2.cpp  \
    #	 masterworker3.cpp mw_addslave3.cpp mw_addslave4.cpp \
    #	 mw_tree.cpp
    
    Camille Coti's avatar
    Camille Coti committed
    MPIOBJ= $(MPISRC:.cpp=.o)
    
    
    
    Camille Coti's avatar
    Camille Coti committed
    all: tensormatrix_mpi
    
    
    Camille Coti's avatar
    Camille Coti committed
    tensormatrix_mpi: $(MPIOBJ)
    
    Camille Coti's avatar
    Camille Coti committed
    	$(MPILD)  -o $@ $^ $(LDOPT)
    
    
    tensormatrix: tensormatrix.o
    	$(LD) -o $@ $^ $(LDOPT)
    
    
    Camille Coti's avatar
    Camille Coti committed
    %.o: %.cpp
    	$(MPICXX) $(CFLAGS) -o $@ -c $<
    
    run: tensormatrix_mpi
    
    Camille Coti's avatar
    Camille Coti committed
    	$(MPIEXEC) --oversubscribe -n $(NP) $<
    
    Camille Coti's avatar
    Camille Coti committed
    
    clean:
    	@rm -f *.o tensormatrix_mpi tensormatrix
    
    .PHONY: clean run