Move Makefile.vfc_ci to Makefile.verificarlo

With the current setup, the CI should be able to be deployed correcly.

However, we still ned to find the best solution to pull the dataset on
the runner so the tests can be executed on it.
This commit is contained in:
Aurélien Delval 2021-04-30 11:22:22 +02:00
parent 1d1da00931
commit 18d1e2b785
4 changed files with 7 additions and 67 deletions

2
.gitignore vendored
View File

@ -12,3 +12,5 @@ datasets/dataset.*
bin/ bin/
*.vfcrun.hd5 *.vfcrun.hd5
*.vfcraw.hd5 *.vfcraw.hd5
__pycache__
ci/__pycache__

View File

@ -33,6 +33,7 @@ BIN_DIR := bin
EXEC := $(BIN_DIR)/cMaponiA3_test_3x3_3 \ EXEC := $(BIN_DIR)/cMaponiA3_test_3x3_3 \
$(BIN_DIR)/test_h5 \ $(BIN_DIR)/test_h5 \
$(BIN_DIR)/vfc_test_h5 \
$(BIN_DIR)/fMaponiA3_test_3x3_3 \ $(BIN_DIR)/fMaponiA3_test_3x3_3 \
$(BIN_DIR)/fMaponiA3_test_4x4_2 \ $(BIN_DIR)/fMaponiA3_test_4x4_2 \
$(BIN_DIR)/QMCChem_dataset_test $(BIN_DIR)/QMCChem_dataset_test
@ -84,6 +85,9 @@ $(BIN_DIR)/cMaponiA3_test_3x3_3: $(OBJ_DIR)/cMaponiA3_test_3x3_3.o $(DEPS_CXX) |
$(BIN_DIR)/test_h5: $(OBJ_DIR)/test_h5.o $(DEPS_CXX) | $(BIN_DIR) $(BIN_DIR)/test_h5: $(OBJ_DIR)/test_h5.o $(DEPS_CXX) | $(BIN_DIR)
$(CXX) -o $@ $^ $(H5FLAGS) $(CXX) -o $@ $^ $(H5FLAGS)
$(BIN_DIR)/vfc_test_h5: $(OBJ_DIR)/vfc_test_h5.o $(DEPS_CXX) | $(BIN_DIR)
$(CXX) -o $@ $^ $(H5FLAGS)
$(BIN_DIR)/fMaponiA3_test_3x3_3: $(DEPS_F) $(OBJ_DIR)/fMaponiA3_test_3x3_3.o | $(BIN_DIR) $(BIN_DIR)/fMaponiA3_test_3x3_3: $(DEPS_F) $(OBJ_DIR)/fMaponiA3_test_3x3_3.o | $(BIN_DIR)
$(FC) $(FLIBS) -o $@ $^ $(FC) $(FLIBS) -o $@ $^
@ -92,5 +96,3 @@ $(BIN_DIR)/fMaponiA3_test_4x4_2: $(DEPS_F) $(OBJ_DIR)/fMaponiA3_test_4x4_2.o |
$(BIN_DIR)/QMCChem_dataset_test: $(DEPS_F) $(OBJ_DIR)/QMCChem_dataset_test.o | $(BIN_DIR) $(BIN_DIR)/QMCChem_dataset_test: $(DEPS_F) $(OBJ_DIR)/QMCChem_dataset_test.o | $(BIN_DIR)
$(FC) $(FLIBS) -o $@ $^ $(FC) $(FLIBS) -o $@ $^

View File

@ -1,64 +0,0 @@
## Compiler
CXX = verificarlo-c++
## Compiler flags
H5FLAGS = -I/usr/include/hdf5/serial -lhdf5_serial -lhdf5_cpp
# H5FLAGS = -lhdf5 -lhdf5_cpp
CXXFLAGS = -O0 -g $(H5FLAGS)
INCLUDE = -I $(INC_DIR)/ -I="/usr/include"
DEPS_CXX = $(OBJ_DIR)/SM_MaponiA3.o $(OBJ_DIR)/SM_MaponiA3S.o $(OBJ_DIR)/SM_Standard.o $(OBJ_DIR)/SM_Helpers.o
SRC_DIR := src
TST_DIR := tests
INC_DIR := include
OBJ_DIR := build
BIN_DIR := bin
EXEC := $(BIN_DIR)/vfc_test_h5
## Build tagets
.PHONY: all clean distclean
all: $(EXEC)
clean:
@rm -vrf $(OBJ_DIR)
@rm -vrf $(BIN_DIR)
distclean: clean
@rm -vrf $(BIN_DIR) \
Slater* Updates.dat
#### COMPILING
$(BIN_DIR) $(OBJ_DIR):
mkdir -p $@
### IMPLICIT BUILD RULES
## C++ objects
$(OBJ_DIR)/%.o: $(TST_DIR)/%.cpp $(INC_DIR)/* | $(OBJ_DIR)
$(CXX) $(CXXFLAGS) $(INCLUDE) -c -o $@ $<
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp $(INC_DIR)/* | $(OBJ_DIR)
$(CXX) $(CXXFLAGS) -fPIE $(INCLUDE) -c -o $@ $<
## HDF5/C++ objects
$(OBJ_DIR)/%_h5.o: $(TST_DIR)/%_h5.cpp $(INC_DIR)/* | $(OBJ_DIR)
$(CXX) $(H5CXXFLAGS) $(INCLUDE) -c -o $@ $<
### EXPLICIT BUILD RULES
## special compiler flag -fPIC otherwise h5c++ builds fail
$(OBJ_DIR)/SM_MaponiA3.o: $(SRC_DIR)/SM_MaponiA3.cpp $(INC_DIR)/* | $(OBJ_DIR)
$(CXX) $(CXXFLAGS) -fPIC $(INCLUDE) -c -o $@ $<
$(OBJ_DIR)/SM_MaponiA3S.o: $(SRC_DIR)/SM_MaponiA3S.cpp $(INC_DIR)/* | $(OBJ_DIR)
$(CXX) $(CXXFLAGS) -fPIC $(INCLUDE) -c -o $@ $<
$(OBJ_DIR)/SM_Standard.o: $(SRC_DIR)/SM_Standard.cpp $(INC_DIR)/* | $(OBJ_DIR)
$(CXX) $(CXXFLAGS) -fPIC $(INCLUDE) -c -o $@ $<
#### LINKING
$(BIN_DIR)/vfc_test_h5: $(OBJ_DIR)/vfc_test_h5.o $(DEPS_CXX) | $(BIN_DIR)
$(CXX) $(CXXFLAGS) $(INCLUDE) -o $@ $^ $(H5FLAGS)

View File

@ -167,7 +167,7 @@ int test_cycle(H5File file, int cycle, std::string version, vfc_probes * probes)
int main(int argc, char **argv) { int main(int argc, char **argv) {
if (argc != 3) { if (argc != 3) {
std::cerr << "Execute from within '/'" << std::endl; std::cerr << "Execute from within '/'" << std::endl;
std::cerr << "usage: test_h5 <version> <start cycle> <stop cycle>" << std::endl; std::cerr << "usage: test_h5 <version> <path to cycles file>" << std::endl;
return 1; return 1;
} }
std::string version(argv[1]); std::string version(argv[1]);