fortran66のブログ

fortran について書きます。

2014-01-01から1年間の記事一覧

Fortran の変数に Python からアクセスする。

メモ帳 参考サイト http://docs.python.jp/contrib/ctypes/tutorial_jp.html http://slashdot.jp/journal/445869/python-ctypes%E4%BD%BF%E3%81%A3%E3%81%A6%E3%81%BF%E3%81%9F%E3%80%82 http://docs.python.jp/2/library/ctypes.html Fortran ソース・プロ…

IPython + CTypes + Intel Visual Fortran, Mandelbrot set

Fortran の 配列を Python 側と DLL で共有して引き渡しています。 Mandelbrot 集合の計算は一瞬で終わりますが、Python で配列をタプルの配列に変換するループが遅すぎてこっちの方で地獄のように時間がかかります。I/O をかませたとしても Fortran 側で BM…

IPython + f2py ( Intel Visual Fortran ) Mandelbrot set

備忘メモ帳 よくわからんwww インテル(R) 64 Visual Studio 2010 モード コマンドプロンプトより (Canopy command prompt はなぜだか不可) chcp 437 "C:\Program Files (x86)\Intel\Composer XE 2013 SP1\bin\ipsxe-comp-vars.bat" intel64 vs2010 "C:\P…

NAGのサイトにある『数値解の品質について』

数値解の品質について http://www.nag-j.co.jp/nagcourse/numerical/quality/index.htm 原文 An Introduction to the Quality of Computed Solutions Sven Hammarling http://eprints.ma.man.ac.uk/101/01/covered/MIMS_ep2005_29_pdf_with_hyperlinks.pdf

Python ctypes module による Fortran との連携。

参考ページ 2012-10-17 PythonからFortranのサブルーチンを呼ぶ。 http://d.hatena.ne.jp/ignisan/20121017 How to create Fortran DLL in Visual Studio with Intel Fortran compiler http://sukhbinder.wordpress.com/2011/04/14/how-to-create-fortran-dl…

Python Tools for Visual Studio

Python Tools for Visual Studio (PTVS) http://www.hanselman.com/blog/OneOfMicrosoftsBestKeptSecretsPythonToolsForVisualStudioPTVS.aspx VS2010用をインストール。Intel Visual Fortran 付属の VS2010 にも Python 統合おk。 VS2010 に IPython が統…

Windows 64bit + Python 64bit + f2py (Intel Visual Fortran + Microsoft Windows SDK)

メモ帳 参考ページ Python 64bit IPython->Install->Enthought Canopy http://ipython.org/install.html Python のことはよく知らないので、Enthought Canopy で 64bit 2.7 系のお任せコース選択。 Microsoft Windows SDK (C++ Compiler) Compiling 64-bit …

Mandelbrot BMP 改2

module m_bmp use, intrinsic :: iso_fortran_env implicit none type :: t_bmp_file_header sequence integer(int16) :: bfType = transfer('BM', 0_int16) ! BitMap integer(int32) :: bfSize ! file size in bytes integer(int16) :: bfReserved1 = 0 ! a…

Mandelbrot BMP 改

ISO_FORTRAN_ENV で KIND を指定 拡大倍率をあげられるように実数は倍精度にしました。 ソース・プログラム 戯れに RETURN 文を省略してみました。本来は付ける派閥なんですが・・・ module m_bmp use, intrinsic :: iso_fortran_env implicit none type :: …

BMP file 生成

Mandelbrot 図形の BMPファイルを生成する。 Windows Bitmap Format を 24bit で生成することを仮定しています。 Intel Fortran の Kind 属性と Little Endian も仮定しています。 OOP的な構成にしようと思ったのですが、構造体に sequence 属性をつけると c…

OpenMP MPI-3.0

SC13 Tutorial: Hybrid MPI and OpenMP Parallel Programming 2013年 http://openmp.org/wp/sc13-tutorial-hybrid-mpi-and-openmp-parallel-programming/ MPI-3.0 2012年 http://tu-dresden.de/die_tu_dresden/zentrale_einrichtungen/zih/veranstaltungen/z…

Fortran2003 Handbook の errata

Fortran2003 Handbook の errata が出ているようです。 http://www.fortran.com/fortran-2003-handbook-errata/

1976 Matrix Singular Value Decomposition Film

1976 Matrix Singular Value Decomposition Film ...

密行列と粗行列のCG法を単一のルーチンで記述

密行列と粗行列のCG法(共役勾配法)による線型方程式の解法を、オブジェクト指向機能を用いて単一のルーチンで記述してみました。行列とベクトルの積をそれぞれの行列形式について定義し、それを「*」演算子に総称化させることで可能になります。 abstract…

USB無線LANが接続切らずに接続制限で使えなくなる件

Windows8.1 で USB WiFi 無線LAN子機が、接続後数十秒から数分以内に接続を確立したまま通信不能に陥るという謎地獄に苦しんでいたのですが、先日無事解決したのでメモっておきます。 結論から書きますと、WiFiアダプターへの省電力設定のためだったようです…

Fortran2003 OOP memo

参考 Modern Fortran Explained §14.6 module m_base implicit none type, abstract :: t_matrix contains procedure(op2), deferred :: prdct generic, public :: operator(*) => prdct end type t_matrix abstract interface function op2(mat, vec) resul…

Intel Visual Fortran の Visual Studio 2010 での Help Viewer

インストールのデフォルトだとブラウザによるヘルプ表示になってしまうのですが、独立した Help Viewer で見られるようにする方法を自分用にメモっておきます。 素直に MS Update で VS2010 のサービスパックが適用されればいいのですが、なぜかエラーが出る…

Numerical Computing with Modern Fortran

Intel の Dr.Fortran こと Steve Lionel が最近出版になった Numerical Computing with Modern Fortran by Richard J. Hanson and Tim Hopkins についてレヴューを書いています。著者の一人(R.J.H) は IMSL ライブラリの開発元だった Visual Numerics, Inc.…