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
csst-sims
csst_msc_sim
Commits
f02a4de0
Commit
f02a4de0
authored
Jul 16, 2024
by
Wei Chengliang
Browse files
optimize gc.collect
parent
f5ae2578
Pipeline
#6234
passed with stage
in 0 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
observation_sim/ObservationSim.py
View file @
f02a4de0
...
@@ -135,6 +135,9 @@ class Observation(object):
...
@@ -135,6 +135,9 @@ class Observation(object):
chip_output
.
Log_info
(
"check running:1: pointing-%d chip-%d pid-%d memory-%6.2fGB"
%
(
pointing
.
id
,
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
.
chipID
,
os
.
getpid
(),
(
psutil
.
Process
(
os
.
getpid
()).
memory_info
().
rss
/
1024
/
1024
/
1024
)))
del
chip
.
img
del
chip
.
img
del
chip
.
flat_img
del
chip
.
prnu_img
del
chip
.
shutter_img
def
runExposure_MPI_PointingList
(
self
,
pointing_list
,
chips
=
None
):
def
runExposure_MPI_PointingList
(
self
,
pointing_list
,
chips
=
None
):
comm
=
MPI
.
COMM_WORLD
comm
=
MPI
.
COMM_WORLD
...
...
observation_sim/sim_steps/add_objects.py
View file @
f02a4de0
...
@@ -216,7 +216,7 @@ def add_objects(self, chip, filt, tel, pointing, catalog, obs_param):
...
@@ -216,7 +216,7 @@ def add_objects(self, chip, filt, tel, pointing, catalog, obs_param):
# Unload SED:
# Unload SED:
obj
.
unload_SED
()
obj
.
unload_SED
()
del
obj
del
obj
gc
.
collect
()
#
gc.collect()
del
psf_model
del
psf_model
gc
.
collect
()
gc
.
collect
()
...
...
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