April 2018

Computing
Build makedepf90 on ITO Subsystem-A

This page is a memorandum for building makedepf90 with Intel compiler on Subsystem-A of Supercomputer ITO (ITO-A) at Kyushu University, which is used in building FVCOM. Obtaining source code Source code can be downloaded from Github by clicking on the green button of Clone or download at the right-hand side. Copy it in a directory, e.g., ~/src/. Then set environmental variables for Intel compilers as introduced in this page. Extract the source code, build it, and copy the created executable file of makedepf90 to, e.g., ~/local/bin that is added to PATH. unzip makedepf90.zip cd makedepf90-master make cp makedepf90 ~/local/bin Usage When makedepends for FVCOM needs to be recreated, move to […]

Read more
Computing
Build netcdf-3.6.3-intel on ITO Subsystem-A

This is a memorandum building netcdf-3.6.3 with Intel compilers on Supercomputer ITO Subsystem-A at Kyushu University. The build of netcdf-4.1.2 does not work as found here. Obtaining source of netcdf-3.6.3 Updated on June 13, 2021: The source of netcdf-3.6.3.tar.gz cannot be downloaded now. Suppose you have it. Building netcdf-3.6.3 Create the following bash script of build_netcdf363.sh. #!/bin/bash # build_netcdf363.sh export CC=icc export CXX=icpc export CFLAGS=-O3 export CXXFLAGS=-O3 export F77=ifort export FC=ifort export F90=ifort export FFLAGS=-O3 export CPP='icc -E' export CXXCPP='icpc -E' tar xf netcdf-3.6.3.tar.gz cd netcdf-3.6.3 ./configure --prefix=/home/usr1/account/local/netcdf-3.6.3-intel make make check make install Adding an executable attribute and execute the script. chmod a+x build_netcdf363.sh ./build_netdf363.sh Done! If you use it […]

Read more
Computing
Build FVCOM4.1 (Series) on ITO Subsystem-A using Intel Compilers

This is a memorandum of how to build and execute FVCOM 4.1 in series (non MPI) using Intel compilers on Supercomputer ITO Subsystem A at Kyushu University. Suppose the source code exists in [cci]FVCOM4.1/FVCOM_source[/cci], and [cci]FVCOM4.1/Examples/Estuary[/cci] is a selected test case. Installing nkf Line feed of some distributed source files is for Windows and need to be fixed using nkf. For installing nkf, download the source of [cci]nkf[/cci] from this site , copy it to [cci] ~/src [/cci], and extract and build it. [cc lang='bash'] $ tar xf nkf-2.1.4.tar.gz $ cd nkf-2.1.4 $ make ### Create ~/local/bin and add its PATH $ cp nkf ~/local/bin/ [/cc] Check line feed of […]

Read more
Computing
Setup environment on ITO at Kyushu University Supercomputer

The following is a memo of initial setup for subsystem A on ITO at Kyushu University. Login environment If you are using in Japanese, in [cci].bashrc[/cci], the following setting should be implemented to avoid garbled characters in the terminal. [cc] export LANG=en_US.UTF-8 [/cc] Install Anaconda To avoid conflict with the pre-installed Python system, pyenv is installed and used to create a virtual environment. Install pyenv Pyenv can be easily installed as follows: [cc] $ cd ~ $ git clone git://github.com/yyuu/pyenv.git .pyenv [/cc] Edit ~/.bashrc Add the following in .bashrc: [cc] export PYENV_ROOT="${HOME}/.pyenv" if [ -d "${PYENV_ROOT}" ]; then export PATH=${PYENV_ROOT}/bin:$PATH eval "$(pyenv init -)" fi [/cc] You can take a […]

Read more
Uncategorized
Handling SQLite database using Python

Suppose that the file name of SQLite's database is mpos_S.sqlite, its table (like a sheet of Excel) name is mpos_S, and mpos_S contains column data. If the column name of water temperature data is tp, this column tp contains water temperature data. In order to handle it from Python, you need to import sqlite3. First connect to the database and get the cursor cur. [cc] >>> import sqlite3 >>> conn = sqlite3.connect('mpos_S.sqlite') >>> cur = conn.cursor() [/cc] Check information of columns. [cc] >>> cur.execute("PRAGMA TABLE_INFO(mpos_S)") ### Gets information about columns of table mpos_S >>> cols = cur.fetchall() ### Information of a column is a tuple containing 6 elements. >>> print(cols) […]

Read more
StatsModeling
Install PyMC3 on Windows 10 (Anaconda)

I tried installing PyMC on Windows 10 to learn materials in the book of "Bayesian Methods for Hackers", but I encountered problems, which seems owing to suspension of maintenance. I first created a virtual environment of pymc3 and then installed necessary packages using conda: [cc] > conda create -n pymc3 python=3.6 > activate pymc3 > conda install matplotlib > conda install pymc3 [/cc] However, [cci_python]import pymc3[/cci_python] lead to [cci_python]ModuleNotFoundError[/cci_python]. So did [cci_python]import pymc[/cci_python](installing pymc2). Fortunately I found a solution from this article (in Japanese) and summarized how I accommodated below. First I recreated a virtual environment for pymc3 and then started installing Python3.5 instead of Python 3.6. [cc] > deactivate […]

Read more