External Email - Use Caution        

 Please check it works to run the tensorflow package in the included 
freesurfer python distribution.  The steps to follow below are from using 
the 8.0.0 beta release installed on an M2 Mac with 32GB RAM running MacOS 
Sonoma (14.7.2).
… run bash shell and setup the freesurfer environment ...
% bash
The default interactive shell is now zsh.To update your account to use zsh, 
please run `chsh -s /bin/zsh`.For more details, please visit 
https://secure-web.cisco.com/1eM-n7fMXyTM4YjRyi_nmd00sm5zT6-WOTucjerTe2ffqj5_PusQ34xydQT8QB1Sysn46dA2UgYHRXfiYmX63DeiTpqgpQBiggGLeyJbEQbll2bPLiK6GkmxGd7Ed1PDbQuIzGul6cH2z_ypd0csiHd4nrC9JPRSl1YCuaLcAnkTINARmjD3FG4EQAU4letjVoU5A-5SUnfks-R5MvPx2fKdjFfDlcdjc6zSDykOiXuZSkw6iHN-WUsbG4kVGl0FQ-yeyFrgePzlr7ZR6kuj2q-lHM80G8bmbnwHRJg8KOphmDrzE87aHYlSLqA-kO21hUv4q1vdzAsCp9sCHMAm1tw/https%3A%2F%2Fsupport.apple.com%2Fkb%2FHT208050.%24%26nbsp;export
 FREESURFER_HOME=/Applications/freesurfer/8.0.0-beta$ source 
$FREESURFER_HOME/SetUpFreeSurfer.sh-------- 
freesurfer-macOS-darwin_arm64-8.0.0-beta-20241103-b8aacdc --------Setting up 
environment for FreeSurfer/FS-FAST (and FSL)FREESURFER_HOME   
/Applications/freesurfer/8.0.0-beta/FSFAST_HOME       
/Applications/freesurfer/8.0.0-beta//fsfastFSF_OUTPUT_FORMAT nii.gzSUBJECTS_DIR 
     /Applications/freesurfer/8.0.0-beta//subjectsMNI_DIR   
        /Applications/freesurfer/8.0.0-beta//mni
… unless you installed something extra on the machine, there should only be a 
python3 installed on the system and it should not have a tensorflow package 
installed …
$ which python$ which python2$ which python3/usr/bin/python3
… run the default python3 on the system interactively and check there is no 
tensorflow package there …
$ python3Python 3.9.6 (default, May  7 2023, 23:32:44) [Clang 
14.0.3 (clang-1403.0.22.14.1)] on darwinType "help", "copyright", "credits" or 
"license" for more information.>>> import tensorflowTraceback 
(most recent call last):  File "<stdin>", line 1, in 
<module>ModuleNotFoundError: No module named 
'tensorflow'>>> ^D          <—— type 
Ctrl D to exit
… check it works to import and run a test with tensorflow in the python 
provided with the freesurfer distribution - see attached test.py file to run on 
the command line …
$ which fspython/Applications/freesurfer/8.0.0-beta//bin/fspython
… run fspython interactively and check tensorflow is version 2..13.0 ...
$ fspythonPython 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 
06:05:16) [Clang 12.0.1 ] on darwinType "help", "copyright", "credits" or 
"license" for more information.>>> import sys, 
os>>> import tensorflow as 
tf>>> tf.__version__'2.13.0'>>> ^D     
     <—— type Ctrl D to exit
… run the attached test.py script and check for output similar to what's listed 
below.  Your output may not be exactly the same but the important thing is 
for the script to exit with status=0 …
$ fspython  test.py2025-01-07 21:45:14.349299: I 
metal_plugin/src/device/metal_device.cc:1154] Metal device set to: Apple M2 
Pro2025-01-07 21:45:14.349321: I metal_plugin/src/device/metal_device.cc:296] 
systemMemory: 32.00 GB2025-01-07 21:45:14.349325: I 
metal_plugin/src/device/metal_device.cc:313] maxCacheSize: 10.67 GB2025-01-07 
21:45:14.349366: I 
tensorflow/core/common_runtime/pluggable_device/pluggable_device_factory.cc:269]
 Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 0 
MB memory) -> physical PluggableDevice (device: 0, name: METAL, pci bus id: 
<undefined>)2025-01-07 21:45:14.383371: I 
tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:375] MLIR V1 
optimization pass is not enabled2025-01-07 21:45:14.383950: I 
tensorflow/core/grappler/optimizers/custom_graph_optimizer_registry.cc:114] 
Plugin optimizer for device_type GPU is enabled.30.0
…. check the returned status=0 …
$ echo $?0
… If the above succeeded, then tensorflow should run and you should try your 
recon-all command again. But on MacOS for the 8.0.0 beta, you need to set the 
environment variable FS_ALLOW_DEEP in order for recon-all to work,
$ export FS_ALLOW_DEEP=1… run your recon-all command again …
- R.

On Jan 7, 2025, at 18:29, Kayla Bohlke <kayla.boh...@barrowneuro.org> 
wrote:        External Email - Use 
Caution        Yes, that is the version 
I used. From: fsbuild <fsbu...@contbay.com>
Date: Tuesday, January 7, 2025 at 4:20 PM
To: freesur...@nmr.mgh.harvard..edu <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] Compatibility with M4 processor? Did you 
try installing the arm64 package for Macs with M1-M4 processors from this 
download link 
?https://secure-web.cisco.com/1OOjVZiPsB9ymKAm1p508oOzwSq06id_KmFFxJfnwRDtY7yETjt4qjMoo4la3FbCsg3Eiw3D8XwHzRDrgtlnToWusCsza8q79Xt29GHQQEAYNVGsd7HUJhWP08BwgZkFpQGbH2zMOWyYac5acakG9RkxDJcLefQ75OOXELtOC7eyzWy3CtZSAz3O8uj72xg-v_fI8Kogzo7Abbt1KGmT9UH2iO1PK4yV-H_O6SAeGzmfMHnhDIVOXuRxWb_qtLy5tDoVkkFsywHaC6juEvOcM-dHus0I9xR9_FWlMBidrhyOmpq9R2ahMP-xtSJM1BLEk7EZv3Bj5fW72QR6HifmNdA/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Fpub%2Fdist%2Ffreesurfer%2F8.0.0-beta%2Ffreesurfer-macOS-darwin_arm64-8.0.0-beta.pkgI
 would first uninstall what is already there with the provided script via the 
command, $ sudo bash $FREESURFER_HOME/uninstall.sh - R.

On Jan 7, 2025, at 15:41, Kayla Bohlke <kayla..boh...@barrowneuro.org> 
wrote:         External Email - 
Use Caution         Hello, I 
recently have been trying to use the 8.0.0-beta version on my mac which has an 
M4 processor. I have been trying to run recon-all but after a couple of minutes 
get the following error during the mri_synthseg function: “The TensorFlow 
library was compiled to use AVX instructions, but these aren't available on 
your machine.” The TensorFlow package downloaded does not seem to be 
compatible the M4 processor, it seems to be only setup for Intel processors? 
Has anyone had this issue before and solved it? Would I be better off going 
back a version to the 7.4.1 release? Is FreeSurfer just not ready for 
M4? Thanks,Kayla_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" 
claiming to 
behttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer _______________________________________________Freesurfer
 mailing 
listfreesur...@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Attachment: test.py
Description: Binary data

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
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 https://www.massgeneralbrigham.org/complianceline 
<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. 

Reply via email to