hoomd.util

Overview

hoomd.util.cuda_profile_start Start CUDA profiling.
hoomd.util.cuda_profile_stop Stop CUDA profiling.
hoomd.util.quiet_status Quiet the status line output.
hoomd.util.unquiet_status Resume the status line output.

Details

Utilities.

hoomd.util.cuda_profile_start()

Start CUDA profiling.

When using nvvp to profile CUDA kernels in hoomd jobs, you usually don’t care about all the initialization and startup. cuda_profile_start() allows you to not even record that. To use, uncheck the box “start profiling on application start” in your nvvp session configuration. Then, call cuda_profile_start() in your hoomd script when you want nvvp to start collecting information.

Example:

from hoomd_script import *
init.read_xml("init.xml");
# setup....
run(30000);  # warm up and auto-tune kernel block sizes
option.set_autotuner_params(enable=False);  # prevent block sizes from further autotuning
cuda_profile_start();
run(100);
hoomd.util.cuda_profile_stop()

Stop CUDA profiling.

hoomd.util.quiet_status()

Quiet the status line output.

After calling hoomd.util.quiet_status(), hoomd will no longer print out the line of code that executes each hoomd script command. Call hoomd.util.unquiet_status() to enable the status messages again. Messages are only enabled after a number of hoomd.util.unquiet_status() calls equal to the number of prior hoomd.util.quiet_status() calls.

hoomd.util.unquiet_status()

Resume the status line output.