Skip to content

Commit 3f4d738

Browse files
committed
parallel summary plot for McMC
1 parent 879f758 commit 3f4d738

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
## MPI Init
2+
using MPIClusterManagers, Distributed
3+
import MPI
4+
MPI.Init()
5+
rank = MPI.Comm_rank(MPI.COMM_WORLD)
6+
sz = MPI.Comm_size(MPI.COMM_WORLD)
7+
if rank == 0
8+
@info "size is $sz"
9+
end
10+
manager = MPIClusterManagers.start_main_loop(MPI_TRANSPORT_ALL)
11+
@info "there are $(nworkers()) workers"
12+
include("01_read_data.jl")
13+
include("02_set_options.jl")
14+
## set up McMC
15+
@everywhere using Distributed
16+
@everywhere using HiQGA.transD_GP
17+
## do the parallel soundings
18+
dr = 15
19+
yl = []
20+
idx = []
21+
qp1, qp2 = 0.1, 0.9
22+
burninfrac = 0.25
23+
vmin, vmax = extrema(-fbounds)
24+
using Dates, Printf
25+
dt = time()
26+
@info "starting at $(Dates.now())"
27+
transD_GP.summaryAEMimages(soundings, opt; qp1, qp2,
28+
zall, dr, dz, cmap="turbo", burninfrac, figsize=(16,12), yl,
29+
vmin=vmin, vmax=vmax, idx, useML, fontsize=14,
30+
preferEright=true, saveplot=true, showplot = false,)
31+
32+
@info "done! at $(Dates.now()) in "*@sprintf("%.2f seconds", time() - dt)
33+
## stop and exit
34+
MPIClusterManagers.stop_main_loop(manager)
35+
rmprocs(workers())
36+
exit()
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
#PBS -P ns59
3+
#PBS -q normalsr
4+
#PBS -l ncpus=312
5+
#PBS -l mem=1500GB
6+
#PBS -l walltime=0:20:00
7+
#PBS -l wd
8+
#PBS -N SkyTEM_plot
9+
#PBS -e 0000_grid.err
10+
#PBS -l storage=gdata/z67+scratch/z67+gdata/cr78+gdata/qi71
11+
module load intel-mpi/2021.10.0
12+
mpiexec -np 312 $HOME/bin/julia plot_parallel.jl >& outfile_plot

0 commit comments

Comments
 (0)