Difference between revisions of "User:DukeEgr93/SNIPR"

From PrattWiki
Jump to navigation Jump to search
(Created page with "* Installed VirtualBox 6.1.18 from [https://www.virtualbox.org/wiki/Downloads] using all defaults * Created a machine in VirtualBox Manager using New; 4 GB Ram; 100 GB VDI dri...")
 
(Check MATLAAB)
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
== Ubuntu on a VirtualBox ==
 +
 +
=== Virtual Machine ===
 +
* Created a machine in VirtualBox Manager using New; 8 GB Ram; 100 GB VDI drive fixed size for speed
 +
* Downloaded Ubuntu from [https://ubuntu.com/download/desktop/thank-you?version=20.04.2.0&architecture=amd64 Ubuntu] and installed it
 +
** After installation, stop the machine and remove the optical ISO if need be
 +
* Need to install:
 +
sudo apt-get install gcc
 +
sudo apt-get install g++
 +
sudo apt-get install cmake
 +
sudo apt-get install mlocate
 +
sudo apt-get install git
 +
* Also need to be using gcc-9; if 10 is installed:
 +
sudo apt install gcc-9 g++-9
 +
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9
 +
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 90 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10
 +
 +
 +
=== MATLAB ===
 +
* Used Firefox to connect to MATLAB, downloaded and saved to Downloads
 +
* Extract and install:
 +
cd ~/.Downloads
 +
unzip matlab_R2017b_glnxa64.zip
 +
sudo ./install
 +
* Need to have MATLAB, Simulink, Bioinformatics, Robust Control, Statistics and Machine Learning, and Control System Toolbox.
 +
** Note: If you didn't install the right toolboxes, to be able to add toolboxes later, in UNIX:
 +
sudo apt-get install libgconf-2-4
 +
cd /usr/local/MATLAB/R2017b/bin/glnxa64
 +
sudo mkdir exclude
 +
sudo mv libfreetype.so.6 exclude
 +
:: From [https://www.mathworks.com/matlabcentral/answers/364551-why-is-matlab-unable-to-run-the-matlabwindow-application-on-linux#answer_288902 MATLAB's help site]
 +
* Move libstdc++.so so it does not interfere with the new one
 +
cd /usr/local/MATLAB/R2017b/sys/os/glnxa64
 +
sudo mv libstdc++.so.6 libstdc++.so.6.OLD
 +
 +
=== NUPACK ===
 +
* [http://www.nupack.org/downloads NUPACK]
 +
** Registered
 +
** Downloaded and saved to Downloads
 +
cd ~/Downloads
 +
gunzip nupack3.2.2.tar.gz
 +
tar -xvf nupack3.2.2.tar
 +
cd nupack3.2.2
 +
mkdir build
 +
cd build
 +
sudo cmake ../
 +
sudo make
 +
sudo make install
 +
::Sooooo many warnings with make
 +
 +
=== Prepare Shell ===
 +
* Edit ~/.bash_profile and add lines; use
 +
pico ~/.bash_profile
 +
: in the terminal, add the lines:
 +
export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/usr/lib/x86_64-linux-gnu
 +
alias matlab='/usr/local/MATLAB/R2017b/bin/matlab'
 +
: then save and exit
 +
* First time you do this, in the terminal type
 +
source ~/.bash_profile
 +
 +
=== Check MATLAB ===
 +
* Run MATLAB
 +
matlab
 +
* Try to run multitubedesign
 +
system('multitubedesign')
 +
 +
=== SNIPR ===
 +
* Change into home
 +
cd
 +
* Get github repository
 +
git clone https://github.com/Albert09111/SNIPR/
 +
* Change into SNIPR Folder
 +
cd SNIPR
 +
* Run MATLAB (assumes alias is working)
 +
matlab &
 +
:* In MATLAB, run SNIPR
 +
SNIPR
 +
 +
 +
<!--
 
* Installed VirtualBox 6.1.18 from [https://www.virtualbox.org/wiki/Downloads] using all defaults
 
* Installed VirtualBox 6.1.18 from [https://www.virtualbox.org/wiki/Downloads] using all defaults
 
* Created a machine in VirtualBox Manager using New; 4 GB Ram; 100 GB VDI drive fixed size for speed
 
* Created a machine in VirtualBox Manager using New; 4 GB Ram; 100 GB VDI drive fixed size for speed
 +
* Downloaded Ubuntu from [https://ubuntu.com/download/desktop/thank-you?version=20.04.2.0&architecture=amd64 Ubuntu] and installed it
 +
** After installation, stop the machine and remove the optical ISO if need be
 +
* Used Firefox to connect to MATLAB and installed R2017a with "sudo ./install" to have access to folders; MATLAB, Simulink, Bioinformatics, Robust Control.  To be able to add toolboxes later, in UNIX:
 +
sudo apt-get install libgconf-2-4
 +
cd /usr/local.MATLAB/R2017a/bin/glnxa64
 +
sudo mkdir exclude
 +
sudo mv libfreetype.so.6 exclude
 +
:: From [https://www.mathworks.com/matlabcentral/answers/364551-why-is-matlab-unable-to-run-the-matlabwindow-application-on-linux#answer_288902 MATLAB's help site]
 +
* [http://www.nupack.org/downloads NUPACK]
 +
** Registered
 +
** Downloaded and opened with archive manager
 +
** Extracted to /home/ID
 +
** Installed cmake with
 +
sudo apt install cmake
 +
:* Installed g++ with
 +
sudo apt install g++
 +
:* Change to nupack folder, make build, change to build,
 +
sudo cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ ../
 +
sudo make
 +
sudo make install
 +
::Sooooo many warnings...
 +
:* Install most recent version of libstdc++
 +
sudo apt install compat-libstdc++-33.x86_64
 +
:* Find most recent version of libstdc++
 +
locate libstdc++
 +
:: If locate does not work, use
 +
sudo apt install mlocate
 +
:: first.  Find the one that is in /usr/lib/x86_64-linux-gnu
 +
:* Add lines to bash profile and run it:
 +
  pico ~/.bash_profile
 +
:: and add
 +
export NUPACKHOME=/home/mrg/nupack3.2.2
 +
export PATH=$PATH":${NUPACKHOME}/bin"
 +
export LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28"
 +
::then
 +
source ~/.bash_profile
 +
:: Not sure if required since these live on /usr/local
 +
:* Start MATLAB from terminal
 +
cd /usr/local/MATLAB/R2017a/bin
 +
./matlab &
 +
:* Check to see if things are working
 +
system('musltitubedesign')
 +
* SNIPR
 +
** Change into home
 +
cd
 +
:* Get github repository
 +
sudo apt install git
 +
git clone https://github.com/Albert09111/SPIPR/
 +
:* Change into SNIPR Folder
 +
cd SNIPR
 +
:* Run MATLAB
 +
/usr/local/MATLAB/R2017a/bin/matlab &
 +
:* In MATLAB, run SNIPR
 +
SNIPR
 +
 +
== Round Two ==
 +
=== Fedora ===
 +
Made a Virtualbox with Fedora, downloaded ISO, connected to optical first time around, disconnected from optical second time around, etc
 +
=== cmake ===
 +
* Opened terminal
 +
* sudo dnf install cmake
 +
* sudo yum install gcc-c++
 +
=== NUPACK ===
 +
* [http://www.nupack.org/downloads NUPACK]
 +
** Registered
 +
** Downloaded and moved to home directory
 +
** gunzip nupack3.2.2.tar.gz
 +
** tar -xvf nupack3.2.2.tar
 +
** cd nupack3.2.2
 +
** mkdir build
 +
** cd build
 +
** sudo cmake ../
 +
** sudo make
 +
** Fail...
 +
 +
== Round Three ==
 +
=== Debian 64 ===
 +
IBID; all the defaults
 +
=== Process===
 +
* opened the terminal
 +
* su -
 +
* apt-get install cmake
 +
* apt get-install  gcc
 +
* apt-get install g++
 +
* Download zip from Firefox
 +
* gunzip nupack3.2.2.tar.gz
 +
* tar -xvf nupack3.2.2.tar
 +
* cd nupack3.2.2
 +
* mkdir build
 +
* cd build
 +
* cmake ../
 +
* make
 +
* make install
 +
* Download R2017b installer
 +
* gunzip
 +
* https://linuxize.com/post/how-to-add-user-to-sudoers-in-debian/ to add sudo rights
 +
* sudo ./install
 +
* MATLAB, Simulink, Bioinformatics, Statistics, Control System, Robust Control
 +
* source ~/.bash_profile
 +
* cd /usr/local/MATLAB/R2017b/sys/os/glnx64
 +
* sudo mv libstdc++.so.6 libstdc++.so.6.old
 +
* sudo apt-get install git
 +
* git clone https://github.com/Albert09111/SNIPR
 +
-->

Latest revision as of 23:17, 23 February 2021

Ubuntu on a VirtualBox

Virtual Machine

  • Created a machine in VirtualBox Manager using New; 8 GB Ram; 100 GB VDI drive fixed size for speed
  • Downloaded Ubuntu from Ubuntu and installed it
    • After installation, stop the machine and remove the optical ISO if need be
  • Need to install:
sudo apt-get install gcc
sudo apt-get install g++
sudo apt-get install cmake
sudo apt-get install mlocate 
sudo apt-get install git
  • Also need to be using gcc-9; if 10 is installed:
sudo apt install gcc-9 g++-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 90 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10


MATLAB

  • Used Firefox to connect to MATLAB, downloaded and saved to Downloads
  • Extract and install:
cd ~/.Downloads
unzip matlab_R2017b_glnxa64.zip
sudo ./install
  • Need to have MATLAB, Simulink, Bioinformatics, Robust Control, Statistics and Machine Learning, and Control System Toolbox.
    • Note: If you didn't install the right toolboxes, to be able to add toolboxes later, in UNIX:
sudo apt-get install libgconf-2-4
cd /usr/local/MATLAB/R2017b/bin/glnxa64
sudo mkdir exclude
sudo mv libfreetype.so.6 exclude
From MATLAB's help site
  • Move libstdc++.so so it does not interfere with the new one
cd /usr/local/MATLAB/R2017b/sys/os/glnxa64
sudo mv libstdc++.so.6 libstdc++.so.6.OLD

NUPACK

  • NUPACK
    • Registered
    • Downloaded and saved to Downloads
cd ~/Downloads
gunzip nupack3.2.2.tar.gz
tar -xvf nupack3.2.2.tar
cd nupack3.2.2
mkdir build
cd build
sudo cmake ../
sudo make
sudo make install
Sooooo many warnings with make

Prepare Shell

  • Edit ~/.bash_profile and add lines; use
pico ~/.bash_profile
in the terminal, add the lines:
export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/usr/lib/x86_64-linux-gnu
alias matlab='/usr/local/MATLAB/R2017b/bin/matlab'
then save and exit
  • First time you do this, in the terminal type
source ~/.bash_profile

Check MATLAB

  • Run MATLAB
matlab
  • Try to run multitubedesign
system('multitubedesign')

SNIPR

  • Change into home
cd 
  • Get github repository
git clone https://github.com/Albert09111/SNIPR/
  • Change into SNIPR Folder
cd SNIPR
  • Run MATLAB (assumes alias is working)
matlab &
  • In MATLAB, run SNIPR
SNIPR