Skip to content

Commit

Permalink
constants included in coveralls?
Browse files Browse the repository at this point in the history
  • Loading branch information
louisponet committed May 26, 2018
1 parent a9527e7 commit 36cab48
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/job.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function DFJob(job_name, local_dir, structure::AbstractStructure, calculations::
:outdir => "'$server_dir'",
:ecutwfc => 25.)
merge!(req_flags, common_flags)
for (calc, (execs, data)) in calculations
for (calc, (excs, data)) in calculations
calc_ = typeof(calc) == String ? Symbol(calc) : calc
if in(calc_, [Symbol("vc-relax"), :relax, :scf])
k_points = get(data, :k_points, [1, 1, 1, 0, 0, 0])
Expand All @@ -73,15 +73,15 @@ function DFJob(job_name, local_dir, structure::AbstractStructure, calculations::
k_option = :crystal_b
end
flags = get(data, :flags, Dict{Symbol, Any}())
if execs[2].exec == "pw.x"
if excs[2].exec == "pw.x"
push!(flags, :calculation => "'$(string(calc_))'")
datablocks = [InputData(:k_points, k_option, k_points)]
else
datablocks = InputData[]
end
input_ = DFInput{package}(string(calc_) * ".in",
Dict{Symbol, Any}(),
datablocks, execs, true)
datablocks, excs, true)
setflags!(input_, req_flags..., print=false)
setflags!(input_, flags..., print=false)
push!(job_calcs, input_)
Expand Down
1 change: 1 addition & 0 deletions test/defaults_test.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

using DFControl
import DFControl: Exec, data, add!, execs

prevdefault = getdefault_server()
setdefault_server("localhost")
Expand Down
1 change: 1 addition & 0 deletions test/job_control_tests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using DFControl, Base.Test

import DFControl: data
# testjobpath = joinpath(Pkg.dir("DFControl"), "test/testassets/test_job/")
testjobpath = joinpath(@__DIR__, "testassets/test_job/")
job = DFJob(testjobpath);
Expand Down
5 changes: 3 additions & 2 deletions test/jobfromcif_test.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
using DFControl, Base.Test

import DFControl: Exec, data, add!
# testjobpath = joinpath(Pkg.dir("DFControl"),"test/testassets/test_job/")
testjobpath = joinpath(@__DIR__,"testassets/test_job/")

name = "Pt"
local_dir = testjobpath
server_dir = testjobpath
bin_dir = "/usr/local/bin"
execs = [Exec("mpirun", bin_dir, Dict{Symbol, Any}(:np => 24)), Exec("pw.x", bin_dir, Dict{Symbol, Any}(:nk => 2))]
excs = [Exec("mpirun", bin_dir, Dict{Symbol, Any}(:np => 24)), Exec("pw.x", bin_dir, Dict{Symbol, Any}(:nk => 2))]

pseudo_set = :test

Expand All @@ -23,7 +24,7 @@ bands_data = Dict(:k_points => [[0.5, 0.5, 0.5, 100.],
:flags => [:verbosity => "'high'", :nbnd => 8])

nscf_data = merge(bands_data, Dict(:k_points => [10, 10, 10]))
calculations = [:scf => (execs, scf_data), :bands => (execs, bands_data), :nscf =>(execs, nscf_data)]
calculations = [:scf => (excs, scf_data), :bands => (excs, bands_data), :nscf =>(excs, nscf_data)]

job = DFJob(name, local_dir, testjobpath * "Pt.cif", calculations,
:prefix => "'$name'",
Expand Down
2 changes: 0 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using DFControl
using Base.Test
import DFControl: Exec, data, add!, execs

tic()
@testset "New defaults" begin include("defaults_test.jl") end
Expand Down

0 comments on commit 36cab48

Please sign in to comment.