레이블이 ubuntu인 게시물을 표시합니다. 모든 게시물 표시
레이블이 ubuntu인 게시물을 표시합니다. 모든 게시물 표시

2023년 10월 31일 화요일

compile problems of various manybody codes (in Ubuntu)

List of compile problems for various manybody nuclear physics codes. 

 (1) BigstickPublick : https://github.com/cwjsdsu/BigstickPublick
            gfortran had problems with MPI commands. 
        --> ifort could compile without problem
        or add compile option "-fallow-argument-mismatch"

 (2) imsrg : https://github.com/ragnarstroberg/imsrg
               missing libraries have to be installed. But, python binding was problem. 
        --> include python3 path in Makefile. (replace 'python-config' into 'python3-config') 
       (2-1) to build : goto "build/" and run "cmake .." 
                then "make install" 
       (2-2) After compile, one can run  "imsrg++  [arguments]" 
               Python script to specify command line arguments can be found in "work/" folder. 
       (2-3)  To get documentation, run "doxygen  [.dox file]" in "doc/" folder.  



 (3) NuHamil : https://github.com/Takayuki-Miyagi/NuHamil-public
          *       no submodule
        --> "git submodule init" and "git submodule update"               
            *       missing hdf5.mod 
        --> add include path " -I/usr/include/hdf5/serial" 
               (first install "sudo apt install libhdf5-dev hdf5-tools")
             *      cannot find -lhdf5_fortran 
        --> add path "-L/usr/lib/x86_64-linux-gnu/hdf5/serial" 
             * may need additional libraries installed 
                      "sudo apt install libgsl-dev" 

(4) HartreeFock:  https://github.com/Takayuki-Miyagi/HartreeFock 
                    no submodule 
        --> same solution as above 
                     argument mismatch 
        --> edit Makefile, Debug=off and add compile option "-fallow-argument-mismatch"


 Tips: In general, if some library is already installed but could not be found, solutions are usually add correct path/location. How to find the path os installed library in Ubuntu? 
 try " dpkg --get-selections | grep -v deinstall | grep [name]
then " dpkg -L packagename "to find the path.

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

(6) build and install
sudo make && make install


예제코드를 compile하기 위해서는 

cmake < example path > && make 

를 하면 된다. 

2016년 1월 5일 화요일

vmware에서 guest resize problem

vmware에서 어느 순간부터 guest os 의 windows size를 바꾸지 못하는 문제가 발생했다.
다양하게 시도해 본 결과 linux에서 open-vm-tools 가 제대로 설치되지 않은 것이 문제 인것으로 보인다.

Ubuntu에서

open-vm-tools
open-vm-tools-desktop

을 재설치 하는 것으로 해결되었다.

2015년 7월 30일 목요일

dropbox problem in ubuntu 14.04

After updating Ubuntu, at some point
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 -
64-bit:
cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
Next, run the Dropbox daemon from the newly created .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 로긴 화면 다음에 검은 화면이 나오는 문제

display problem after update/upgrade ubuntu

우분투를 사용하면서 무심코 업데이트를 시켰는데,
리부팅후 로그인 후 갑자기 화면이 검게 변하면서 아무런 반응을 보이지 않는 현상이 생겼다.
인터넷을 찾아보니 다음과 같은 방법으로 해결할 수 있었다. 하지만, 여전히 문제가 완전히 해결된 것인지는 확실하지 않다.

증상: 로그인 화면까지는 정상적으로 나타난다. 하지만, 로그인을 하고 나면 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 사용하기

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가 위치한다.

이러한 표준 directory에 저장된 경우 특별한 위치 지정이 없어도 library를 컴파일러가 알아서 찾지만, 그 이외의 특별한 위치에 저장되면 그 위치를 알려 주어야만 library를 사용할 수 있다.  

보통 지정해 주어야하는 directory는 linker 가 사용하는 이름인 *.a 나 *.so 가 있는 곳이다.

gcc -L/usr/lib -llapack -lmathlib

gcc 에서 -L 은 디렉토리 위치를 추가하기 위한 것이고, -l 은 library를 불러오기 위한 것이다.
여기서 -l 뒤에 library의 이름을 붙이는데 library 이름 중 lib 는 뺀다. (예를 들어 원래 library 이름이 liblapack.a 일 때 lapack 만 사용한다.)

2014년 6월 11일 수요일

Ubuntu Setting Up

내가 항상 vmware 로 새로운 우분투를 깔 때마다 새로 설정해야하는 사항들을 모아보자.

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)
        enable the Canonical Partners’ Repository.
        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)




3. install Java: sudo apt-get install default-jre

4. Nautilus configuration:
  • open terminal command in nautilus: sudo apt-get install nautilus-open-terminal 
(From 16.04, it seems not need to install nautilus-open-terminal. Also, new terminal opens a new tab by 'control-shift-T' )
  • 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
5. classic menu indicator

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 
    (여러 패키지중에서 dev 가 붙어 있고 static 이라고 쓰여 있는 것. liblapack.a 파일이 있는지 확인할 것.)
  • MATHLIB: install libmathlib2-dev   or install cernlib
  • MPICH: 
      sudo apt install gfortran
      sudo apt install libmpich-dev
  • LAPACK, scalapack: 
      sudo apt install liblapack-dev
      sudo apt install libscalapack-mpi-dev
  • openmpi: 
      sudo apt install openmpi-bin openmpi-dev

  • FFTW3:  sudo apt-get install  fftw3-dev 

10. build-essential package

     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

.vimrc  example
--------------------
" When searching try to be smart about cases
set smartcase
" Makes search act like search in modern browsers
set incsearch
" Show matching brackets when text indicator is over them
set showmatch
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Colors and Fonts
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
:syntax enable
set background=dark
:colo desert

" Set utf8 as standard encoding and en_US as the standard language
set encoding=utf8

" Use Unix as the standard file type
set ffs=unix,dos,mac

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Spell checking
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Pressing ,ss will toggle and untoggle spell checking
map <leader>ss :setlocal spell!<cr>

" Shortcuts using <leader>
map <leader>sn ]s
map <leader>sp [s
map <leader>sa zg
map <leader>s? z=


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Misc
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Remove the Windows ^M - when the encodings gets messed up
noremap <Leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm

" Set encryption method to blowfish
set cm=blowfish
     


---------------------

12. gftp or filezilla

13. variety : wallpaper changer

14. python and ipython, matplotlib, scitools, scipy , pip

     # add alias to .bashrc_aliases file
        alias python=python3  

      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

and more ...


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'


10-or-20-things-to-do-after-installing-ubuntu-14-04-trusty-tahr

http://scienceblogs.com/gregladen/2014/04/24/10-or-20-things-to-do-after-installing-ubuntu-14-04-trusty-tahr/

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:
  1. Disable autostart for each user, if necessary. (You don't need to use sudo if no other user accounts on your system are using Copy)...
    sudo rm -rf /home/<user>/.config/autostart/CopyAgent.desktop
    
  2. 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.)
  3. Execute the following for each user, if necessary. (You don't need to use sudo if 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
    
  4. If you had manually installed the Nautilus overlay icons, uninstall them...
    sudo <installation_location>/<architecture>/CopyCmd Overlay remove
    
  5. Uninstall Copy software...
    sudo rm -rf /root/.copy
    
  6. 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.desktop
    
    Or, for each user...
    sudo rm  /home/<user>/.local/share/applications/copy.desktop
    
Note, in the above steps...
  • 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).