External Email - Use Caution
The .mexa64 file is a matlab shared library and that error is from the linker saying it is not allowed to link in that library. Note that it did not say there was a permission denied error or that the .mexa64 file could not be found. This Mathworks posting indicates that error can happen on systems when SElinux security is enabled, https://secure-web.cisco.com/1mMj5et2sBrHqKCyLNcFSpIV6dYytw3Jjg5sIR39GiUNHHPnrtOKwUu-gcw5etH2ClGjaNPInsGExmK-Vz18vxL4rGx4t5v-Jd7gBHQ6LW-9YWNsicTT9AoG6xAFTNA2gLjum9n0chLic7WrYVY1okoQIe3m4dlv2jgmT8IojeSyL5ptFQHlSWO8TvkTM_cD-i0D2LhOqG9JHiDHd62b_OSWESuf8qiXmXXu-_FNz5-g324XCjQ8zCYAKC5ORse12Ee2sR7gXY7v0l00LQbuFXNYByV8IAH9t_unyhr3AbglMSQe11LBhfdwO66QfmKYInKL6I_NFTPvzDRKS5GMXiw/https%3A%2F%2Fwww.mathworks.com%2Fmatlabcentral%2Fanswers%2F103108-why-do-i-get-an-error-when-running-the-mex-file-from-a-non-standard-location-on-selinux This part of LD_LIBRARY_PATH looks like the standard setting after running fs_install_mcr script with the Matlab runtime environment installed in the freesurfer distribution. I'm assuming accessing MALAB runtime environment this way is already known to work on your cluster and does not generate any run time linker errors. LD_LIBRARY_PATH is .:/usr/local/freesurfer/7.1.1//MCRv84//runtime/glnxa64:/usr/local/freesurfer/7.1.1//MCRv84//bin/glnxa64:/usr/local/freesurfer/7.1..1//MCRv84//sys/os/glnxa64:/usr/local/freesurfer/7.1.1//MCRv84//sys/java/jre/glnxa64/jre/lib/amd64/native_threads:/usr/local/freesurfer/7.1.1//MCRv84//sys/java/jre/glnxa64/jre/lib/amd64/server:/usr/local/freesurfer/7.1.1//MCRv84//sys/java/jre/glnxa64/jre/lib/amd64/client:/usr/local/freesurfer/7.1.1//MCRv84//sys/java/jre/glnxa64/jre/lib/amd64:/usr/local/freesurfer/7.1.1//lib/vtk/lib - but the path to that .mexa64 file is not part of the standard LD_LIBRARY_PATH settings and looks like it is on some temporary mount point, /tmp/MCR_65032579/.mcrCache8.4/segmen0/autofs/space/panamint_005/users/iglesias/software/freesurfer.GEMS2.terrier/bin/kvlGEMSMatlab.mexa64': /tmp/MCR_65032579/.mcrCache8.4/segmen0/autofs/space/panamint_005/users/iglesias/software/freesurfer.GEMS2.terrier/bin/kvlGEMSMatlab.mexa64 - so I'm guessing there is some system and/or security setting that does not allow loading 3rd party libraries from paths like that. I would ask your IT folks about it. I could be wrong, but if kvlGEMSMatlab.mexa64 needed to be re-compiled to run on your system, then I would expect to see a different error. -R. On 6/27/23 22:08, Mengjie Huang (mhua0...@uni.sydney.edu.au) wrote: Invalid MEX-file '/tmp/MCR_65032579/.mcrCache8.4/segmen0/autofs/space/panamint_005/users/iglesias/software/freesurfer.GEMS2.terrier/bin/kvlGEMSMatlab.mexa64' : failed to map segment from shared object: Operation not permitted
_______________________________________________ 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.