Commit 05131486 authored by iker_martin's avatar iker_martin
Browse files

Ya se puede instalar especificamente con slurm con make install_slurm

parent 8ca50713
#Ignore ini files #Ignore ini files
*.ini *.ini
#Ignore build files
/Codes/build/
...@@ -2,9 +2,11 @@ CC = gcc ...@@ -2,9 +2,11 @@ CC = gcc
MCC = mpicc MCC = mpicc
C_FLAGS_ALL = -Wfatal-errors -Wall -Wextra -Wpedantic -Wconversion -Wshadow C_FLAGS_ALL = -Wfatal-errors -Wall -Wextra -Wpedantic -Wconversion -Wshadow
C_FLAGS = -Wall C_FLAGS = -Wall
LD_FLAGS = -lm -lslurm -pthread LD_FLAGS = -lm -pthread
DEF =
.PHONY : clean clear
.PHONY : clean clear install install_slurm
# Final binary # Final binary
BIN = a.out BIN = a.out
...@@ -40,12 +42,18 @@ $(BUILD_DIR)/$(BIN) : $(OBJ) ...@@ -40,12 +42,18 @@ $(BUILD_DIR)/$(BIN) : $(OBJ)
# the same name as the .o file. # the same name as the .o file.
$(BUILD_DIR)/%.o : %.c $(BUILD_DIR)/%.o : %.c
mkdir -p $(@D) mkdir -p $(@D)
$(MCC) $(C_FLAGS_ALL) -MMD -c $< -o $@ $(MCC) $(C_FLAGS_ALL) $(DEF) -MMD -c $< -o $@
clean: clean:
-rm $(BUILD_DIR)/$(BIN) $(OBJ) $(DEP) -rm $(BUILD_DIR)/$(BIN) $(OBJ) $(DEP)
clear: clear:
-rm -rf $(BUILDDIR) -rm -rf $(BUILDDIR)
install:
install: $(BIN)
echo "Done"
# Builds target with slurm
install_slurm: LD_FLAGS += -lslurm
install_slurm: DEF += -DUSE_SLURM
install_slurm: install
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <mpi.h> #include <mpi.h>
#include "ProcessDist.h" #include "ProcessDist.h"
#define USE_SLURM //#define USE_SLURM
//--------------PRIVATE DECLARATIONS---------------// //--------------PRIVATE DECLARATIONS---------------//
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment