cctbx / cctbx_project

Computational Crystallography Toolbox
https://cci.lbl.gov/docs/cctbx
Other
210 stars 111 forks source link

Fix scaling of diffuse in diffBragg #879

Closed mewall closed 1 year ago

nksauter commented 1 year ago

@mewall I'm getting a bunch of "maybe-uninitialized" warnings in the code that seem to pertain to the new variable introduced. I wonder if you could do a little polishing to make sure we don't hit any warnings--thanks.

/dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:313:25: warning: ‘dll’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  313 |     dHH << dhh, dkk, dll;
      |                         ^  
/dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:251:15: note: ‘dll’ was declared here
  251 |     int dhh, dkk, dll;
      |               ^~~
/dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:313:19: warning: ‘dkk’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  313 |     dHH << dhh, dkk, dll;
      |                   ^~~
/dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:251:10: note: ‘dkk’ was declared here
  251 |     int dhh, dkk, dll;
      |          ^~~
/dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:313:9: warning: ‘dhh’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  313 |     dHH << dhh, dkk, dll;
      |     ~~~~^~~~~~~~
/dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:251:5: note: ‘dhh’ was declared here
  251 |     int dhh, dkk, dll;
      |     ^~~
/dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:318: warning: ‘num_laue_mats’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  318 |     Kokkos::parallel_for(
/dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:250:5: note: ‘num_laue_mats’ was declared here
  250 |     int num_laue_mats;
      |     ^~~~~~~~~~~~~
mewall commented 1 year ago

@nksauter These are all old variables, I suspect these warnings aren't new? I'll take a look though and see whether there's something to be done.


From: nksauter @.***> Sent: Wednesday, May 24, 2023 7:52:48 PM To: cctbx/cctbx_project Cc: Wall, Michael E; Mention Subject: [EXTERNAL] Re: [cctbx/cctbx_project] Fix scaling of diffuse in diffBragg (PR #879)

@mewallhttps://urldefense.com/v3/__https://github.com/mewall__;!!Bt8fGhp8LhKGRg!F1c4RqwlaaREOYjgZ0j4W95c_o0Ag0RByMtuByIzL-ALP0ZykBehaudLG0_6w3BothJIZygXte32Wda5HhQNLpsd$ I'm getting a bunch of "maybe-uninitialized" warnings in the code that seem to pertain to the new variable introduced. I wonder if you could do a little polishing to make sure we don't hit any warnings--thanks.

/dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:313:25: warning: ‘dll’ may be used uninitialized in this function [-Wmaybe-uninitialized] 313 | dHH << dhh, dkk, dll; | ^ /dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:251:15: note: ‘dll’ was declared here 251 | int dhh, dkk, dll; | ^~~ /dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:313:19: warning: ‘dkk’ may be used uninitialized in this function [-Wmaybe-uninitialized] 313 | dHH << dhh, dkk, dll; | ^~~ /dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:251:10: note: ‘dkk’ was declared here 251 | int dhh, dkk, dll; | ^~~ /dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:313:9: warning: ‘dhh’ may be used uninitialized in this function [-Wmaybe-uninitialized] 313 | dHH << dhh, dkk, dll; | ~~^~ /dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:251:5: note: ‘dhh’ was declared here 251 | int dhh, dkk, dll; | ^~~ /dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:318: warning: ‘num_laue_mats’ may be used uninitialized in this function [-Wmaybe-uninitialized] 318 | Kokkos::parallel_for( /dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:250:5: note: ‘num_laue_mats’ was declared here 250 | int num_laue_mats; | ^~~~~

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/cctbx/cctbx_project/pull/879*issuecomment-1562146998__;Iw!!Bt8fGhp8LhKGRg!F1c4RqwlaaREOYjgZ0j4W95c_o0Ag0RByMtuByIzL-ALP0ZykBehaudLG0_6w3BothJIZygXte32Wda5HspPo7un$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AA67VEO6VCBRR2DJW3EAOHTXH23PBANCNFSM6AAAAAAYN6AJLY__;!!Bt8fGhp8LhKGRg!F1c4RqwlaaREOYjgZ0j4W95c_o0Ag0RByMtuByIzL-ALP0ZykBehaudLG0_6w3BothJIZygXte32Wda5HiARCJ2d$. You are receiving this because you were mentioned.Message ID: @.***>

mewall commented 1 year ago

@nksauter

Also this is happening in some source code that wasn't touched in the PR...

Can we merge and I can address this as a separate issue?


From: Wall, Michael E Sent: Wednesday, May 24, 2023 8:24:43 PM To: cctbx/cctbx_project; cctbx/cctbx_project Cc: Mention Subject: Re: [EXTERNAL] Re: [cctbx/cctbx_project] Fix scaling of diffuse in diffBragg (PR #879)

@nksauter These are all old variables, I suspect these warnings aren't new? I'll take a look though and see whether there's something to be done.


From: nksauter @.***> Sent: Wednesday, May 24, 2023 7:52:48 PM To: cctbx/cctbx_project Cc: Wall, Michael E; Mention Subject: [EXTERNAL] Re: [cctbx/cctbx_project] Fix scaling of diffuse in diffBragg (PR #879)

@mewallhttps://urldefense.com/v3/__https://github.com/mewall__;!!Bt8fGhp8LhKGRg!F1c4RqwlaaREOYjgZ0j4W95c_o0Ag0RByMtuByIzL-ALP0ZykBehaudLG0_6w3BothJIZygXte32Wda5HhQNLpsd$ I'm getting a bunch of "maybe-uninitialized" warnings in the code that seem to pertain to the new variable introduced. I wonder if you could do a little polishing to make sure we don't hit any warnings--thanks.

/dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:313:25: warning: ‘dll’ may be used uninitialized in this function [-Wmaybe-uninitialized] 313 | dHH << dhh, dkk, dll; | ^ /dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:251:15: note: ‘dll’ was declared here 251 | int dhh, dkk, dll; | ^~~ /dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:313:19: warning: ‘dkk’ may be used uninitialized in this function [-Wmaybe-uninitialized] 313 | dHH << dhh, dkk, dll; | ^~~ /dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:251:10: note: ‘dkk’ was declared here 251 | int dhh, dkk, dll; | ^~~ /dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:313:9: warning: ‘dhh’ may be used uninitialized in this function [-Wmaybe-uninitialized] 313 | dHH << dhh, dkk, dll; | ~~^~ /dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:251:5: note: ‘dhh’ was declared here 251 | int dhh, dkk, dll; | ^~~ /dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:318: warning: ‘num_laue_mats’ may be used uninitialized in this function [-Wmaybe-uninitialized] 318 | Kokkos::parallel_for( /dev/shm/sauter/sim/modules/cctbx_project/simtbx/diffBragg/src/diffBragg_kokkos_kernel.cpp:250:5: note: ‘num_laue_mats’ was declared here 250 | int num_laue_mats; | ^~~~~

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/cctbx/cctbx_project/pull/879*issuecomment-1562146998__;Iw!!Bt8fGhp8LhKGRg!F1c4RqwlaaREOYjgZ0j4W95c_o0Ag0RByMtuByIzL-ALP0ZykBehaudLG0_6w3BothJIZygXte32Wda5HspPo7un$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AA67VEO6VCBRR2DJW3EAOHTXH23PBANCNFSM6AAAAAAYN6AJLY__;!!Bt8fGhp8LhKGRg!F1c4RqwlaaREOYjgZ0j4W95c_o0Ag0RByMtuByIzL-ALP0ZykBehaudLG0_6w3BothJIZygXte32Wda5HiARCJ2d$. You are receiving this because you were mentioned.Message ID: @.***>

nksauter commented 1 year ago

@mewall as you like.