10 Jan 2019
Mac Setup
Mac setup for a computational material scientist (macOS Mojave 10.14).
Key APPS
-
defaults write org.macosforge.xquartz.X11 enable_iglx -bool true
-
- Package control, itg.flatland theme, sidebar enhancement, GitGutter, syntax highliters(python3, julia, Fortran)
Settings
- ssh
#cp ~/Dropbox/SETUP/id_rsa* ~/.ssh cp /Volume/USB_flash_drive/ssh ~/.ssh chmod 400 ~/.ssh/id_rsa*
- bash
ln -s ~/Dropbox/SETUP/.bash* ./
- iTerm
ln -s ~/Dropbox/SETUP/iterm.json ~/Library/Application\ Support/iTerm2/DynamicProfiles/
-
To install Xcode
make
,xcode-select --install
- To install python packages with anaconda (python3.7 because it’s 2018 soon 2019), make sure saying No to install Visual Studio code
conda install -c matsci pymatgen conda install pandoc
-
To install Intel® Parallel Studio XE
- To install openmpi
./configure -prefix=/usr/local/openmpi-X.X.X CC=icc CXX=icc FC=ifort F77=ifort make all sudo make install vi ~/.bash_profile
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/openmpi-X.X.X/lib export PATH=./:/usr/local/openmpi-X.X.X/bin:$PATH export OMP_NUM_THREADS=1
- To install homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- To install julia
brew cask install julia
- To install jekyll with new gem replacing built-in gem at
/usr/bin
which requires root privilege.brew install ruby
- To install latex
brew tap caskroom/cask brew cask install mactex
- To set up backup
vi /Library/LaunchDaemons/mybackup.plist
<?xml version="1.0" encoding="UTF-8"? <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>research_backup</string> <key>ProgramArguments</key> <array> <string>/Volumes/research_backup/backup.sh</string> </array> <key>StartCalendarInterval</key> <dict> <key>Hour</key> <integer>10</integer> <key>Minute</key> <integer>30</integer> </dict> </dict> </plist>
launchctl load -w /Library/LaunchDaemons/research_backup.plist
#!/bin/sh # http://www.techrepublic.com/article/how-to-set-up-auto-rsync-backups-using-ssh/ # automated backup with crontab (depreciated) # https://www.linux.com/learn/how-backup-files-linux-rsync-command-line # https://ubuntuforums.org/showthread.php?t=15082 # Scripting OS X Launchd Agent to run a Backup Command # https://coolestguidesontheplanet.com/scripting-os-x-launchd-agent-to-run-a-backup-command/ # THOMAS mkdir -p /Volumes/research_backup/THOMAS rsync --exclude-from=$HOME/.rsync_exclude -e 'ssh -p 22' -avzp mmm0035@thomas.rc.ucl.ac.uk:/scratch/scratch/mmm0035/00_PROJECT/ /Volumes/research_backup/THOMAS # ARCHER mkdir -p /Volumes/research_backup/ARCHER rsync --exclude-from=$HOME/.rsync_exclude -e 'ssh -p 22' -avzp skim18@login.archer.ac.uk:/home/e05/e05/skim18/work/ /Volumes/research_backup/ARCHER # MICHAEL mkdir -p /Volumes/research_backup/MICHAEL rsync --exclude-from=$HOME/.rsync_exclude -e 'ssh -p 22' -avzp mmm0035@michael.rc.ucl.ac.uk:/scratch/scratch/mmm0035/00_PROJECT/ /Volumes/research_backup/MICHAEL
# $HOME/.rsync_exclude WAVECAR CHGCAR CHG core WAVEDER POTCAR* *.sublime-* LOCPOT
Reference
Til next time,
at 10:01