From 2ea1e08d12017ac850b3555c17e99d48538e0142 Mon Sep 17 00:00:00 2001 From: JordanHanotiaux <103147288+JordanHanotiaux@users.noreply.github.com> Date: Sun, 13 Apr 2025 09:05:32 +0200 Subject: [PATCH] Update Makefile --- P2/Makefile | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/P2/Makefile b/P2/Makefile index 20bb0c2..d4eb10e 100644 --- a/P2/Makefile +++ b/P2/Makefile @@ -1,18 +1,14 @@ CXX = mpic++ -CXXFLAGS = -std=c++17 -Wall -Wextra -O0 -g +CXXFLAGS = -std=c++17 -Wall -Wextra -O0 TARGET = distributedtests OBJ = matrix.o distributedmatrix.o distributedtests.o mlp_sgd_distributed.o globals.o HEADERS = abstractmatrix.hpp matrix.hpp distributedmatrix.hpp globals.hpp -NVTX_INC = -I/usr/local/cuda/include -NVTX_LIB = -L/usr/local/cuda/lib64 -lnvToolsExt -# Cible par défaut all: $(MAKE) clean && $(MAKE) run -# Cible pour la compilation $(TARGET): $(OBJ) - $(CXX) $(CXXFLAGS) $(NVTX_LIB) -o $(TARGET) $(OBJ) + $(CXX) $(CXXFLAGS) -o $(TARGET) $(OBJ) matrix.o: matrix.cpp matrix.hpp abstractmatrix.hpp $(CXX) $(CXXFLAGS) -c matrix.cpp @@ -29,16 +25,10 @@ mlp_sgd_distributed.o: mlp_sgd_distributed.cpp globals.hpp abstractmatrix.hpp ma globals.o: globals.cpp globals.hpp mlp_sgd_distributed.cpp $(CXX) $(CXXFLAGS) -c globals.cpp -# Cible pour l'exécution classique run: $(TARGET) mpirun -np 4 ./$(TARGET) -# Cible pour profiler avec nsys -profile: $(TARGET) - nsys profile --trace=mpi,cuda,nvtx,osrt --output=profile_mpi_computation mpirun -np 4 ./$(TARGET) - -# Nettoyer les fichiers objets et le binaire clean: rm -f $(OBJ) $(TARGET) -.PHONY: all run clean profile +.PHONY: all run clean \ No newline at end of file -- GitLab