2023년 10월 31일 화요일
compile problems of various manybody codes (in Ubuntu)
2023년 3월 22일 수요일
GEANT4 설치 Ubuntu 22.04
Geant4 , Ubuntu, Qt 등의 version이 바뀜에 따라 인터넷에서 찾아본 설치과정이 더 이상 옳지 않은 경우가 생겼다.
그래서, 현재 버전 (Geant 4 v.11, Ubuntu 22, Qt 5)에 맞는 설치 방법을 찾아야 했다.
https://evanote.mew.kr/course/g4install/ubuntu/g4install-111-ubt2204/
List of steps to install Geant4 in Ubuntu
(1) 시스템 업데이트
sudo apt update -y && sudo apt upgrade -y && sudo apt autoremove -y
(2) 필수 프로그램 설치
sudo apt install -y build-essential
sudo apt install -y cmake
sudo apt install -y libexpat1-dev
sudo apt install -y libxmu-dev
(3) Qt 설치:
웹페이지에는
sudo apt install -y qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools
이면 충분하다고 되어 있으나,Qt53D 실행에 문제가 있어서, 아예 remove하고
새로 Qt 를 정식 홈페이지에서 다운 받아 설치 했다.
(4) Geant4 source 코드를 다운 받음.
(5) cmake를 이용하여 build 준비
sudo cmake <source path > -DCMAKE_INSTALL_PREFIX="<install path>" -DGEANT4_BUILD_MULTITHREADED=ON -DGEANT4_INSTALL_DATA=ON -DCMAKE_PREFIX_PATH="< Qt path >Qt/5.15.2/gcc_64/lib/cmake/" -DGEANT4_USE_QT=ON
예제코드를 compile하기 위해서는
cmake < example path > && make
를 하면 된다.
2016년 1월 5일 화요일
vmware에서 guest resize problem
다양하게 시도해 본 결과 linux에서 open-vm-tools 가 제대로 설치되지 않은 것이 문제 인것으로 보인다.
Ubuntu에서
open-vm-tools
open-vm-tools-desktop
을 재설치 하는 것으로 해결되었다.
2015년 7월 30일 목요일
dropbox problem in ubuntu 14.04
the dropbox does not work/start properly.
Dropbox daemon, 'dropboxd', is located at '.dropbox-dist/'.
It seems like there is some version problem in daemon.
So, I am trying to solve this by
sudo rm -rf /var/lib/dropbox/.dropbox-dist
dropbox start -i
However, it does not solve the problem.
So, I look the Dropbox homepage and followed the instruction,
32-bit:
cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86" | tar xzf -
cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
.dropbox-dist folder.~/.dropbox-dist/dropboxd &
At least, this works. But because it is a directly installed, automatic update
will not work.
2014년 7월 22일 화요일
black screen after login screen 로긴 화면 다음에 검은 화면이 나오는 문제
우분투를 사용하면서 무심코 업데이트를 시켰는데,
리부팅후 로그인 후 갑자기 화면이 검게 변하면서 아무런 반응을 보이지 않는 현상이 생겼다.
인터넷을 찾아보니 다음과 같은 방법으로 해결할 수 있었다. 하지만, 여전히 문제가 완전히 해결된 것인지는 확실하지 않다.
증상: 로그인 화면까지는 정상적으로 나타난다. 하지만, 로그인을 하고 나면 black screen으로 변한다.
2014/12/11: Nvidia driver 를 update 한 뒤 비슷한 문제가 다시 생겼다.
해결책: 확실하지는 않지만, 일단 다음과 같은 방법으로 로그인후 정상적인 화면이 나타나도록 되었다.
(1) 로그인 화면에서 CTRL+ALT+F1 을 누른다. 그러면 terminal과 비슷한 text 화면이 나타난다. (Emergency text/command terminal)
(2) 로그인 후, 다음 명령으로 xserver-xorg를 제거한다.
sudo apt-get remove --purge xserver-xorg
2014/12/11: Nvidia driver 를 제거했다.
sudo apt-get remove --purge nvidia-*
(3) CTRL+ALT+DEL 을 눌러 리부팅한다.
(4) 리부팅 후 다시 CTRL+ALT+F1으로 prompt 상태로 바꾸어 로그인한다. (원래 설명에서는 UBUNTU logo 와 그 밑의 다섯개 점이 움직이는 동안에 해야만 하고, 로그인 스크린이 나오기 전에 해야만 한다고 하는데, 나의 경우에는 상관이 없었다.
(5) 로그인후 다음 명령으로 xserver-xorg를 다시 install 한다.
sudo apt-get install xserver-xorg
(6) xorg 설정을 다시 한다.
sudo dpkg-reconfigure xserver-xorg
(7) 리부팅 후 로그인하면, 문제가 해결되었다. (원래 설명에서는 startx 를 사용하여 GUI 로 바꾸라고 되어 있는데, 상관 없는 듯 하다.)
2014년 6월 12일 목요일
Linux Library 사용하기
- Static library
- Shared library(or Dynamical library)
Ubuntu software center 에서 library 를 찾아보면 static 인 경우도 있고 shared 인 경우도 있다. 초보자의 입장에서는 별로 상관이 없고, 사용법만 알 면 될 것 같은데,
문제는 경우에 따라 다운 받은 library를 사용하는 데 compiler 가 library를 못찾는 경우가 있다.
저장되는 library는 3가지 중에 하나의 이름을 가진다.
- linker 가 사용하는 이름: 'lib' 로 시작하고 '.a' 나 '.so' 로 끝나는 이름. '.a' 는 static library 인 경우이고 '.so'는 shared object library인 경우이다. (예: libpthread.so) 이것은 Dynamic library 라고 불린다.
- Fully qualified name or soname: linker 가 사용하는 이름과 같지만, 마지막에 버전 넘버가 붙는다. (예: libpthread.so.1)
- Real name : 버전 넘버 뒤에 마이너 버전 넘버가 붙는 경우.(예: libpthread.so.1.1 )
library를 다운 받으면 보통 다음 3개 directory 중 하나에 저장된다고 한다.
- /lib : 처음 linux start up 에서 사용되거나 root file system이 사용하는 library들이 위치한다.
- /usr/lib : 대부분의 user 가 사용하거나 system 이 internally 사용하는 library들이 위치한다.
- /usr/local/lib : standard libary가 아닌 대부분의 library가 위치한다.
gcc 에서 -L 은 디렉토리 위치를 추가하기 위한 것이고, -l 은 library를 불러오기 위한 것이다.
여기서 -l 뒤에 library의 이름을 붙이는데 library 이름 중 lib 는 뺀다. (예를 들어 원래 library 이름이 liblapack.a 일 때 lapack 만 사용한다.)
2014년 6월 11일 수요일
Ubuntu Setting Up
1. 우분투 설치하기 및 update
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install build-essentials
2. Tweak : scroll bar 설정, launcher 의 icon size변경, work space 사용하기 등등...
- make a shortcut of terminal to task bar
- Repository and package manager (In System> software and update)
sudo apt install synaptic
sudo apt install gdebi
- Additional Drivers (In System> software and update)
- enable Workspace( System Settings >>> Appearance >>> Behavior)
- Fix app menu problem(System Settings >>> Appearance >>> Behavior tab >> ‘Show the Menus for a Window’ . always displayed)
4. Nautilus configuration:
- open terminal command in nautilus: sudo apt-get install nautilus-open-terminal
- nautilus action configure tool to make customization of right click in nautilus :
- sudo apt-get install nautilus-actions-configuration (From 16.04, I could not find the package)
- Bookmark the network server I use
- install meld nautilus-compare
6. dropbox 설치
sudo apt install nautilus-dropbox
7. secpanel
8. Texworks and latex
: for tex, install texlive, texlive-extras, texlive-publishers (for revtex)
9. Numerical libraries:
- gfortran
- LAPACK, SCALAPACK: liblapack, libscalapack 을 검색해서 install
- MATHLIB: install libmathlib2-dev or install cernlib
- MPICH:
- LAPACK, scalapack:
- openmpi:
- FFTW3: sudo apt-get install fftw3-dev
sudo apt install build-essential
sudo apt install gfortran
11. vim and change its color scheme : vimrc file 복사하기, encryption method change
( default vi editor is not good to use.)
sudo apt install vim vim-gtk
12. gftp or filezilla
13. variety : wallpaper changer
14. python and ipython, matplotlib, scitools, scipy , pip
sudo apt-get install ipython
sudo apt-get install python-pip python-tk
python -m pip install --upgrade pip
pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose
# Consider adding this at the end of your ~/.bashrc file
export PATH="$PATH:/home/[your_user]/.local/bin"15. Make /bin and /lib directory for personal usage.
# add path in .basrc
export PATH=$PATH:/home/yhsong/bin:/home/yhsong/lib
16. gnuplot
FRESCO
sudo apt install gnuplot-qt
Ubuntu 18.04 : click-action setting.
One can choose click-action for the dock :
'minimize', 'minimize-or-overview', 'previews','cycle-windows'
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize'
2014년 6월 10일 화요일
Remove/Uninstall Copy.com from Ubuntu
THESE are copied from other site and here for easy reference.
Follow these steps to completely remove Copy from your system:
- Disable autostart for each user, if necessary. (You don't need to use
sudoif no other user accounts on your system are using Copy)...sudo rm -rf /home/<user>/.config/autostart/CopyAgent.desktop - Log out and log back in. This will shut down the running copy process so it does not re-create the files you are about to delete in step 3. (You can also just kill the "CopyAgent" process using System Monitor if you don't want to log out.)
- Execute the following for each user, if necessary. (You don't need to use
sudoif no other user accounts on your system are using Copy).sudo rm -rf /home/<user>/<path_to_users_copy_folder>/.copy.cache/ sudo rm -rf /home/<user>/<path_to_users_copy_folder>/.user_info sudo rm -rf /home/<user>/.copy sudo rm -rf /home/<user>/.icons - If you had manually installed the Nautilus overlay icons, uninstall them...
sudo <installation_location>/<architecture>/CopyCmd Overlay remove - Uninstall Copy software...
sudo rm -rf /root/.copy - If you had manually added a launcher shortcut, remove it. Assuming you called the launcher "copy.desktop" do the following.For all users...
sudo rm /usr/share/applications/copy.desktopOr, for each user...sudo rm /home/<user>/.local/share/applications/copy.desktop
- Replace
<user>with the user on your system that is using Copy. - Replace
<path_to_users_copy_folder>with the user's local "Copy" folder (for example,Documents/Copy). - Replace
<installation_location>with the location where you installed Copy (for example/usr/share/copy). - Replace
<architecture>with "x86" (if you have a 32bit computer) or with "x86_64" (if you have a 64bit computer).