External Email - Use Caution        

Hi,

 

Just for the sake of completeness, you were right, and increasing the RAM available for the wsl to 32GB solved the problem.

 

Thank you very much,

Giuseppe

 

From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> On Behalf Of fsbuild
Sent: 08 February 2025 15:06
To: freesurfer@nmr.mgh.harvard.edu
Subject: [EXTERNE-EMAIL] Re: [Freesurfer] [EXTERNE-EMAIL] Re: mri_synthSR on a virtual machine. Graph execution error

 

EXTERNE-EMAIL:
Klicken Sie nicht auf Links oder öffnen Sie keine Anhänge! Es sei denn, Sie kennen den Absender und wissen, dass der Inhalt sicher ist.

 

        External Email - Use Caution        



Sorry I did not see this before, but the message OOM means that you are out of memory, i.e., you need to allocate more memory for WSL to use from the Windows host in order for tensor processing in mri_synthsr to work.  Offhand I don’t know how that is done in WSL, but I suggest that between physical and/or virtual RAM, you end up allocating at least 32G of memory to the WSL VM running Ubuntu Linux.

 

-R.

 



On Feb 8, 2025, at 05:06, Zito Giuseppe <giuseppe.zito@paraplegie.ch> wrote:

 

        External Email - Use Caution        

 

Thank you for your comment.

 

I did as you suggested: I first uninstalled freesurfer 7.4.1 and then installed the beta 8.0.0.

The installation was successful, but the problem remained, with the same error message.

 

Does any other solution come to your mind?

 

Thank you again,

Giuseppe

 

From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> On Behalf Of fsbuild
Sent: 08 February 2025 02:39
To: freesurfer@nmr.mgh.harvard.edu
Subject: [EXTERNE-EMAIL] Re: [Freesurfer] mri_synthSR on a virtual machine. Graph execution error

 

EXTERNE-EMAIL:
Klicken Sie nicht auf Links oder öffnen Sie keine Anhänge! Es sei denn, Sie kennen den Absender und wissen, dass der Inhalt sicher ist.

 

        External Email - Use Caution        

 

I would try using the recent freesurfer 8.0.0 beta release package installer which you can download from,


The links for those are at the top of the page.

I would first uninstall the current freesurfer package, e.g.
$ sudo apt remove freesurfer

.... and then install the .deb package for the 8.0.0 beta release

- R.


On 2/7/25 03:27, Zito Giuseppe (giuseppe.zito@paraplegie.ch) wrote:

        External Email - Use Caution        

Dear experts,

 

I just installed freesurfer on a windows virtual machine. It is a windows virtual machine, in the sense that I have a windows machine, on which is installed a virtual windows machine, in which is installed Ubuntu with WSL2 (nested virtual machine).

I have then installed FreeSurfer by following the instructions on this page

 

When I tried to use mri_synthsr to convert a Flair image into a T1, I get the following error. No T1 file is then generated.

Does anyone have an idea of what could go have gone wrong?

 

Thank you very much,

Giuseppe

 

My command line

mri_synthsr --i 3D_FLAIR.nii --o 3D_T1converted.nii

 

 

Output from the software

Using general model from January 2023 (version 2)

/usr/local/freesurfer/7.4.1/models/synthsr_v20_230130.h5

using 1 thread

predicting 1/1

Prediction without flipping

 

the following problem occured when predicting output for image /mnt/c/AIR_Software/SynthSR/3D_FLAIR.nii :

Graph execution error:

 

Detected at node 'unet/unet_merge_8/concat' defined at (most recent call last):

    File "/usr/local/freesurfer/7.4.1/python/scripts/mri_synthsr", line 1227, in <module>

      main()

    File "/usr/local/freesurfer/7.4.1/python/scripts/mri_synthsr", line 88, in main

      predict(

    File "/usr/local/freesurfer/7.4.1/python/scripts/mri_synthsr", line 151, in predict

      pred1 = np.squeeze(net.predict(image))

    File "/usr/local/freesurfer/7.4.1/python/lib/python3.8/site-packages/keras/utils/traceback_utils.py", line 65, in error_handler

      return fn(*args, **kwargs)

    File "/usr/local/freesurfer/7.4.1/python/lib/python3.8/site-packages/keras/engine/training.py", line 2382, in predict

      tmp_batch_outputs = self.predict_function(iterator)

    File "/usr/local/freesurfer/7.4.1/python/lib/python3.8/site-packages/keras/engine/training.py", line 2169, in predict_function

      return step_function(self, iterator)

    File "/usr/local/freesurfer/7.4.1/python/lib/python3.8/site-packages/keras/engine/training.py", line 2155, in step_function

      outputs = model.distribute_strategy.run(run_step, args=(data,))

    File "/usr/local/freesurfer/7.4.1/python/lib/python3.8/site-packages/keras/engine/training.py", line 2143, in run_step

      outputs = model.predict_step(data)

    File "/usr/local/freesurfer/7.4.1/python/lib/python3.8/site-packages/keras/engine/training.py", line 2111, in predict_step

      return self(x, training=False)

    File "/usr/local/freesurfer/7.4.1/python/lib/python3.8/site-packages/keras/utils/traceback_utils.py", line 65, in error_handler

      return fn(*args, **kwargs)

    File "/usr/local/freesurfer/7.4.1/python/lib/python3.8/site-packages/keras/engine/training.py", line 558, in __call__

      return super().__call__(*args, **kwargs)

    File "/usr/local/freesurfer/7.4.1/python/lib/python3.8/site-packages/keras/utils/traceback_utils.py", line 65, in error_handler

      return fn(*args, **kwargs)

    File "/usr/local/freesurfer/7.4.1/python/lib/python3.8/site-packages/keras/engine/base_layer.py", line 1145, in __call__

      outputs = call_fn(inputs, *args, **kwargs)

    File "/usr/local/freesurfer/7.4.1/python/lib/python3.8/site-packages/keras/utils/traceback_utils.py", line 96, in error_handler

      return fn(*args, **kwargs)

    File "/usr/local/freesurfer/7.4.1/python/lib/python3.8/site-packages/keras/engine/functional.py", line 512, in call

      return self._run_internal_graph(inputs, training=training, mask=mask)

    File "/usr/local/freesurfer/7.4.1/python/lib/python3.8/site-packages/keras/engine/functional.py", line 669, in _run_internal_graph

      outputs = node.layer(*args, **kwargs)

    File "/usr/local/freesurfer/7.4.1/python/lib/python3.8/site-packages/keras/utils/traceback_utils.py", line 65, in error_handler

      return fn(*args, **kwargs)

    File "/usr/local/freesurfer/7.4.1/python/lib/python3.8/site-packages/keras/engine/base_layer.py", line 1145, in __call__

      outputs = call_fn(inputs, *args, **kwargs)

    File "/usr/local/freesurfer/7.4.1/python/lib/python3.8/site-packages/keras/utils/traceback_utils.py", line 96, in error_handler

      return fn(*args, **kwargs)

    File "/usr/local/freesurfer/7.4.1/python/lib/python3.8/site-packages/keras/layers/merging/base_merge.py", line 196, in call

      return self._merge_function(inputs)

    File "/usr/local/freesurfer/7.4.1/python/lib/python3.8/site-packages/keras/layers/merging/concatenate.py", line 134, in _merge_function

      return backend.concatenate(inputs, axis=self.axis)

    File "/usr/local/freesurfer/7.4.1/python/lib/python3.8/site-packages/keras/backend.py", line 3581, in concatenate

      return tf.concat([to_dense(x) for x in tensors], axis)

Node: 'unet/unet_merge_8/concat'

OOM when allocating tensor with shape[1,192,256,256,72] and type float on /job:localhost/replica:0/task:0/device:CPU:0 by allocator mklcpu

         [[{{node unet/unet_merge_8/concat}}]]

Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info. This isn't available when running in Eager mode.

[Op:__inference_predict_function_2117]

 

resuming program execution

 




_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is addressed.  If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://www.massgeneralbrigham.org/complianceline <MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://www.massgeneralbrigham.org/complianceline> .
Please note that this e-mail is not secure (encrypted).  If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately.  Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail. 

 

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer