# How to disable running logs of brian2cuda

**URL:** <https://brian.discourse.group/t/how-to-disable-running-logs-of-brian2cuda/1289>\
**Category:** Support\
**Tags:** brian2cuda, logging\
**Created:** [3 September 2024 14:38 UTC](https://brian.discourse.group/t/how-to-disable-running-logs-of-brian2cuda/1289 "2024-09-03T14:38:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavidKing2020](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@DavidKing2020](https://brian.discourse.group/u/DavidKing2020)\
**Post date:** [3 September 2024 14:38 UTC](https://brian.discourse.group/t/how-to-disable-running-logs-of-brian2cuda/1289/1 "2024-09-03T14:38:42Z")

</div>

brian2cuda output lots of logging information during running. Is there a way to disable them? I recall there was way to bypass it mentioned in the old chat list but the old chat doesn’t exist anymore. The following is the snapshot of those messages:

INFO \_run\_kernel\_s\_efe0to1\_pre\_plastic\_codeobject: Using 1 threads per bundle  
INFO \_run\_kernel\_s\_efe0to1\_pre\_plastic\_codeobject  
1 blocks  
1024 threads  
48 registers per thread  
0 bytes statically-allocated shared memory per block  
8 bytes local memory per thread  
4392 bytes user-allocated constant memory  
0.500 theoretical occupancy  
INFO \_run\_kernel\_s\_input2e0\_pre\_plastic\_codeobject: Using 1 threads per bundle  
INFO \_run\_kernel\_s\_input2e0\_pre\_plastic\_codeobject  
1 blocks  
1024 threads  
48 registers per thread  
0 bytes statically-allocated shared memory per block  
8 bytes local memory per thread  
4392 bytes user-allocated constant memory  
0.500 theoretical occupancy  
INFO \_run\_kernel\_s\_input2e1\_pre\_plastic\_codeobject: Using 1 threads per bundle  
INFO \_run\_kernel\_s\_input2e1\_pre\_plastic\_codeobject  
1 blocks  
1024 threads  
48 registers per thread  
0 bytes statically-allocated shared memory per block  
8 bytes local memory per thread  
4392 bytes user-allocated constant memory  
0.500 theoretical occupancy  
INFO \_run\_kernel\_s\_efe0to1\_post\_codeobject: Using 1 threads per bundle  
INFO \_run\_kernel\_s\_efe0to1\_post\_codeobject  
1 blocks  
1024 threads  
48 registers per thread  
0 bytes statically-allocated shared memory per block  
8 bytes local memory per thread  
4392 bytes user-allocated constant memory  
0.500 theoretical occupancy  
INFO \_run\_kernel\_s\_input2e0\_post\_codeobject: Using 1 threads per bundle  
INFO \_run\_kernel\_s\_input2e0\_post\_codeobject  
1 blocks  
1024 threads  
48 registers per thread  
0 bytes statically-allocated shared memory per block  
8 bytes local memory per thread  
4392 bytes user-allocated constant memory

---

<div class="post-metadata">

**Author:** ![mstimberg](https://yyz2.discourse-cdn.com/free1/user_avatar/brian.discourse.group/mstimberg/32/11_2.png) [@mstimberg](https://brian.discourse.group/u/mstimberg)\
**Post date:** [3 September 2024 14:59 UTC](https://brian.discourse.group/t/how-to-disable-running-logs-of-brian2cuda/1289/2 "2024-09-03T14:59:11Z")

</div>

Hi @DavidKing2020 . At the moment, there is no fine-grained way to toggle Brian2CUDA’s log messages (see [Implement a logging system on C++/CUDA level · Issue #103 · brian-team/brian2cuda · GitHub](https://github.com/brian-team/brian2cuda/issues/103)). You should be able to completely switch off its output, though, by using the `with_output` argument. If you use a single run (i.e. no `device.build`), you can set it with

```auto
set_device('cuda_standalone', with_output=False)

```

If you use `build`, you need to set it there:

```auto
device.build(with_output=False)

```

I can’t test it right now, let me know if it doesn’t work!

---

<div class="post-metadata">

**Author:** ![DavidKing2020](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@DavidKing2020](https://brian.discourse.group/u/DavidKing2020)\
**Post date:** [3 September 2024 19:11 UTC](https://brian.discourse.group/t/how-to-disable-running-logs-of-brian2cuda/1289/3 "2024-09-03T19:11:38Z")

</div>

Hi @mstimberg , I have the following device function for multiple runs:

```
    brian2.set_device(input_param.device_name, directory=directory, build_on_run=False)
    brian2.device.build(run=False, directory=input_param.device_name+str(self.rank), with_output=False)
    brian2.device.run(run_args=arguments)

```

All the logging output are still there with the option: with\_output=False

---

<div class="post-metadata">

**Author:** ![mstimberg](https://yyz2.discourse-cdn.com/free1/user_avatar/brian.discourse.group/mstimberg/32/11_2.png) [@mstimberg](https://brian.discourse.group/u/mstimberg)\
**Post date:** [3 September 2024 19:29 UTC](https://brian.discourse.group/t/how-to-disable-running-logs-of-brian2cuda/1289/4 "2024-09-03T19:29:32Z")

</div>

Ah, if you also have a separate `run` call, could you move the `with_output` argument there and see whether that suppresses the output?

---

<div class="post-metadata">

**Author:** ![DavidKing2020](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@DavidKing2020](https://brian.discourse.group/u/DavidKing2020)\
**Post date:** [3 September 2024 20:17 UTC](https://brian.discourse.group/t/how-to-disable-running-logs-of-brian2cuda/1289/5 "2024-09-03T20:17:22Z")

</div>

Hi @mstimberg . Yes, this one works. Thanks

---

<div class="post-metadata">

**Author:** ![mstimberg](https://yyz2.discourse-cdn.com/free1/user_avatar/brian.discourse.group/mstimberg/32/11_2.png) [@mstimberg](https://brian.discourse.group/u/mstimberg)\
**Post date:** [5 September 2024 13:18 UTC](https://brian.discourse.group/t/how-to-disable-running-logs-of-brian2cuda/1289/6 "2024-09-05T13:18:13Z")

</div>

Oh, and @DavidKing2020 – the old chat should still be around here (read-only): [https://matrix.to/#/#brian-team\_brian2:gitter.im](https://matrix.to/#/#brian-team_brian2:gitter.im)
