Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Liu Dezi
csst_msc_sim
Commits
4d09f12a
Commit
4d09f12a
authored
Apr 19, 2024
by
Fang Yuedong
Browse files
remove "use_mpi" keyword from overall_config
parent
68c79ee1
Changes
11
Show whitespace changes
Inline
Side-by-side
ObservationSim/ObservationSim.py
View file @
4d09f12a
...
...
@@ -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
)
))
del
chip
.
img
def
runExposure_MPI_PointingList
(
self
,
pointing_list
,
chips
=
None
,
use_mpi
=
False
):
if
use_mpi
:
def
runExposure_MPI_PointingList
(
self
,
pointing_list
,
chips
=
None
):
comm
=
MPI
.
COMM_WORLD
ind_thread
=
comm
.
Get_rank
()
num_thread
=
comm
.
Get_size
()
...
...
@@ -158,7 +157,7 @@ class Observation(object):
run_filts
=
self
.
filter_list
nchips_per_fp
=
len
(
self
.
chip_list
)
else
:
# Only run a particular set of chips
(defined in the overall config file)
# Only run a particular set of chips
run_chips
=
[]
run_filts
=
[]
for
ichip
in
range
(
len
(
self
.
chip_list
)):
...
...
@@ -171,7 +170,6 @@ class Observation(object):
for
ichip
in
range
(
nchips_per_fp
):
i_process
=
process_counter
+
ichip
if
use_mpi
:
if
i_process
%
num_thread
!=
ind_thread
:
continue
pid
=
os
.
getpid
()
...
...
config/config_50sqdeg.yaml
View file @
4d09f12a
...
...
@@ -15,7 +15,6 @@ run_name: "testRun0"
# Whether to use MPI
run_option
:
use_mpi
:
YES
# NOTE: "n_threads" paramters is currently not used in the backend
# simulation codes. It should be implemented later in the web frontend
# in order to config the number of threads to request from NAOC cluster
...
...
config/config_C6.yaml
View file @
4d09f12a
...
...
@@ -18,7 +18,6 @@ run_counter: 1
# Whether to use MPI
run_option
:
use_mpi
:
NO
# NOTE: "n_threads" paramters is currently not used in the backend
# simulation codes. It should be implemented later in the web frontend
# in order to config the number of threads to request from NAOC cluster
...
...
config/config_C6_dev.yaml
View file @
4d09f12a
...
...
@@ -17,7 +17,6 @@ run_counter: 1
# Whether to use MPI
run_option
:
use_mpi
:
NO
# NOTE: "n_threads" paramters is currently not used in the backend
# simulation codes. It should be implemented later in the web frontend
# in order to config the number of threads to request from NAOC cluster
...
...
config/config_C6_fits.yaml
View file @
4d09f12a
...
...
@@ -17,7 +17,6 @@ run_counter: 1
# Whether to use MPI
run_option
:
use_mpi
:
YES
# NOTE: "n_threads" paramters is currently not used in the backend
# simulation codes. It should be implemented later in the web frontend
# in order to config the number of threads to request from NAOC cluster
...
...
config/config_ooc_c6.yaml
View file @
4d09f12a
...
...
@@ -17,7 +17,6 @@ run_counter: 1
# Whether to use MPI
run_option
:
use_mpi
:
NO
# NOTE: "n_threads" paramters is currently not used in the backend
# simulation codes. It should be implemented later in the web frontend
# in order to config the number of threads to request from NAOC cluster
...
...
config/config_overall.yaml
View file @
4d09f12a
...
...
@@ -19,8 +19,6 @@ run_counter: 1
# Run options
run_option
:
use_mpi
:
NO
# Output catalog only?
# If yes, no imaging simulation will be run. Only the catalogs
# of corresponding footprints will be generated.
...
...
config/config_overall_newStar.yaml
View file @
4d09f12a
...
...
@@ -19,8 +19,6 @@ run_counter: 1
# Run options
run_option
:
use_mpi
:
NO
# Output catalog only?
# If yes, no imaging simulation will be run. Only the catalogs
# of corresponding footprints will be generated.
...
...
config/config_testCASE.yaml
View file @
4d09f12a
...
...
@@ -15,7 +15,6 @@ run_name: "C6_fits_testRun"
# Whether to use MPI
run_option
:
use_mpi
:
YES
# NOTE: "n_threads" paramters is currently not used in the backend
# simulation codes. It should be implemented later in the web frontend
# in order to config the number of threads to request from NAOC cluster
...
...
run_sim.py
View file @
4d09f12a
...
...
@@ -97,9 +97,7 @@ def run_sim():
obs
=
Observation
(
config
=
config
,
Catalog
=
None
,
work_dir
=
config
[
'work_dir'
],
data_dir
=
config
[
'data_dir'
])
# Run simulation
obs
.
runExposure_MPI_PointingList
(
pointing_list
=
pointing_list
,
use_mpi
=
config
[
"run_option"
][
"use_mpi"
])
obs
.
runExposure_MPI_PointingList
(
pointing_list
=
pointing_list
)
if
__name__
==
'__main__'
:
run_sim
()
tests/testData/csst_fz_gc0/config_C6.yaml
View file @
4d09f12a
...
...
@@ -24,7 +24,6 @@ pointing_file: "pointing_radec_246.5_40.dat"
# Whether to use MPI
run_option
:
use_mpi
:
YES
# NOTE: "n_threads" paramters is currently not used in the backend
# simulation codes. It should be implemented later in the web frontend
# in order to config the number of threads to request from NAOC cluster
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment