Study Notes in Physics & Chemistry
Electromagnetism
FDTD
Configuring meep on a supercomputer
Equipment: JAIST supercomputer
Since I have to do some FDTD/EM simulations, but it's a pain to use a personal PC, I chose to build a MEEP simulation environment on the supercomputer, which will be very time saving. My reference is the official MEEP documentation https://meep.readthedocs.io/en/latest/Installation/
Installation of miniconda
Create a python folder in your own directory, the school supercomputers already have the python3 environment pre-installed, so just follow the official documentation to install it.
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p <desired_prefix>
export PATH=<desired_prefix>/bin:$PATH
export: command not found
echo $SHELL
/bin/tcsh
vim ~/.cshrc
setenv PATH "<desired_prefix>/bin"
setenv PATH <desired_prefix>/bin:$PATH
conda create -n mp -c chogan -c conda-forge pymeep
Exception('No compatible shell found!')
conda activate mp
conda init tcsh
exec /bin/tcsh -l
conda activate mp
Execute in this miniconda's directory.
conda install -c conda-forge jupyterlab
jupyter lab
However, when using it, I can't find the package! But the conda list is packaged! thus
conda search pymeep
Loading channels: done
No match found for: pymeep. search: *pymeep*
PackagesNotFoundError: The following packages are not available from current cha nnels:
- pymeep
Current channels:
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-64
- https://repo.anaconda.com/pkgs/r/noarch
To search for alternate channels that may provide the conda package you're
Looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
conda config --append channels conda-forge
python -c 'import meep'
AttributeError: module 'meep' has no attribute 'Vector3'
I'll try to install Linux for Windows on my workstation (DELL PowerEdge T620) by installing Linux for Windows and then use the above method to install, after all, the configuration of this workstation is not low, barely work. After all, the configuration of this workstation is not low, it barely works. Although the problem of IEER1 has not been solved (even if it is not serious) because of unknown reasons.
About the installation and setting method of WSL, I refer to the following: https://zhuanlan.zhihu.com/p/61542198
After starting Ubuntu, first beautify the vim, after all, it is to show the boss to pretend to use .... I'm not going to say anything specific, but the code is as follows.
mkdir .vim
cd .vim
git clone https://github.com/tomasr/molokai.git
cp -rf molokai/colors/ . /colors/ .
vim vimrc
colorscheme molokai
mkdir meep
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p miniconda // Here I extracted it to miniconda folder
export PATH=/root/meep/miniconda/bin:$PATH //set PATH variable
conda create -n mp -c chogan -c conda-forge pymeep //create a virtual environment named mp to install the pymeep package
conda init bash //configure the shell
exec /bin/bash //configure the shell
conda activate mp // activate environment
conda install -c conda-forge jupyterlab
Running as root is not recommended. Use --allow-root to bypass.
Use --allow-root to bypass. ``
The solution.
```java
jupyter notebook --generate-config --allow-root
#c.NotebookApp.allow_root = False // Remove the # and change it to True to fix the root running issue.
jupyter-notebook --no-browser
Quantum Chemistry
One csh script for ORCA program on JAIST Supercomputer(128 cores)
#!/bin/csh
#PBS -l select=1:ncpus=128:mpiprocs=128
#PBS -j oe
#PBS -q SMALL
#PBS -N ORCA
cd $PBS_O_WORKDIR
source /etc/profile.d/modules.csh
module load openmpi/4.1.1/
setenv OMPI_ALLOW_RUN_AS_ROOT=1
setenv OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
setenv PATH=/home/studentID/orca/orca/:$PATH
setenv LD_LIBRARY_PATH=/home/studentID/orca/orca/:$LD_LIBRARY_PATH
### Gaussian Scratch file is saved in current directory ###
setenv ORCA_SCRDIR $PBS_O_WORKDIR
echo "-P-16" > Default.Route
~/orca/orca/orca input.inp> output.out
rm -f ./Default.Route