Skip to content
Extraits de code Groupes Projets
Valider 2ea1e08d rédigé par JordanHanotiaux's avatar JordanHanotiaux
Parcourir les fichiers

Update Makefile

parent 4a0c0b91
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
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
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter