Closed hyschive closed 5 months ago
@hyschive I have made libyt_interactive_mode.h
inside libyt.h
, along with many other small updates. I'll PR again to gamer.
@hyschive do you expect to get feedbacks from the script?
@cindytsai What kind of feedback are you referring to? Could you give an example?
Like output messages and results.
I'm afraid that I'll need more information. I don't think libyt supports passing the analysis results (e.g., the density profile data) back to a simulation code, right? As for outputting log messages, what's the difference between the original and reloaded scripts?
The original and the reloaded script are the same, except that they need to filter through the log file to get the results. Ex: What you get in prompt:
>>> array
[1, 2, 3]
Now you would only get this in the log file.
[1, 2, 3]
@hyschive this is what I'm thinking, about the procedure:
@cindytsai I'll test it and provide more feedback once you have a prototype
Major
When running batch instead of interactive jobs (i.e.,
qsub job_script
instead ofqsub -I
), it will be great if a simulation code can reload a yt script automatically. IIRC,LIBYT_STOP
only works for interactive jobs. This feature is especially important for production scientific simulations since they usually use batch instead of interactive jobs.One possible approach is to add another file
LIBYT_RELOAD
, put all the Python statements therein, and execute it directly without activating a Python prompt. For example, we can put the following codes inLIBYT_RELOAD
.Further, the GAMER PR gamer-project/gamer#193 can be used together with
LIBYT_RELOAD
to reload alibyt
script in the following procedure.libyt
script needs to be revised.PAUSE_GAMER_PAUSE
to pause a run.libyt
script.LIBYT_RELOAD
.PAUSE_GAMER_PAUSE
to resume a simulation, which will then reload the revisedlibyt
script when detectingLIBYT_RELOAD
.Minor
Why not include
libyt_interactive_mode.h
inlibyt.h
so that simulation codes only need to includelibyt.h
even when enablingINTERACTIVE_MODE
?