Skip to content

Commit

Permalink
Merge pull request #295 from electronic-structure/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
toxa81 authored Oct 24, 2018
2 parents dea6193 + dd82565 commit 7d0c882
Show file tree
Hide file tree
Showing 102 changed files with 5,814 additions and 30,897 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ if(USE_CUDA)
message("set nvcc flags for geforce 1000")
list(APPEND CMAKE_CUDA_FLAGS "-arch=sm_61")
endif()

endif(USE_CUDA)

if(USE_MAGMA)
Expand Down Expand Up @@ -167,7 +166,7 @@ MACRO(SIRIUS_SETUP_TARGET _target)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
target_link_libraries(${_target} PRIVATE "${sirius_cu_location};${SYSTEM_LIBRARIES};${MKL_LIBRARIES};${HDF5_C_LIBRARIES};${HDF5_C_HL_LIBRARIES};-lpthread")
else()
message(FATAL_ERROR "Unknown compiler")
message(FATAL_ERROR "Unsupported compiler")
endif()
else()
target_link_libraries(${_target} PRIVATE "${sirius_cu_location};${SYSTEM_LIBRARIES};${LAPACK_LIBRARIES};${FFTW_LIBRARIES};${HDF5_C_LIBRARIES};${HDF5_C_HL_LIBRARIES}")
Expand Down
2 changes: 2 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pipeline {
dir('SIRIUS') {
sh '''
#!/bin/bash -l
export ENVFILE=$(realpath ci/env-gnu-gpu)
sbatch --wait ci/build-daint-gpu.sh
echo "---------- build-daint-gpu.out ----------"
cat build-daint-gpu.out
Expand All @@ -40,6 +41,7 @@ pipeline {
cd build
export SIRIUS_BINARIES=$(realpath apps/dft_loop)
type -f ${SIRIUS_BINARIES}/sirius.scf
export ENVFILE=$(realpath ../ci/env-gnu-gpu)
sbatch --wait ../ci/run-mc-verification.sh
cat *err
cat *out
Expand Down
14 changes: 9 additions & 5 deletions apps/dft_loop/sirius.scf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ std::unique_ptr<Simulation_context> create_sim_ctx(std::string fname__,

auto pu = args__.value<std::string>("processing_unit", ctx.control().processing_unit_);
if (pu == "") {
#ifdef __GPU
#ifdef __GPU
pu = "gpu";
#else
#else
pu = "cpu";
#endif
#endif
}
ctx.set_processing_unit(pu);

Expand Down Expand Up @@ -195,12 +195,16 @@ void run_tasks(cmd_args const& args)
ctx->initialize();

Potential potential(*ctx);
potential.allocate();
if (ctx->full_potential()) {
potential.allocate();
}

Hamiltonian H(*ctx, potential);

Density density(*ctx);
density.allocate();
if (ctx->full_potential()) {
density.allocate();
}

K_point_set ks(*ctx);

Expand Down
16 changes: 8 additions & 8 deletions apps/tests/test_eigen_v2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dmatrix<T> random_symmetric(int N__, int bs__, BLACS_grid const& blacs_grid__)
#else
for (int i = 0; i < N__; i++) {
for (int j = 0; j < N__; j++) {
B(i, j) = utils::conj(A(j, i)));
B(i, j) = utils::conj(A(j, i));
}
}
#endif
Expand All @@ -28,11 +28,11 @@ dmatrix<T> random_symmetric(int N__, int bs__, BLACS_grid const& blacs_grid__)
A(i, j) = 0.5 * (A(i, j) + B(i, j));
}
}

for (int i = 0; i < N__; i++) {
A.set(i, i, 50.0);
}

return std::move(A);
}

Expand All @@ -53,7 +53,7 @@ dmatrix<T> random_positive_definite(int N__, int bs__, BLACS_grid const& blacs_g
#else
for (int i = 0; i < N__; i++) {
for (int j = 0; j < N__; j++) {
B(i, j) = type_wrapper<T>::bypass(std::conj(A(j, i)));
B(i, j) = utils::conj(A(j, i));
}
}
#endif
Expand Down Expand Up @@ -99,7 +99,7 @@ void test_diag(BLACS_grid const& blacs_grid__,
};

auto solver = Eigensolver_factory<T>(map_name_to_type[name__]);

std::vector<double> eval(nev__);

if (blacs_grid__.comm().rank() == 0) {
Expand Down Expand Up @@ -134,7 +134,7 @@ void test_diag(BLACS_grid const& blacs_grid__,
}
}
double t = t1.stop();

if (blacs_grid__.comm().rank() == 0) {
printf("eigen-values (min, max): %18.12f %18.12f\n", eval.front(), eval.back());
printf("time: %f sec.\n", t);
Expand Down Expand Up @@ -194,7 +194,7 @@ void test_diag2(BLACS_grid const& blacs_grid__,
};

auto solver = Eigensolver_factory<double_complex>(map_name_to_type[name__]);

matrix<double_complex> full_mtrx;
int n;
if (blacs_grid__.comm().rank() == 0) {
Expand All @@ -217,7 +217,7 @@ void test_diag2(BLACS_grid const& blacs_grid__,
if (blacs_grid__.comm().rank() == 0) {
printf("matrix size: %i\n", n);
}

std::vector<double> eval(n);
dmatrix<double_complex> A(n, n, blacs_grid__, bs__, bs__);
dmatrix<double_complex> Z(n, n, blacs_grid__, bs__, bs__);
Expand Down
Loading

0 comments on commit 7d0c882

Please sign in to comment.