Skip to content

Commit

Permalink
Refs #4980 get examples working
Browse files Browse the repository at this point in the history
  • Loading branch information
VickieLynch committed Mar 22, 2012
1 parent 1b66fe2 commit 3fb6794
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
#############################################################################################

from MantidFramework import *
from mpi4py import MPI
import boostmpi as mpi
mtd.initialise()

comm = MPI.COMM_WORLD
rank = comm.Get_rank()
comm = mpi.world
rank = comm.rank
size = comm.size

print "Running on rank %d of %d" % (rank, size)

eventfile="/ccs/home/8oz/Code/Mantid/Test/AutoTestData/CNCS_7860_event.nxs"
eventfile="../../../../../Test/AutoTestData/CNCS_7860_event.nxs"
wksp="partial"
binning="40e3, 100, 70e3"

Expand Down
18 changes: 18 additions & 0 deletions Code/Mantid/Framework/MPIAlgorithms/scripts/PG3_mpi_reduction.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from MantidFramework import *
mtd.initialise()

import os
import boostmpi as mpi

# Save typing
comm = mpi.world

SNSPowderReduction2(Instrument='PG3', RunNumber='2538', Extension='_event.nxs', PreserveEvents=True, CalibrationFile='PG3_calibrate_d2538_2012_02_21.cal', Binning='0.2,-0.0004,10.',BinInDspace=True, StripVanadiumPeaks=True, FilterBadPulses=True, NormalizeByCurrent=False, SaveAs='gsas', OutputDirectory='.', FinalDataUnits='dSpacing')
if comm.rank == 0:
os.system("mv PG3_2538.gsa mpi8_histo.gsa")
SNSPowderReduction2(Instrument='PG3', RunNumber='2538', Extension='_event.nxs', PreserveEvents=True, CalibrationFile='PG3_calibrate_d2538_2012_02_21.cal', Binning='0.2,-0.0004,10.',BinInDspace=True, StripVanadiumPeaks=True, FilterBadPulses=True, NormalizeByCurrent=False, SaveAs='gsas', OutputDirectory='.', FinalDataUnits='dSpacing')
if comm.rank == 0:
os.system("mv PG3_2538.gsa mpi8_event.gsa")

done = "Done " + str(1+comm.rank) + "!"

0 comments on commit 3fb6794

Please sign in to comment.