-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add old build #72
Merged
Merged
Add old build #72
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d3363c1
WIP
addman2 733998b
WIP
addman2 dc04321
WIP
addman2 501d91d
Merge branch 'devel' of github.com:sissaschool/turborvb into add_old_…
addman2 45f47b6
Change some things in Makefiles
addman2 ba6a751
WIP
addman2 fd55c00
old build with aggressive/pasive flags now work
addman2 b93e20a
Merge remote-tracking branch 'origin/devel' into add_old_build
addman2 22d0bec
Parallel version works as well
addman2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
include make.inc | ||
|
||
all: | ||
make -C src/m_pfapack -f Makefile | ||
make -C src/m_common -f Makefile | ||
make -C src/d_qlapack -f Makefile | ||
make -C src/c_adjoint_forward -f Makefile | ||
make -C src/c_adjoint_backward -f Makefile | ||
make -C src/b_complex -f Makefile | ||
make -C src/a_turborvb -f Makefile | ||
|
||
clean: | ||
rm -rf $(BUILD_DIR) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# Load settings | ||
|
||
include ../../make.inc | ||
|
||
# Variables | ||
|
||
SRC_DIR := . | ||
MAIN_BUILD_DIR := $(BUILD_DIR)/main | ||
MODULE_DIR := $(BUILD_DIR)/modules | ||
TARGET := $(BUILD_DIR)/turborvb.x | ||
TARGET_NAME := $(BUILD_DIR)/turborvb$(SUFFIX).x | ||
TARGET_MODULES := $(BUILD_DIR)/adjoint_forward_module.a | ||
|
||
# File Lists | ||
# | ||
# First set modules: | ||
|
||
MODULE_SRCS := $(SRC_DIR)/scal_lins.f90 | ||
|
||
MODULE_OBJS := $(MODULE_SRCS:%=$(MAIN_BUILD_DIR)/%.o) | ||
MODULE_MODS := $(MODULE_SRCS:%=$(BUILD_DIR)/%.mod) | ||
|
||
# Set rest files | ||
SRCS := $(wildcard $(SRC_DIR)/*.f90) | ||
SRCS += $(wildcard $(SRC_DIR)/*.c) | ||
SRCS := $(filter-out $(MODULE_SRCS), $(SRCS)) | ||
OBJS := $(SRCS:%=$(MAIN_BUILD_DIR)/%.o) | ||
|
||
# Default rule | ||
all: dirs $(TARGET) | ||
|
||
# Rule for making the build directory | ||
dirs: | ||
mkdir -p $(MAIN_BUILD_DIR) | ||
mkdir -p $(MODULE_DIR) | ||
echo $(MODULE_OBJS) | ||
|
||
# Compile modules | ||
$(MAIN_BUILD_DIR)/%.f90.o: %.f90 | ||
$(FC) $(FCFLAGS) -J $(MODULE_DIR) -I $(MODULE_DIR) -c $< -o $@ | ||
|
||
# Common module | ||
$(TARGET_MODULES): $(MODULE_OBJS) | ||
$(AR) $(ARFLAGS) $(TARGET_MODULES) $(MODULE_OBJS) | ||
|
||
# Rule for making the target | ||
$(TARGET): $(TARGET_MODULES) $(OBJS) | ||
$(FC) $(FLINK) \ | ||
$(OBJS) \ | ||
$(MODULE_OBJS) \ | ||
$(BUILD_DIR)/complex.a \ | ||
$(BUILD_DIR)/complex_module.a \ | ||
$(BUILD_DIR)/adjoint_forward.a \ | ||
$(BUILD_DIR)/adjoint_forward_module.a \ | ||
$(BUILD_DIR)/adjoint_backward.a \ | ||
$(BUILD_DIR)/qlapack.a \ | ||
$(BUILD_DIR)/common.a \ | ||
$(BUILD_DIR)/common_module.a \ | ||
$(BUILD_DIR)/pfapack.a \ | ||
$(BUILD_DIR)/complex.a \ | ||
$(BUILD_DIR)/complex_module.a \ | ||
$(BUILD_DIR)/adjoint_forward.a \ | ||
$(BUILD_DIR)/adjoint_forward_module.a \ | ||
$(BUILD_DIR)/adjoint_backward.a \ | ||
$(BUILD_DIR)/qlapack.a \ | ||
$(BUILD_DIR)/common.a \ | ||
$(BUILD_DIR)/common_module.a \ | ||
$(BUILD_DIR)/pfapack.a \ | ||
-J $(MODULE_DIR) \ | ||
$(LINK_LIBS) \ | ||
-o $(TARGET) | ||
|
||
################################################################################ | ||
|
||
# Generic rule for compiling Fortran files | ||
$(MAIN_BUILD_DIR)/%.f90.o: %.f90 | ||
$(FC) $(FCFLAGS) \ | ||
$(MODULE_STORE) $(MODULE_DIR) \ | ||
-c $< -o $@ \ | ||
$(MODULE_INCLUDE) $(MODULE_DIR) | ||
|
||
# Generic rule for compiling C files | ||
$(MAIN_BUILD_DIR)/%.c.o: %.c | ||
$(CC) $(CFLAGS) -c $< -o $(SUFFIX) | ||
|
||
# Cleaning everything | ||
clean: | ||
rm -rf $(BUILD_DIR) | ||
|
||
.PHONY: all dirs clean | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Load settings | ||
|
||
include ../../make.inc | ||
|
||
# Variables | ||
|
||
SRC_DIR := . | ||
ADJOINT_BACKWARD_BUILD_DIR := $(BUILD_DIR)/adjoint_backward | ||
MODULE_DIR := $(BUILD_DIR)/modules | ||
TARGET := $(BUILD_DIR)/adjoint_backward.a | ||
|
||
# File Lists | ||
# | ||
# First set modules: | ||
|
||
# Set rest files | ||
SRCS := $(wildcard $(SRC_DIR)/*.f90) | ||
OBJS := $(SRCS:%=$(ADJOINT_BACKWARD_BUILD_DIR)/%.o) | ||
|
||
# Default rule | ||
all: dirs $(TARGET) | ||
|
||
# Rule for making the build directory | ||
dirs: | ||
mkdir -p $(ADJOINT_BACKWARD_BUILD_DIR) | ||
mkdir -p $(MODULE_DIR) | ||
echo $(MODULE_OBJ) | ||
|
||
# Rule for making the target | ||
$(TARGET): $(TARGET_MODULES) $(OBJS) | ||
$(AR) $(ARFLAGS) $(TARGET) $(OBJS) $(TARGET_MODULES) | ||
|
||
# Generic rule for compiling Fortran files | ||
$(ADJOINT_BACKWARD_BUILD_DIR)/%.f90.o: %.f90 | ||
$(FC) $(FCFLAGS) \ | ||
$(MODULE_STORE) $(MODULE_DIR) \ | ||
$(MODULE_INCLUDE) $(MODULE_DIR) \ | ||
-c $< -o $@ | ||
|
||
# Generic rule for compiling C files | ||
$(ADJOINT_BACKWARD_BUILD_DIR)/%.c.o: %.c | ||
$(CC) $(CFLAGS) -c $< -o $@ | ||
|
||
# Cleaning everything | ||
clean: | ||
rm -rf $(BUILD_DIR) | ||
|
||
.PHONY: all dirs clean | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Load settings | ||
|
||
include ../../make.inc | ||
|
||
# Variables | ||
|
||
SRC_DIR := . | ||
ADJOINT_FORWARD_BUILD_DIR := $(BUILD_DIR)/adjoint_forward | ||
MODULE_DIR := $(BUILD_DIR)/modules | ||
TARGET := $(BUILD_DIR)/adjoint_forward.a | ||
TARGET_MODULES := $(BUILD_DIR)/adjoint_forward_module.a | ||
|
||
# File Lists | ||
# | ||
# First set modules: | ||
|
||
MODULE_SRCS := $(SRC_DIR)/dspev_drv.f90 | ||
|
||
MODULE_OBJS := $(MODULE_SRCS:%=$(ADJOINT_FORWARD_BUILD_DIR)/%.o) | ||
MODULE_MODS := $(MODULE_SRCS:%=$(BUILD_DIR)/%.mod) | ||
|
||
# Set rest files | ||
SRCS := $(wildcard $(SRC_DIR)/*.f90) | ||
SRCS += $(wildcard $(SRC_DIR)/*.c) | ||
SRCS := $(filter-out $(MODULE_SRCS), $(SRCS)) | ||
OBJS := $(SRCS:%=$(ADJOINT_FORWARD_BUILD_DIR)/%.o) | ||
|
||
# Default rule | ||
all: dirs $(TARGET) | ||
|
||
# Rule for making the build directory | ||
dirs: | ||
mkdir -p $(ADJOINT_FORWARD_BUILD_DIR) | ||
mkdir -p $(MODULE_DIR) | ||
echo $(MODULE_OBJ) | ||
|
||
# Compile modules | ||
$(ADJOINT_FORWARD_BUILD_DIR)/%.f90.o: %.f90 | ||
$(FC) $(FCFLAGS) -J $(MODULE_DIR) -I $(MODULE_DIR) -c $< -o $@ | ||
|
||
# Common module | ||
$(TARGET_MODULES): $(MODULE_OBJS) | ||
$(AR) $(ARFLAGS) $(TARGET_MODULES) $(MODULE_OBJS) | ||
|
||
# Rule for making the target | ||
$(TARGET): $(TARGET_MODULES) $(OBJS) | ||
$(AR) $(ARFLAGS) $(TARGET) $(OBJS) $(TARGET_MODULES) | ||
|
||
################################################################################ | ||
|
||
# Generic rule for compiling Fortran files | ||
$(ADJOINT_FORWARD_BUILD_DIR)/%.f90.o: %.f90 | ||
$(FC) $(FCFLAGS) \ | ||
$(MODULE_STORE) $(MODULE_DIR) \ | ||
$(MODULE_INCLUDE) $(MODULE_DIR) \ | ||
-c $< -o $@ | ||
|
||
# Generic rule for compiling C files | ||
$(ADJOINT_FORWARD_BUILD_DIR)/%.c.o: %.c | ||
$(CC) $(CFLAGS) -c $< -o $@ | ||
|
||
# Cleaning everything | ||
clean: | ||
rm -rf $(BUILD_DIR) | ||
|
||
.PHONY: all dirs clean | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Load settings | ||
|
||
include ../../make.inc | ||
|
||
# Variables | ||
|
||
SRC_DIR := . | ||
QLAPACK_BUILD_DIR := $(BUILD_DIR)/qlapack | ||
MODULE_DIR := $(BUILD_DIR)/modules | ||
TARGET := $(BUILD_DIR)/qlapack.a | ||
|
||
# Set rest files | ||
SRCS := $(wildcard $(SRC_DIR)/*.f) | ||
OBJS := $(SRCS:%=$(QLAPACK_BUILD_DIR)/%.o) | ||
|
||
# Default rule | ||
all: dirs $(TARGET) | ||
|
||
# Rule for making the build directory | ||
dirs: | ||
mkdir -p $(QLAPACK_BUILD_DIR) | ||
echo $(OBJS) | ||
|
||
# Generic rule for compiling Fortran files | ||
$(QLAPACK_BUILD_DIR)/%.f.o: %.f | ||
$(FC) $(FCFLAGS) \ | ||
$(MODULE_STORE) $(MODULE_DIR) \ | ||
$(MODULE_INCLUDE) $(MODULE_DIR) \ | ||
-c $< -o $@ | ||
|
||
# Rule for making the target | ||
$(TARGET): $(OBJS) | ||
$(AR) $(ARFLAGS) $(TARGET) $(OBJS) | ||
|
||
# Cleaning everything | ||
clean: | ||
rm -rf $(BUILD_DIR) | ||
|
||
.PHONY: all dirs clean | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @addman2, here you include both make.txt and make.inc. what is the difference? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Load settings | ||
|
||
include ../../make.inc | ||
include ../../make.txt | ||
|
||
# Variables | ||
|
||
SRC_DIR := . | ||
COMMON_BUILD_DIR := $(BUILD_DIR)/common | ||
COMMON_MODULES_BUILD_DIR := $(BUILD_DIR)/common | ||
MODULE_DIR := $(BUILD_DIR)/modules | ||
TARGET := $(BUILD_DIR)/common.a | ||
TARGET_MODULES := $(BUILD_DIR)/common_module.a | ||
|
||
# File Lists | ||
# | ||
# First set modules: | ||
|
||
MODULE_SRCS := $(SRC_DIR)/constants.f90 \ | ||
$(SRC_DIR)/symmetries.f90 \ | ||
$(SRC_DIR)/cell.f90 \ | ||
$(SRC_DIR)/dielectric.f90 \ | ||
$(SRC_DIR)/ewald.f90 \ | ||
$(SRC_DIR)/types.f90 \ | ||
$(SRC_DIR)/kpoints.f90 \ | ||
$(SRC_DIR)/mod_IO.f90 \ | ||
$(SRC_DIR)/mod_extpot.f90 \ | ||
$(SRC_DIR)/sub_comm.f90 \ | ||
$(SRC_DIR)/mpiio.f90 \ | ||
$(SRC_DIR)/kind.f90 \ | ||
|
||
MODULE_OBJS := $(MODULE_SRCS:%=$(COMMON_MODULES_BUILD_DIR)/%.o) | ||
MODULE_MODS := $(MODULE_SRCS:%=$(BUILD_DIR)/%.mod) | ||
|
||
# Set rest files | ||
SRCS := $(wildcard $(SRC_DIR)/*.f90) | ||
SRCS += $(wildcard $(SRC_DIR)/*.c) | ||
SRCS := $(filter-out $(MODULE_SRCS), $(SRCS)) | ||
OBJS := $(SRCS:%=$(COMMON_BUILD_DIR)/%.o) | ||
|
||
# Default rule | ||
all: dirs $(TARGET) | ||
|
||
# Rule for making the build directory | ||
dirs: | ||
mkdir -p $(COMMON_BUILD_DIR) | ||
mkdir -p $(COMMON_MODULES_BUILD_DIR) | ||
mkdir -p $(MODULE_DIR) | ||
|
||
# Common module | ||
$(TARGET_MODULES): $(MODULE_OBJS) | ||
$(AR) $(ARFLAGS) $(TARGET_MODULES) $(MODULE_OBJS) | ||
|
||
# Rule for making the target | ||
$(TARGET): $(TARGET_MODULES) $(OBJS) | ||
$(AR) $(ARFLAGS) $(TARGET) $(OBJS) $(TARGET_MODULES) | ||
|
||
################################################################################ | ||
|
||
# Generic rule for compiling Fortran files | ||
#$(COMMON_BUILD_DIR)/%.f90.o: %.f90 | ||
$(COMMON_BUILD_DIR)/%.f90.o: %.f90 | ||
$(FC) $(FCFLAGS) \ | ||
-J$(MODULE_DIR) \ | ||
-c $< -o $@ | ||
|
||
# Generic rule for compiling C files | ||
$(COMMON_BUILD_DIR)/%.c.o: %.c | ||
$(CC) $(CFLAGS) \ | ||
-c $< -o $@ | ||
|
||
# Cleaning everything | ||
clean: | ||
rm -rf $(BUILD_DIR) | ||
|
||
.PHONY: all dirs clean | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Load settings | ||
|
||
include ../../make.inc | ||
|
||
# Variables | ||
|
||
PFAPACK_SRC_DIR := . | ||
PFAPACK_BUILD_DIR := $(BUILD_DIR)/pfapack | ||
TARGET := $(BUILD_DIR)/pfapack.a | ||
|
||
# File Lists | ||
SRCS := $(wildcard $(PFAPACK_SRC_DIR)/*.f) | ||
OBJS := $(SRCS:%=$(PFAPACK_BUILD_DIR)/%.o) | ||
|
||
# Default rule | ||
all: dirs $(TARGET) | ||
|
||
# Rule for making the build directory | ||
dirs: | ||
mkdir -p $(PFAPACK_BUILD_DIR) | ||
|
||
# Rule for making the target | ||
$(TARGET): $(OBJS) | ||
$(AR) $(ARFLAGS) $(TARGET) $(OBJS) | ||
|
||
# Generic rule for compiling CPP files | ||
$(PFAPACK_BUILD_DIR)/%.f.o: %.f | ||
$(FC) $(FCFLAGS) -c $< -o $@ | ||
|
||
# Cleaning everything | ||
clean: | ||
rm -rf $(PFAPACK_BUILD_DIR) | ||
|
||
.PHONY: all dirs clean | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dear @addman2, could you provide an example make.inc? (I guess it is the same as the old turbo's one).