Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
louisponet committed Nov 11, 2022
1 parent a26f5dd commit b4a511a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Calculations/calculation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ function rm_tmp_flags!(c::Calculation{QE})
end

infile_outfile_str(c::Calculation) = "< $(c.infile) > $(c.outfile)"
remote_calcs(job, c::Calculation) = [RemoteHPC.Calculation(c.exec, Calculations.infile_outfile_str(c), c.run)]
remote_calcs(job, c::Calculation) = [RemoteHPC.Process(c.exec, Calculations.infile_outfile_str(c), c.run)]

hasflag(exec::Exec, s::Symbol) = haskey(exec.flags, s)

Expand Down
8 changes: 4 additions & 4 deletions src/Calculations/wannier.jl
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ function Emin_from_projwfc(structure::Structure, states, bands::Vector{Band},
end

function remote_calcs(job, _calculation::Calculation{Wannier90})
calcs = RemoteHPC.Calculation[]
calcs = RemoteHPC.Process[]
filename = _calculation.infile
should_run = _calculation.run
nscf = getfirst(x -> Calculations.isnscf(x), job.calculations)
Expand All @@ -183,7 +183,7 @@ function remote_calcs(job, _calculation::Calculation{Wannier90})
pw2wan_exec = Exec(name = "", dir=nscf.exec.dir, exec="pw2wannier90.x", modules=nscf.exec.modules)

preprocess = get(_calculation, :preprocess, false)
return [RemoteHPC.Calculation(_calculation.exec, "-pp $filename > $(_calculation.outfile)", preprocess || should_run),
RemoteHPC.Calculation(pw2wan_exec, "-pd .true. < pw2wan_$(splitext(filename)[1]).in > pw2wan_$(splitext(filename)[1]).out", preprocess || should_run),
RemoteHPC.Calculation(_calculation.exec, "$filename > $(_calculation.outfile)", should_run)]
return [RemoteHPC.Process(_calculation.exec, "-pp $filename > $(_calculation.outfile)", preprocess || should_run),
RemoteHPC.Process(pw2wan_exec, "-pd .true. < pw2wan_$(splitext(filename)[1]).in > pw2wan_$(splitext(filename)[1]).out", preprocess || should_run),
RemoteHPC.Process(_calculation.exec, "$filename > $(_calculation.outfile)", should_run)]
end
2 changes: 1 addition & 1 deletion src/Client/job.jl
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function RemoteHPC.save(job::Job, workflow = nothing; versioncheck=true, kwargs.
@info "Job version: $(curver) => $(job.version)."
end
job.dir = Jobs.main_job_dir(job)
remote_calcs = RemoteHPC.Calculation[]
remote_calcs = RemoteHPC.Process[]
for c in job.calculations
append!(remote_calcs, Calculations.remote_calcs(job, c))
end
Expand Down

0 comments on commit b4a511a

Please sign in to comment.