Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Iker Martín Álvarez
Proteo
Commits
67e9186e
Commit
67e9186e
authored
Oct 07, 2022
by
iker_martin
Browse files
Modificado los Makefile. Ahora funciona correctamente
parent
45b5c571
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Codes/IOcodes/Makefile
deleted
100644 → 0
View file @
45b5c571
objects
:=
ini.o read_ini.o results.o
DISTRI_LOC
=
$(TOP)
/malleability/distribution_methods/block_distribution.h
CC
:=
gcc
MCC
:=
mpicc
CFLAGS
:=
-Wall
-Wextra
all
:
$(objects)
ini.o
:
ini.c ini.h
echo
$(BUILDDIR)
$(CC)
$(CFLAGS)
-c
-o
$(BUILDDIR)
/
$@
$<
read_ini.o
:
read_ini.c read_ini.h ini.h $(DISTRI_LOC)
$(MCC)
$(CFLAGS)
-c
-o
$(BUILDDIR)
/
$@
$<
results.o
:
results.c results.h
$(MCC)
$(CFLAGS)
-c
-o
$(BUILDDIR)
/
$@
$<
#$@ --> Objeto
#$< --> Source
Codes/Main/Makefile
deleted
100644 → 0
View file @
45b5c571
objects1
:=
computing_func comunication_func linear_reg
objects2
:=
process_stage
objects3
:=
Main
#Pasar nombre a level -- Los objects/headers/source añadir sufijo
DISTRI_LOC
=
$(TOP)
/malleability/distribution_methods/block_distribution.h
MALLEABILITY_DEPENDS
=
$(TOP)
/malleability/CommDist.h
$(TOP)
/malleability/malleabilityStates.h
$(TOP)
/malleability/malleabilityManager.h
DEPENDS
:=
Main_datatypes.h
CC
:=
gcc
MCC
:=
mpicc
CFLAGS
:=
-Wall
-Wextra
all
:
$(objects1) $(objects2) $(objects3)
$(objects1)
:
%: %.c %.h $(DEPENDS)
$(MCC)
$(CFLAGS)
-c
-o
$(BUILDDIR)
/
$@
.o
$<
$(objects2)
:
%: %.c %.h $(objects1).h $(DEPENDS) $(DISTRI_LOC)
$(MCC)
$(CFLAGS)
-c
-o
$(BUILDDIR)
/
$@
.o
$<
$(objects3)
:
%: %.c $(objects2).h $(DEPENDS) $(TOP)/IOcodes/read_ini.h $(TOP)/IOcodes/results.h $(MALLEABILITY_DEPENDS)
$(MCC)
$(CFLAGS)
-c
-o
$(BUILDDIR)
/
$@
.o
$<
Codes/Makefile
View file @
67e9186e
export
TOP
:=
$(
dir
$(CURDIR)
/
$(
word
$(
words
$(MAKEFILE_LIST)
)
,
$(MAKEFILE_LIST)
))
CC
=
gcc
BUILD
:=
build
MCC
=
mpicc
EXEC
:=
exec
C_FLAGS_ALL
=
-Wfatal-errors
-Wall
-Wextra
-Wpedantic
-Wconversion
-Wshadow
C_FLAGS
=
-Wall
EXECDIR
:=
$(
addprefix
$(TOP)
,
$(EXEC)
)
LD_FLAGS
=
-lm
-lslurm
-pthread
export
BUILDDIR
=
$(
addprefix
$(TOP)
,
$(BUILD)
)
SUBDIRS
:=
IOcodes Main malleability
.PHONY
:
clean clear
.PHONY
:
subdirs $(SUBDIRS) build all clean clear
# Final binary
#
BIN
=
a.out
#
# Put all auto generated stuff to this build dir.
#
BUILD_DIR
=
./build
#
CC
:=
gcc
# List of all directories where source files are located
MCC
:=
mpicc
SRCDIRS
=
IOcodes Main malleability malleability/spawn_methods malleability/distribution_methods
CFLAGS
:=
-Wall
-Wextra
LIBFLAGS
:=
-lm
-lslurm
-pthread
# List of all .c source files.
#
C_FILES
=
$(
foreach
dire,
$(SRCDIRS)
,
$(
wildcard
$(dire)
/
*
.c
))
#
#
# All .o files go to build dir.
#
OBJ
=
$
(
C_FILES:%.c
=
$(BUILD_DIR)
/%.o
)
# Gcc will create these .d files containing dependencies.
all
:
subdirs exec
DEP
=
$(OBJ:%.o=%.d)
install
:
#runTests
# Default target named after the binary.
$(BIN)
:
$(BUILD_DIR)/$(BIN)
exec
:
subdirs
mkdir
-p
$(EXECDIR)
all
# Actual target of the binary - depends on all .o files.
$(MCC)
$(CFLAGS)
-o
$(EXECDIR)
/a.out
$(
wildcard
$(BUILDDIR)
/
*
.o
)
$(LIBFLAGS)
$(BUILD_DIR)/$(BIN)
:
$(OBJ)
$(MCC)
$(C_FLAGS)
$^
-o
$@
$(LD_FLAGS)
subdirs
:
$(SUBDIRS)
$(SUBDIRS)
:
| $(BUILD)
# Include all .d files
$(MAKE)
-C
$@
# .d files are used for knowing the dependencies of each source file
-include
$(DEP)
# Carpeta en la que almacenar los compilados y los ejecutables
# Build target for every single object file.
$(BUILD)
:
# The potential dependency on header files is covered
mkdir
-p
$(BUILDDIR)
# by calling `-include $(DEP)`.
# The -MMD flags additionaly creates a .d file with
# the same name as the .o file.
$(BUILD_DIR)/%.o
:
%.c
mkdir
-p
$
(
@D
)
$(MCC)
$(C_FLAGS)
-MMD
-c
$<
-o
$@
clean
:
clean
:
-
rm
$(BUILDDIR)
/
*
.o
-
rm
$(BUILD
_
DIR)
/
$(BIN)
$(OBJ)
$(DEP)
clear
:
clear
:
-
rm
-rf
$(BUILDDIR)
-
rm
-rf
$(BUILDDIR)
-
rm
-rf
$(EXECDIR)
install
:
Codes/malleability/Makefile
deleted
100644 → 0
View file @
45b5c571
dir_targets
:=
distribution_methods
objects1
:=
CommDist
objects2
:=
malleabilityTypes ProcessDist
objects3
:=
malleabilityZombies
objects4
:=
malleabilityManager
DEPENDS
:=
$(
addsuffix
.h, malleabilityDataStructures malleabilityStates
)
CC
:=
gcc
MCC
:=
mpicc
CFLAGS
:=
-Wall
-Wextra
.PHONY
:
$(dir_targets) subdir
all
:
subdir $(objects1) $(objects2) $(objects3) $(objects4)
subdir
:
$(dir_targets)
$(dir_targets)
:
%:
$(MAKE)
-C
$@
$(objects1)
:
%: %.c %.h $(DEPENDS) $(dir_targets)/block_distribution.h
$(MCC)
$(CFLAGS)
-c
-o
$(BUILDDIR)
/
$@
.o
$<
$(objects2)
:
%: %.c %.h $(DEPENDS)
$(MCC)
$(CFLAGS)
-c
-o
$(BUILDDIR)
/
$@
.o
$<
$(objects3)
:
%: %.c %.h $(DEPENDS) $(TOP)/IOcodes/results.h
$(MCC)
$(CFLAGS)
-c
-o
$(BUILDDIR)
/
$@
.o
$<
$(objects4)
:
%: %.c %.h $(objects1).h $(objects2).h $(objects3).h $(DEPENDS)
\
$(TOP)/IOcodes/read_ini.h $(TOP)/IOcodes/results.h $(TOP)/Main/Main_datatypes.h
$(MCC)
$(CFLAGS)
-c
-o
$(BUILDDIR)
/
$@
.o
$<
Codes/malleability/ProcessDist.c
deleted
100644 → 0
View file @
45b5c571
This diff is collapsed.
Click to expand it.
Codes/malleability/ProcessDist.h
deleted
100644 → 0
View file @
45b5c571
#ifndef PROCESS_DIST_H
#define PROCESS_DIST_H
#include <stdio.h>
#include <stdlib.h>
#include <mpi.h>
#include <string.h>
#include <slurm/slurm.h>
#include "malleabilityStates.h"
int
init_slurm_comm
(
char
*
argv
,
int
num_cpus
,
int
num_nodes
,
char
*
nodelist
,
int
myId
,
int
numP
,
int
numC
,
int
root
,
int
type_dist
,
int
type_creation
,
int
spawn_is_single
,
MPI_Comm
comm
,
MPI_Comm
*
child
);
int
check_slurm_comm
(
int
myId
,
int
root
,
int
numP
,
MPI_Comm
*
child
,
MPI_Comm
comm
,
MPI_Comm
comm_thread
,
double
*
end_real_time
);
void
malleability_establish_connection
(
int
myId
,
int
root
,
MPI_Comm
*
intercomm
);
void
proc_adapt_expand
(
int
*
numP
,
int
numC
,
MPI_Comm
intercomm
,
MPI_Comm
*
comm
,
int
is_children_group
);
void
proc_adapt_shrink
(
int
numC
,
MPI_Comm
*
comm
,
int
myId
);
#endif
Codes/malleability/distribution_methods/Makefile
deleted
100644 → 0
View file @
45b5c571
objects1
:=
block_distribution
CC
:=
gcc
MCC
:=
mpicc
CFLAGS
:=
-Wall
-Wextra
all
:
$(objects1)
$(objects1)
:
%: %.c %.h
$(MCC)
$(CFLAGS)
-c
-o
$(BUILDDIR)
/
$@
.o
$<
Codes/malleability/spawn_methods/Makefile
deleted
100644 → 0
View file @
45b5c571
objects1
:=
ProcessDist
objects2
:=
Spawn_state
objects3
:=
Baseline
objects4
:=
Merge
objects5
:=
GenericSpawn
CC
:=
gcc
MCC
:=
mpicc
CFLAGS
:=
-Wall
all
:
$(objects1) $(objects2) $(objects3) $(objects4) $(objects5)
$(objects1)
:
%: %.c %.h
$(MCC)
$(CFLAGS)
-c
-o
$(BUILDDIR)
/
$@
.o
$<
$(objects2)
:
%: %.c %.h
$(CC)
$(CFLAGS)
-c
-o
$(BUILDDIR)
/
$@
.o
$<
$(objects3)
:
%: %.c %.h $(objects2).h
$(MCC)
$(CFLAGS)
-c
-o
$(BUILDDIR)
/
$@
.o
$<
$(objects4)
:
%: %.c %.h $(objects3).h
$(MCC)
$(CFLAGS)
-c
-o
$(BUILDDIR)
/
$@
.o
$<
$(objects5)
:
%: %.c %.h $(objects1).h $(objects2).h $(objects3).h $(objects4).h
$(MCC)
$(CFLAGS)
-c
-o
$(BUILDDIR)
/
$@
.o
$<
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment