functional-neuroimaging / rsfMRI-preprocessing

Use this code to preprocess and denoise your resting state fMRI time-series. Marco
2 stars 1 forks source link

antsRegistration core usage #4

Closed edeguzman closed 1 year ago

edeguzman commented 2 years ago

It seems that the default mode of antsRegistration is to use all cores available, which is inconvenient if more than 1 person is trying to work on the same workstation (and we want to tightly control the number of cores each person uses). It looks like "ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS" can be specified in order to set the number of threads. Is it possible to add setting of this variable to the registration script so we can control the max number of threads? @marcopagani-brainconnectivity, can we look into this?

marcopagani-brainconnectivity commented 2 years ago

Yes, that is the way to go when multiple users share the same workstation or server

From: Elizabeth de Guzman @.> Sent: Thursday, August 11, 2022 6:01 AM To: functional-neuroimaging/rsfMRI-preprocessing @.> Cc: Marco Pagani @.>; Mention @.> Subject: [functional-neuroimaging/rsfMRI-preprocessing] antsRegistration core usage (Issue #4)

It seems that the default mode of antsRegistration is to use all cores available, which is inconvenient if more than 1 person is trying to work on the same workstation (and we want to tightly control the number of cores each person uses). It looks like "ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS" can be specified in order to set the number of threads. Is it possible to add setting of this variable to the registration script so we can control the max number of threads? @marcopagani-brainconnectivityhttps://es.sonicurlprotection-fra.com/click?PV=2&MSGID=202208111001300209036&URLID=3&ESV=10.0.16.7295&IV=301BA40F54EB28DF724BCDC0FFE301A9&TT=1660212091735&ESN=mYypPXqPxzyeBC%2FNydmMlkEaNIbKatp1M0lXQdYC2W8%3D&KV=1536961729280&B64_ENCODED_URL=aHR0cHM6Ly9naXRodWIuY29tL21hcmNvcGFnYW5pLWJyYWluY29ubmVjdGl2aXR5&HK=ABE83B49C4BCBB47A35E3711A07E4220914F53AF6BE167449F05F76212B4618F, can we look into this?

— Reply to this email directly, view it on GitHubhttps://es.sonicurlprotection-fra.com/click?PV=2&MSGID=202208111001300209036&URLID=2&ESV=10.0.16.7295&IV=043791543B85AAD6FE9438A75AABE6D0&TT=1660212091734&ESN=no%2BjYK%2F9fdi1shmPvRkECj6QvnXGlC4HwlgK3zOVFng%3D&KV=1536961729280&B64_ENCODED_URL=aHR0cHM6Ly9naXRodWIuY29tL2Z1bmN0aW9uYWwtbmV1cm9pbWFnaW5nL3JzZk1SSS1wcmVwcm9jZXNzaW5nL2lzc3Vlcy80&HK=3DB29DAC156C57EFD65B4A617917CC8594227ABE4C4E264B394079012061C108, or unsubscribehttps://es.sonicurlprotection-fra.com/click?PV=2&MSGID=202208111001300209036&URLID=1&ESV=10.0.16.7295&IV=B83F316391B389F64B3B401A72C93B2F&TT=1660212091734&ESN=xpxcGoGElfaPNkWT%2BhTqa5d7Y6JS%2FcZ0Tu%2BCVl0WUFQ%3D&KV=1536961729280&B64_ENCODED_URL=aHR0cHM6Ly9naXRodWIuY29tL25vdGlmaWNhdGlvbnMvdW5zdWJzY3JpYmUtYXV0aC9BSlVRQVRDVVRXMlJTWk1JNUw1WUxOM1ZZVEZQVEFOQ05GU001NkhTQ0U3UQ&HK=DBDF667D557D1056B2A13C6249EC9814F2AF89BD1D79F2AEAD268C1B3B09A505. You are receiving this because you were mentioned.Message ID: @.**@.>>

edeguzman commented 2 years ago

Great. Are you going to implement this, @marcopagani-brainconnectivity? Let me know if you need help testing.

silvia-gini commented 1 year ago

Hi, we found this discussion helpful to solve the issue: https://sourceforge.net/p/advants/discussion/840260/thread/05a5a703/ . Adding at the top of the script outside the function allows you to set the number of threads called by antsRegistration:

export ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=2