Closed zehrea closed 3 years ago
Hi Elena,
This is appears to be from using a different version MCR compared to the version used to compile the release. Since you are using 1.1.5 it was compiled against MATLAB 2020b (v99 - MCR 9.9), but then the MCR used here is 9.1.
I think I have in the documentation to use the 2017a MCR, but that is for all versions before 1.1.5. 1.1.5 is the latest, but not as stable as 1.1.4: https://github.com/DustinMorado/subTOM/releases/tag/v1.1.4
So the two options to fix would be:
Hope that solves your issue, but if not please let me know.
Thanks Dustin,
I will try that and let you know. Elena
Hi Dustin,
Same issue. I tried both to reinstall subTOM v 1.1.4 agains v91 MRC and subTOM v 1.1.5 agains v99 MRC
Loading Matlab 2020b on cn3176 [zehrea@cn3176 subTOM-1.1.5]$ ./scripts/subtom_average.sh Options sourced!
STARTING Averaging - Iteration: 1
STATUS Update: Averaging - Iteration: 1
0 parallel sums out of 1
ERROR Update: Averaging - Iteration: 1
/data/zehrea/data/cryo_data/TOMOGRAPHY/2021-04-12/mdoc/ANALYSIS/reconstruction/subTOM-1.1.5/bin/alignment/subtom_parallel_sums: error while loading shared libraries: libmwmclmcrrt.so.9.1: cannot open shared object file: No such file or directory
LOG Update: Averaging - Iteration: 1
STATUS Update: Averaging - Iteration: 1
0 parallel sums out of 1
module load matlab/2016b [+] Loading Matlab 2016b on cn3176 [zehrea@cn3176 subTOM-1.1.4]$ ./scripts/subtom_average.sh Options sourced!
STARTING Averaging - Iteration: 0
STATUS Update: Averaging - Iteration: 0
0 parallel sums out of 10
ERROR Update: Averaging - Iteration: 0
Invalid MEX-file '/gpfs/gsfs11/users/zehrea/data/cryo_data/TOMOGRAPHY/2021-04-12/mdoc/ANALYSIS/reconstruction/subTOM-1.1.4/mcr/subTOM_parallel_sums_1/.mcrCache9.1/subtom0/net/bstore1/bstore1/briggsgrp/EMBL/software/tom/Sptrans/tom_rotatec.mexa64': libstdc++.so.5: cannot open shared object file: No such file or directory. Error in tom_rotate (line 83)
Error in subtom_parallel_sums (line 374) MATLAB:mex:ErrInvalidMEXFile
LOG Update: Averaging - Iteration: 0
STATUS Update: Averaging - Iteration: 0
0 parallel sums out of 10
Hello, I am working with Elena to try to resolve this issue. In my view the specific error we are having (with both 1.1.4 and 1.1.5) is:
tom_rotatec.mexa64': libstdc++.so.5: cannot open shared object file: No such file or directory.
So that library and specific mex file has a date of April 2007, so the question is whether the mex files were compiled on your end sometime ago. That would explain why the mex files do not work on our end? Are those mex files downloaded at runtime or do they reside somewhere in the original cloned github repo?
Thanks for your help!
Just to clarify: Is there a third-party toolbox (TOM toolbox) that you use in your scripts that we can download ourselves and try to compile to mex? If so, please let us know (and send link if possible) so that we can do so. Thanks again!
Hi Elena and Antonio,
The TOM toolbox I use is available from here: https://github.com/dtegunov/tom and yes the compiled MEX bits should be quite old, so perhaps recompiling them will fix the libstdc++ version error. Let me know if not. Could you also give me some system details a la uname -a? Then I can try to emulate the error here and also look for a solution.
Thanks Dustin, we will take a look at the TOM toolbox and attempt to re-compile if needed.
Another question: are the mex files, e.g., tom_rotatec,mexa64 put into place at runtime? If so, which script does that? I am just starting with running "./scripts/subtom_average.sh" after re-compiling tom_rotatec.c and put it into place. However, when subtom_average.sh runs, it replaces the newly compiled mex file with the old one. Are those old mex files located somewhere in the repository or are they downloaded at runtime? Thanks again!
@ulloaa Yes I believe the they should be put by the MCR at runtime. The MCR should handle all of these bits though, nothing in my source. However perhaps when I compile the executables and they are linked against the tom library what I would worry about is the tom_rotatec.mexw64 name being linked and then complaining if only the tom_rotatec.mexa64 is available.
However on my end, I recompiled the tom_rotatec.c and deleted the tom_rotatec.mexw64 and was still able to correctly use tom_rotate from within Matlab, so it should be working.
Dynamic library link paths are the only thing handled by the scripts with the LD_LIBRARY_PATH environment variable however I never need to place paths to TOM toolbox in this variable. If you still have issues, I can recompile the version against my now updated TOM which I forked and updated here https://github.com/dustinmorado/tom
Sorry for the delay, for some reason Github did not notify me of your follow up. I think my work email can be found fairly easily online though, if there is more than a few days between responses. I no longer work in John Briggs' lab at the LMB however, and now work in the Swedish National Cryo-EM Facility at SciLifeLab in Stockholm.
Thanks for the response @DustinMorado. I have been trying to figure out a way to insert the new mex files; however, I am still having issues. If you are able to recompile against TOM and upload to github that would be great! Thanks again.
Hi @ulloaa, I recomplied against a corrected tom_rotate and on my Ubuntu 20.04 system it works. I compiled this time with R2021b (v911 MCR) sorry for the change in MCR again, but I don't control my MATLAB updates.
I also had to make some changes in the tom_rotatec function to work with the newer MATLAB versions + MEX, so I pushed those changes to my tom fork as well, but now I added to just pull the my tom repo fork into a new subTOM/lib folder in the installation to simplify building for other users.
Hope all of this helps get it up and running finally.
Thanks for your help @DustinMorado: we have re-compiled as well on our end and subtom is up and running!
Hello,
We cannot figure out why we getting the error below about the MEX-file. We installed Subtomogram to run on a linux machine. How do we fix the issue.
./scripts/subtom_average.sh Options sourced!
STARTING Averaging - Iteration: 1
STATUS Update: Averaging - Iteration: 1
biowulf.nih.gov
ERROR Update: Averaging - Iteration: 1
Invalid MEX-file '/gpfs/gsfs11/users/zehrea/data/cryo_data/TOMOGRAPHY/2021-04-12/mdoc/ANALYSIS/reconstruction/subTOM-1.1.5/mcr/subTOM_parallel_sums_1/.mcrCache9.1/subtom0/net/bstore1/bstore1/briggsgrp/EMBL/software/tom/Sptrans/tom_rotatec.mexa64': libstdc++.so.5: cannot open shared object file: No such file or directory. Error in tom_rotate (line 83)
Error in subtom_parallel_sums (line 374) MATLAB:mex:ErrInvalidMEXFile
Thanks, Elena