Commit 4d09f12a authored by Fang Yuedong's avatar Fang Yuedong
Browse files

remove "use_mpi" keyword from overall_config

parent 68c79ee1
Pipeline #4222 failed with stage
in 0 seconds
...@@ -119,8 +119,7 @@ class Observation(object): ...@@ -119,8 +119,7 @@ class Observation(object):
chip_output.Log_info("check running:1: pointing-%d chip-%d pid-%d memory-%6.2fGB"%(pointing.id, chip.chipID, os.getpid(), (psutil.Process(os.getpid()).memory_info().rss / 1024 / 1024 / 1024) )) chip_output.Log_info("check running:1: pointing-%d chip-%d pid-%d memory-%6.2fGB"%(pointing.id, chip.chipID, os.getpid(), (psutil.Process(os.getpid()).memory_info().rss / 1024 / 1024 / 1024) ))
del chip.img del chip.img
def runExposure_MPI_PointingList(self, pointing_list, chips=None, use_mpi=False): def runExposure_MPI_PointingList(self, pointing_list, chips=None):
if use_mpi:
comm = MPI.COMM_WORLD comm = MPI.COMM_WORLD
ind_thread = comm.Get_rank() ind_thread = comm.Get_rank()
num_thread = comm.Get_size() num_thread = comm.Get_size()
...@@ -158,7 +157,7 @@ class Observation(object): ...@@ -158,7 +157,7 @@ class Observation(object):
run_filts = self.filter_list run_filts = self.filter_list
nchips_per_fp = len(self.chip_list) nchips_per_fp = len(self.chip_list)
else: else:
# Only run a particular set of chips (defined in the overall config file) # Only run a particular set of chips
run_chips = [] run_chips = []
run_filts = [] run_filts = []
for ichip in range(len(self.chip_list)): for ichip in range(len(self.chip_list)):
...@@ -171,7 +170,6 @@ class Observation(object): ...@@ -171,7 +170,6 @@ class Observation(object):
for ichip in range(nchips_per_fp): for ichip in range(nchips_per_fp):
i_process = process_counter + ichip i_process = process_counter + ichip
if use_mpi:
if i_process % num_thread != ind_thread: if i_process % num_thread != ind_thread:
continue continue
pid = os.getpid() pid = os.getpid()
......
...@@ -15,7 +15,6 @@ run_name: "testRun0" ...@@ -15,7 +15,6 @@ run_name: "testRun0"
# Whether to use MPI # Whether to use MPI
run_option: run_option:
use_mpi: YES
# NOTE: "n_threads" paramters is currently not used in the backend # NOTE: "n_threads" paramters is currently not used in the backend
# simulation codes. It should be implemented later in the web frontend # simulation codes. It should be implemented later in the web frontend
# in order to config the number of threads to request from NAOC cluster # in order to config the number of threads to request from NAOC cluster
......
...@@ -18,7 +18,6 @@ run_counter: 1 ...@@ -18,7 +18,6 @@ run_counter: 1
# Whether to use MPI # Whether to use MPI
run_option: run_option:
use_mpi: NO
# NOTE: "n_threads" paramters is currently not used in the backend # NOTE: "n_threads" paramters is currently not used in the backend
# simulation codes. It should be implemented later in the web frontend # simulation codes. It should be implemented later in the web frontend
# in order to config the number of threads to request from NAOC cluster # in order to config the number of threads to request from NAOC cluster
......
...@@ -17,7 +17,6 @@ run_counter: 1 ...@@ -17,7 +17,6 @@ run_counter: 1
# Whether to use MPI # Whether to use MPI
run_option: run_option:
use_mpi: NO
# NOTE: "n_threads" paramters is currently not used in the backend # NOTE: "n_threads" paramters is currently not used in the backend
# simulation codes. It should be implemented later in the web frontend # simulation codes. It should be implemented later in the web frontend
# in order to config the number of threads to request from NAOC cluster # in order to config the number of threads to request from NAOC cluster
......
...@@ -17,7 +17,6 @@ run_counter: 1 ...@@ -17,7 +17,6 @@ run_counter: 1
# Whether to use MPI # Whether to use MPI
run_option: run_option:
use_mpi: YES
# NOTE: "n_threads" paramters is currently not used in the backend # NOTE: "n_threads" paramters is currently not used in the backend
# simulation codes. It should be implemented later in the web frontend # simulation codes. It should be implemented later in the web frontend
# in order to config the number of threads to request from NAOC cluster # in order to config the number of threads to request from NAOC cluster
......
...@@ -17,7 +17,6 @@ run_counter: 1 ...@@ -17,7 +17,6 @@ run_counter: 1
# Whether to use MPI # Whether to use MPI
run_option: run_option:
use_mpi: NO
# NOTE: "n_threads" paramters is currently not used in the backend # NOTE: "n_threads" paramters is currently not used in the backend
# simulation codes. It should be implemented later in the web frontend # simulation codes. It should be implemented later in the web frontend
# in order to config the number of threads to request from NAOC cluster # in order to config the number of threads to request from NAOC cluster
......
...@@ -19,8 +19,6 @@ run_counter: 1 ...@@ -19,8 +19,6 @@ run_counter: 1
# Run options # Run options
run_option: run_option:
use_mpi: NO
# Output catalog only? # Output catalog only?
# If yes, no imaging simulation will be run. Only the catalogs # If yes, no imaging simulation will be run. Only the catalogs
# of corresponding footprints will be generated. # of corresponding footprints will be generated.
......
...@@ -19,8 +19,6 @@ run_counter: 1 ...@@ -19,8 +19,6 @@ run_counter: 1
# Run options # Run options
run_option: run_option:
use_mpi: NO
# Output catalog only? # Output catalog only?
# If yes, no imaging simulation will be run. Only the catalogs # If yes, no imaging simulation will be run. Only the catalogs
# of corresponding footprints will be generated. # of corresponding footprints will be generated.
......
...@@ -15,7 +15,6 @@ run_name: "C6_fits_testRun" ...@@ -15,7 +15,6 @@ run_name: "C6_fits_testRun"
# Whether to use MPI # Whether to use MPI
run_option: run_option:
use_mpi: YES
# NOTE: "n_threads" paramters is currently not used in the backend # NOTE: "n_threads" paramters is currently not used in the backend
# simulation codes. It should be implemented later in the web frontend # simulation codes. It should be implemented later in the web frontend
# in order to config the number of threads to request from NAOC cluster # in order to config the number of threads to request from NAOC cluster
......
...@@ -97,9 +97,7 @@ def run_sim(): ...@@ -97,9 +97,7 @@ def run_sim():
obs = Observation(config=config, Catalog=None, work_dir=config['work_dir'], data_dir=config['data_dir']) obs = Observation(config=config, Catalog=None, work_dir=config['work_dir'], data_dir=config['data_dir'])
# Run simulation # Run simulation
obs.runExposure_MPI_PointingList( obs.runExposure_MPI_PointingList(pointing_list=pointing_list)
pointing_list=pointing_list,
use_mpi=config["run_option"]["use_mpi"])
if __name__=='__main__': if __name__=='__main__':
run_sim() run_sim()
...@@ -24,7 +24,6 @@ pointing_file: "pointing_radec_246.5_40.dat" ...@@ -24,7 +24,6 @@ pointing_file: "pointing_radec_246.5_40.dat"
# Whether to use MPI # Whether to use MPI
run_option: run_option:
use_mpi: YES
# NOTE: "n_threads" paramters is currently not used in the backend # NOTE: "n_threads" paramters is currently not used in the backend
# simulation codes. It should be implemented later in the web frontend # simulation codes. It should be implemented later in the web frontend
# in order to config the number of threads to request from NAOC cluster # in order to config the number of threads to request from NAOC cluster
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment