StochasticAnalytics / emClarity

GNU Lesser General Public License v3.0
40 stars 6 forks source link

Question for installation #167

Closed jinxsfe closed 4 months ago

jinxsfe commented 5 months ago

Hi, I had seen the installation requirement must linux and MAC, can I install via virtual BOX or openVZ something like that? or Ubuntu

bHimes commented 5 months ago

3d image analysis is computationally expensive. Virtualization, has historically anyway, added abstraction layers over the hardware that impedes efficiency, especially gpu drivers.

That said, I know wsl2 on windows has gotten better, so maybe? If you are doing any real processing, you'll probably need to be on a server which will likely be running Linux anyway.

You can always try and see!

jinxsfe commented 4 months ago

Hi, I use original linux system to install it, but there still shown the error, can you give me some advice? whole element was attached the document image

emClarity running guide.odt I create the

nano ~/emclarity_wrapper.sh

!/bin/bash

Back up the current LD_LIBRARY_PATH

ORIGINAL_LD_LIBRARY_PATH=$LD_LIBRARY_PATH

Set LD_LIBRARY_PATH for emClarity

export LD_LIBRARY_PATH=/home/js22bp/matlab_install/matlab-2020b/v96/runtime/glnxa64:/home/js22bp/matlab_install/matlab-2020b/v96/bin/glnxa64:/home/js22bp/matlab_install/matlab-2020b/v96/sys/os/glnxa64:/home/js22bp/matlab_install/matlab-2020b/v96/extern/bin/glnxa64:$LD_LIBRARY_PATH

Run emClarity

/home/js22bp/cryo/emClarity_1.5.3.11/bin/emClarity_1_5_3_11 $@

Restore the original LD_LIBRARY_PATH

export LD_LIBRARY_PATH=$ORIGINAL_LD_LIBRARY_PATH

my own environment variable is image

jinxsfe commented 4 months ago

@bHimes

bHimes commented 4 months ago

This looks like it is failing because you are not passing any args to your wrapper. You shouldn't even be writing a wrapper though. When you downloaded emClarity, you should have in your bin a binary emClarity_maj_minor_bug and a wrapper generated when I compile emC named: emClarity_maj_minor_bug_v20b. (major/minor/bug will be numbers and the v20b will correspond to the Matlab MCR version required**


export LD_LIBRARY_PATH=/home/js22bp/matlab_install/matlab-2020b/v96/runtime/glnxa64:/home/js22bp/matlab_install/matlab-2020b/v96/bin/glnxa64:/home/js22bp/matlab_install/matlab-2020b/v96/sys/os/glnxa64:/home/js22bp/matlab_install/matlab-2020b/v96/extern/bin/glnxa64:$LD_LIBRARY_PATH

Run emClarity

You don't want to modify your LD_LIBRARY_PATH, instead, add those matlab/mcr paths to your emClarity_maj_minor_bug_v20b wrapper near the top, also setting emClarity_root

#!/bin/bash

# When this script is invoked, record the PID so that the EMC_tmpDir is deleted
# even in the event of a crash. (With program script added from EMC_tmpDir.sh)
thisPID=$$

# Note you no longer need to modify this line inside the singularity container:
MCR_BASH=/home/js22bp/matlab_install/matlab-2020b/v96/runtime/glnxa64:/home/js22bp/matlab_install/matlab-2020b/v96/bin/glnxa64:/home/js22bp/matlab_install/matlab-2020b/v96/sys/os/glnxa64:/home/js22bp/matlab_install/matlab-2020b/v96/extern/bin/glnxa64MATLAB/R2023a/bin/glnxa64:/sa_shared/software/matlab2023/MATLAB/R2023a/sys/os/glnxa64

#Please modify this line to point to the install for emClarity binary
export emClarity_ROOT=export emClarity_ROOT=/home/js22bp/cryo/emClarity_1.5.3.11
jinxsfe commented 4 months ago

I use 1.5.3.11 and try to find the file that you mentioned, and the file name is emClarity_1_5_3_11_v19a, which located at image and I try run the command as the true route, but still dont find the emclarity when I type emClarity check, the code is list below:

MCR_BASH=/groups/grigorieff/home/himesb/thirdParty/MATLAB_19a/runtime/glnxa64:/groups/grigorieff/home/himesb/thirdParty/MATLAB_19a/bin/glnxa64:/groups/grigorieff/home/himesb/thirdParty/MATLAB_19a/sys/os/glnxa64

MCR_BASH=/home/js22bp/matlab_install/matlab-2020b/v96/runtime/glnxa64:/home/js22bp/matlab_install/matlab-2020b/v96/bin/glnxa64:/home/js22bp/matlab_install/matlab-2020b/v96/sys/os/glnxa64:/home/js22bp/matlab_install/matlab-2020b/v96/extern/bin/glnxa64

Please modify this line to point to the install for emClarity binary

emClarity_ROOT=${HOME}/emC_builds

export emClarity_ROOT=/home/js22bp/cryo/cryo/emClarity_1.5.3.11 export LD_LIBRARY_PATH=${emClarity_ROOT}/lib:${MCR_BASH}:${LD_LIBRARY_PATH}

This is added in the middle of the emClarity run script. It does the following.

1 - check for temporary file systems so that some disk i/o can instead be kept in memory.

2 - minimally the MCR_CACHE_ROOT is set there (formerly .mcrCarch_9.3 which is default)

This avoids the problem where parallel pools are dying due to either slow filesystems

or conflicts with other parpools from competing nodes.

3 - Fall back to $TMPDIR or /tmp if no tmpfs is found.

4 - Some emClarity funcitons will use this space too iff there is enough memory available.

Note that the mem avail is queried at runtime, so this could be a problem TODO

################################################################################ ################################################################################

NEW section to automatically create and delete a tmp cache dir.

Default to /tmp if the following doesn't workspace

jinxsfe commented 4 months ago

@bHimes

jinxsfe commented 4 months ago

!/bin/bash

When this script is invoked, record the PID so that the EMC_tmpDir is deleted

even in the event of a crash. (With program script added from EMC_tmpDir.sh)

thisPID=$$

Note you no longer need to modify this line inside the singularity container:

MCR_BASH=/home/js22bp/matlab_install/matlab-2020b/v96/runtime/glnxa64:/home/js22bp/matlab_install/matlab-2020b/v96/bin/glnxa64:/home/js22bp/matlab_install/matlab-2020b/v96/sys/os/glnxa64:/home/js22bp/matlab_install/matlab-2020b/v96/extern/bin/glnxa64MATLAB/R2023a/bin/glnxa64:/sa_shared/software/matlab2023/MATLAB/R2023a/sys/os/glnxa64

as you provide code above, I am confused :/home/js22bp/matlab_install/matlab-2020b/v96/extern/bin/glnxa64MATLAB/R2023a/bin/glnxa64:/sa_shared/software/matlab2023/MATLAB/R2023a/sys/os/glnxa64, do I need this part? I dont have matlab2023a for my linux system, besides that,

there is double export command export emClarity_ROOT=export emClarity_ROOT=/home/js22bp/cryo/emClarity_1.5.3.11

jinxsfe commented 4 months ago

@bHimes

bHimes commented 4 months ago

It looks like you need some help using basic linux skills.

I don't think you added emClarity to your PATH or alternatively made an alias for emClarity. But I can't quite tell because your comments are formatted in a very "shouting" font.

Please only submit one response at a time. I just got 6 emails from you.

Please use the "preview" tab on the comment box to see what you are producing when GitHub parses your markdown.

Please try to get some help from someone in your department. I can't be an intro to Linux tutor.

jinxsfe commented 4 months ago

I am sorry that my comment make you confusing , and I didn't realize that the format for text like attitude towards for personal, I am very very sorry. I had obey your guide and fill the root for emClarity, which is like below image but result is not good even I ask help for someone who is good for linux, he also don't know how to run successful for emClarity. we run like image

we are reinstall and obey the process for instructions @bHimes

Thanks for your help, appreciate!

bHimes commented 4 months ago

It looks like it is running fine - you haven't provided any commands for emClarity to execute.

Please study the tutorial found here.

For your reference:

# Your first attempt is redundant. Because the script you ran has a "shebang" (#!/bin/bash) the script can be run directly without explicitly calling an interpreter (as you have below.)
bash script name

# Your second attempt is okay in some sense, but typically this usage is to bring variables declared in a script into your current shell's scope
source script name

# Your third attempt is fine and would work if you provided a subcommand to run (see tutorial)
./script_name

# Ideally, you would just add either of the following to the end of our ${HOME}/.bashrc
# option 1 add to path
export PATH=${HOME}/emClarity_1.5.3.11/bin:$PATH
# option 2 make an alias
alias emClarity=${HOME}/emClarity_1.5.3.11/bin/emClarity_1.5.3.11_v19a

# I suggest the alias

Hope that helps, I'm going to mark this issue as solved.