Skip to content

Commit ac740f5

Browse files
authored
Continous integration with Travis CI (#159)
* Added basic travis.yml config that builds `make cuda=0 intel=0` for now. * Fix build warnings and determinism to have reproducible builds.
1 parent e57b280 commit ac740f5

File tree

7 files changed

+31
-26
lines changed

7 files changed

+31
-26
lines changed

.travis.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
language: cpp
2+
sudo: required
3+
before_install:
4+
- sudo apt-get install gfortran liblapack-dev libblas-dev
5+
script: ./configure && make -j cpu=1 cuda=0

configure

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#!/bin/bash

g2g/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ OBJ += $(AINT_SRC:%.cpp=%.o)
1919
CPU_SOURCES := $(wildcard cpu/*.cpp)
2020
SRCS += $(CPU_SOURCES)
2121
OBJ += $(CPU_SOURCES:%.cpp=%.o)
22-
CXXFLAGS += -DCPU_KERNELS=1 -I$(MKLROOT)/include
22+
CXXFLAGS += -DCPU_KERNELS=1 -I$(MKLROOT)/include -Wno-unused-function
2323
CPU := 1
2424

2525
ifneq ($(cuda),0)

g2g/cpu/iteration.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,10 @@ template<class scalar_type> void PointGroupCPU<scalar_type>::solve_opened
296296
vector< std::vector<vec_type3> > forces_mat_a, forces_mat_b;
297297
HostMatrix<scalar_type> factors_rmm_a, factors_rmm_b;
298298

299-
if(compute_rmm || compute_forces)
299+
if(compute_rmm || compute_forces) {
300300
factors_rmm_a.resize(this->points.size(), 1);
301301
factors_rmm_b.resize(this->points.size(), 1);
302+
}
302303

303304
if(compute_forces) {
304305
forces_a.resize(this->total_nucleii(), vec_type3(0.f,0.f,0.f));

g2g/matrix.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ template<class T> bool Matrix<T>::is_allocated(void) const {
3535
***************************/
3636
template<class T> void HostMatrix<T>::alloc_data(void) {
3737
assert(this->bytes() != 0);
38-
int bytes = this->bytes();
3938
int posix_return = 0;
4039

4140
if (pinned) {

lioamber/Makefile.depends

+21-22
Original file line numberDiff line numberDiff line change
@@ -213,24 +213,23 @@ else ifeq ($(cuda),3)
213213
endif
214214

215215
ifeq ($(use_cublas),1)
216-
include cublasmath/cublasmath.mk
217-
SRCDIRS += cublasmath
218-
OBJECTS += cublasmath.o
219-
OBJECTS += fortran.o
220-
221-
tmplist :=
222-
tmplist += cublasmath.o
223-
$(tmplist:%.o=$(OBJPATH)/%.o) : $(OBJPATH)/general_module.mod
224-
$(tmplist:%.o=$(OBJPATH)/%.o) : $(OBJPATH)/garcha_mod.mod
225-
$(tmplist:%.o=$(OBJPATH)/%.o) : $(OBJPATH)/fortran.o
226-
227-
tmplist :=
228-
tmplist += SCF.o SCFop.o TD.o converger_subs.o
229-
$(tmplist:%.o=$(OBJPATH)/%.o) : $(OBJPATH)/cublasmath.mod
230-
231-
$(OBJPATH)/fortran.o: $(CUDA_HOME)/src/fortran.c
232-
$(CC) -fPIC -DCUBLAS_GFORTRAN -O3 -c $< -o $@ -I$(CUDA_HOME)/include
233-
216+
include cublasmath/cublasmath.mk
217+
SRCDIRS += cublasmath
218+
OBJECTS += cublasmath.o
219+
OBJECTS += fortran.o
220+
221+
tmplist :=
222+
tmplist += cublasmath.o
223+
$(tmplist:%.o=$(OBJPATH)/%.o) : $(OBJPATH)/general_module.mod
224+
$(tmplist:%.o=$(OBJPATH)/%.o) : $(OBJPATH)/garcha_mod.mod
225+
$(tmplist:%.o=$(OBJPATH)/%.o) : $(OBJPATH)/fortran.o
226+
227+
tmplist :=
228+
tmplist += SCF.o SCFop.o TD.o converger_subs.o
229+
$(tmplist:%.o=$(OBJPATH)/%.o) : $(OBJPATH)/cublasmath.mod
230+
231+
$(OBJPATH)/fortran.o: $(CUDA_HOME)/src/fortran.c
232+
$(CC) -fPIC -DCUBLAS_GFORTRAN -O3 -c $< -o $@ -I$(CUDA_HOME)/include
234233
endif
235234

236235

@@ -245,13 +244,13 @@ OBJECTS += garcha_mod.o
245244
SRCDIRS += liomods
246245

247246
tmplist := dft_get_mm_forces.o dft_get_qm_forces.o
248-
tmplist += get_restrain_energy_forces.o
247+
tmplist += get_restrain_energy_forces.o
249248
tmplist += dip.o dipmem.o drive.o grid.o init_amber.o init.o
250249
tmplist += jarz.o lio_finalize.o predictor.o
251250
tmplist += SCF.o SCF_in.o SCFop.o TD.o cubegen.o
252251
tmplist += maskrmm.o write_output.o SCF_exter.o
253-
tmplist += intECP.o
254-
tmplist += faint_cpu77.o
252+
tmplist += intECP.o elec.o func.o density.o
253+
tmplist += faint_cpu77.o steep.o transport.o
255254
$(tmplist:%.o=$(OBJPATH)/%.o) : $(OBJPATH)/garcha_mod.mod
256255

257256

@@ -277,7 +276,7 @@ include liosubs/liosubs.mk
277276

278277
tmplist :=
279278
tmplist += SCF.o init_lio.o
280-
tmplist += lionml_subs.o
279+
tmplist += lionml_subs.o atompot_subs.o
281280
$(tmplist:%.o=$(OBJPATH)/%.o) : $(OBJPATH)/liosubs.mod
282281

283282

lioamber/readECP.f90

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ SUBROUTINE LecturaECP
121121
ppotati=0
122122
END DO
123123
WRITE(*,4166)
124-
WRITE(*,4167),ppotat_acum
124+
WRITE(*,4167) ppotat_acum
125125
WRITE(*,4168)
126126
WRITE(*,*)
127127

0 commit comments

Comments
 (0)