Rodeo Desktop (v1.1.23) のインストール (on OS X Mavericks) でつまづいた
まえがき
$ pip install rodeo で入って $ rodeo . で実行するやつは Rodeo Python というやつ(v0.4.4とかなんか)で、これはブラウザを使う Jupyter Notebook みたいなもののようだが、これと Rodeo Desktop は別物。
わかりづらいかもだが github 参照:yhat/rodeo · GitHub
本題
Rodeo Desktop のインストール (on OS X Mavericks) で詰まったのでメモしとく。
既に Jupyter notebook で matplotlib, pandas ともに問題ないのになぜか Rodeo Desktop を Applications フォルダにコピーして起動しようとすると、(a) 正しい Jupyter が(Python が?)みつからんみたいなことを言われるか、(b) 延々とローディングになるか、のいずれかになった。(b) の場合はたまに歯車の絵が止まってフリーズしてるようにも見えるが、これは少し待てばまた回り出すこともある(止まったままのこともある)。
(a) になった場合は実はアプリ自体は起動しているので、でかいバナー以外の場所をクリックするとバナーが消える。で、メニューバーまたは画面右の方にある Preferences で、 Default Python Command が空欄になってると思うので、まずはこれが問題。どうも Mac にデフォで入ってる python *1を見に行ってるとかそういうことのようだ。Anaconda の利用が推奨らしいし、実際すでに Anaconda 利用してるので、ここには /Users/[username]/anaconda/bin/python と入力。[username]のとこはもちろん自分のユーザ名。$(whoami) でもいいのかも。
参照:install Rodeo on OS X El Captain | Liyun's Blog
しかしこれで再起動するとなぜか (b) のエンドレスローディングになった。ここから、Anaconda 再インストール*2してみたり、その上で $ conda update jupyter, $ conda update matplotlib, $ conda update pandas などするも全然ダメ。
なお、anaconda を初めて入れた時(少なくとも anaconda のサイトから GUI インストーラで入れた時)は、まず $ conda update conda してから $ conda update anaconda するといいっぽい。よくわからんが。いきなり $ conda update anaconda すると一部失敗した。しかもその後で $ conda update --all すると matplotlib, pandas などいくつかが互換性のために downgrade される。けど、これはしないほうがいいっぽい?ここもよくわからんけど…
参照:Stuck on "Python is still starting up" for a while on Windows 7 · Issue #134 · yhat/rodeo · GitHub ← ここにある $ pip install --upgrade --force-reinstall
じゃあ、と Rodeo Desktop 自体を消して再インストールしたら、今度はローディングが終わらないので Preferences にすら入れなくなった。やばい。
そこでやけくそで $ conda uninstall matplotlib してみると、今度は「matplotlib がないよ」という警告バナーがでてきた。なのでまたバナーの外をクリックすると… Preferences をやっと触れた… ふー。で、再度 /Users/[username]/anaconda/bin/python と入力して、ついでに Default Working Directory にもなんかしら指定してから*3 Rodeo Desktop を閉じて、$ conda install matplotlib し、再度 Rodeo Desktop を開くと…なぜか不思議な事に起動に成功した。なんだこれ…たぶん再現性ないしもう嫌ですわ…
疲れたので触るのはまた今度かな…(Jupyter Notebookで良かったじゃん、とならないことを祈る…)
amazon cloud drive デスクトップアプリ (Win 7) で co.jp 以外のアカウントでサインインしたい→コンパネ>地域と言語>形式を日本以外にする
サマリ
amazon cloud drive, com の方だと定額で容量無制限があると知り合いに聞いたので試してみようとしたが、デスクトップアプリを開くとなぜか「co.jp にサインインします」みたいな余計なことを勝手にされるし、com を選べなかった。その解決法。
タイトルの通り、Win 7 の場合、amazon cloud drive デスクトップアプリで amazon.co.jp のアカウントでサインインするには、コントロールパネルの「地域と言語 > 形式(英語版なら Region and Language > Formats)」を日本以外にすればよかった。
環境
- Win 7 Enterprise SP1, English
- 日本国外(欧州)からのアクセス
- amazon.co.jp, amazon.com 両方にアカウントあり。メールアドレスは違う
- co.jp, com 両方で cloud drive 申し込み済み(たぶんこれがよくない… co.jp 申し込まなければよかったんじゃないかと思う)
ただ、自分も最初は amazon.co.jp にしかサインインできなかったので。1つずつ設定を変えていった結果の絞り込みで「形式」が判別要因とわかった。したがって OS バージョンやアクセス元位置はとくに関係ないはず。
その他
- amazon cloud drive アプリ自体はおそらく co.jp で落としても com で落としても同じものっぽい(不確実)。一応 com から落とした方を使ってる。
- アカウントの判別はアプリインストール時ではない。つまりコンパネの設定変更ごとに毎回アプリをアンインストール→再インストールする必要はない。
- 「形式」は日本でなければなんでもいいっぽい。が、例えば co.uk でも cloud drive 申し込み済みで形式に US, US どちらでもないところを選んだ場合…どうなるのかは不明
- co.jp のフォーラムかどこかで、「場所 (Location)」や「管理 > システム ロケールの変更 (Administrative > Change system locale)」も変えろというアドバイスを見たが、実際に試した結果、これらは日本のままでも問題なかった。
- Mac はもともと英語で使ってるからか、最初から com アカウントにサインインできた
- com の cloud drive のウェブページは、ずっと下の方にスクロールするとアプリの download リンクがある。サインインする必要はない
しかしこうしてようやく使えるようになったデスクトップアプリ、アップロードはいいとしてダウンロードは個別のファイルを選べず、「全部ダウンロード」しかない。ダメすぎる…。したがって現状はウェブアプリを使えということなのだろう。2016年10月現在、個別のフォルダは選べるようになっているはず。ファイルまで個別に選べるかは確認してない。違う話だけど、Kindle でも cloud reader だと真の全画面表示(バーなど一切なし)ができるのに Kindle for Mac だと必ず邪魔なバーが残る問題と似たものを感じる。要はデスクトップアプリが手抜きっていうかね…
Excel の Conditional Formatting(条件付き書式?)でキーワードにマッチした自動色塗り
まえがき
たぶんエクセルの基本機能なんだろうけど、最近まで気づいてなかった割になかなか便利なのでメモしておく。
計算格子のリージョン管理
最初に使いたかったのは、計算 (CFD) に使ったグリッドを5つのリージョンに分けて、それぞれのリージョン番号ごとにドット絵みたいな感じで色を塗りたいなぁ、というリージョン管理に使いたかった。どの格子をどのリージョンにするかは手作業で決めたくて、エクセルのシート上で「セルに1と打ったら、いちいち塗らなくても青にならないか?」と思っていた。するとまさにそういう機能があった。
こうやって数字を打って色が塗られるので…*1。
遠くに引いてみるとなんとなくリージョンの感じがわかる*2。
計算機のジョブ管理
いまは計算機のジョブ管理にも使ってみている。
こうすると、計算が発散したら status 列(D列)のセルに div と書くだけでいい感じの赤にしてくれる*3。上の図では、同様に run で黄色、 fin(計算終了)で緑にしている。
もちろん単なる「同一」以外に条件式も使えるので、いろいろ応用はありそう。
pythonはじめました(今度こそ)
背景
どうもいつまでたっても python を覚える時間が取れない(取る気がない)なぁと思っていたが、ふと「そうだ、論文用の図を描くのに使ってみよう」と思い立った。グラフの作図、今まではずっと Excel → Powerpoint だった。一度だけ Excel → Adobe Illustrator にしたことがあるが、きれいにはなるのだがさらに作業的な意味でのしんどさが増すばかりだった。まぁ、最終的な論文や学会ポスタ用に一回だけ描くなら超美麗にしていいんだけど、普段からやるのはつらすぎる。自動でそこそこ整形、ってのがいいに決まってる。
候補は
といったところか。で、ちょうどいいので python にしよう、と。
パッケージの種類とインストール
一応前提として僕は Mac OS X 10.9 Mavericks.
ちょっと調べたところ、
- matplotlibというのがよさそうだ→seabornていうwrapperがもっとよさそうだ→(ちょっと試してみた)おおーたしかにきれいだ
- homebrew使ってiTerm 2でpython 2.7を使って(お試しで)いたが、どうやら IPython てのがよさそうだ→名前がJupyterに変わっていた。あと別に複雑なことしないし、もう時期的にもいいかげん python 3 でいいだろう、とも思った
- パッケージ管理ソフトは、homebrewのおかげかpipてのが入っていた(pip3てのではなさげ)→condaてのがよさそうだ
どうやら IPython という python 専用の統合開発環境的なやつ(ちがうかも)だったのが、他の言語にも対応してるよってのが Jupyter みたいだ。が、肝心の Fortran まだか…*1。
というわけで、まず Jupyter のインストールのとこにいくと、初めてなら Anaconda を入れるのを highly recommend というので入れた。この anaconda と conda の違いがよくわからんけど(コマンド名が conda?)、まぁとにかく pip と同様のパッケージ管理ソフトみたいで、後発な分ちょっと上等みたいだ。そうすると、あとは iTerm をひらいて、
$ conda install jupyter
してから、
$ conda install seaborn
すると、matlibplot やら numpy やら pandas やらの必要なパッケージは全部自動で入れてくれるっぽい。楽ちん(これは pip でも同じだったが)。自分の場合、Linux (CentOS) で yum に慣れてたので、こういうパッケージ管理ソフトには抵抗感がないのは助かる。
と、いってる間にインストール終わったみたいだ。さて…とりあえず寝るか(駄目パタン)
連番ファイルを個別に xz で圧縮/解凍
natures flyers: コマンドライン (linux, cygwin) での個別ファイルのバッチ圧縮解凍 → xargs使う に書いたんだけどゴチャゴチャしてるので、必要な部分のみメモ。
前提
圧縮
元ファイルを消す場合
$ ls *.xyz | xargs -n1 -I{} xz {} &
元ファイルを残す場合
$ ls *.xyz | xargs -n1 -I{} xz -k {} &
解凍
アーカイブファイルを消す場合
$ ls *.xz | xargs -n1 -I{} xz -d {} &
アーカイブファイルを残す場合
$ ls *.xz | xargs -n1 -I{} xz -dk {} &
応用
上では簡単のため、ファイルのあるディレクトリに移動した後にコマンド実行するケースを想定した。しかし、いちいち cd するのは面倒なので、もっと上層から ls ./foo/bar/output/*.xyz のようにやってもよい。さらにいうと、たとえば計算結果が複数のケースにわたって
- ./case1/output/00001.xyz , ./case1/output/00002.xyz , ...
- ./case2/output/00001.xyz , ./case2/output/00002.xyz , ...
のようにあって、ディレクトリ構造が同じであれば、
$ ls ./case*/output/*.xyz | xargs -n1 -I{} xz {} &
で一気に圧縮できる。
このように、アステリスクでのワイルドカードはかなり便利なので、なるべくディレクトリ(フォルダ)名は連番とか構造を保つような名前にしておくとよい。
ただし、マルチスレッドで同時に(並行に)圧縮したい場合はわざとバラバラにジョブを投入するべき。計算機じゃなくて普段使いのPCの場合1スレッドは残しとかないと動作がかなり重くなるで注意。
du でサイズ順にソート
ググったらあったので自分用に僅かに変えてメモ。
基本的には
shell - duコマンドのサイズをわかりやすく表示してサイズ順にソートする - Qiita
にあるとおり。
手元の Cygwin だとすんなりできたけど、別のPCの Cygwin には GNU coreutils が入ってなかったのでインストールが必要だった。
自分の場合、普段はカレントの直下のディレクトリだけ見たいから
$ du -sh ./*
としていた。
上記ページのコマンドは
$ du -b | sort -n | numfmt --to=iec --suffix=B --padding=5
だが、これだとカレントより下の全部のファイルが表示されてしまう(du に -s オプションをつけてないので)。したがって、これを
$ du -sb ./* | sort -n | numfmt --to=iec --suffix=B --padding=5
と書き換えればうまくいった。
しかしこれ、長くて覚えづらいよな…まてよ…表示は汚くなるけど、順番だけ見たいなら後半の整形部分をなくして
$ du -sb ./* | sort -n
これでいいわけだな。
余談。最近、Fortranのコンパイルオプションの参考にしてたウェブページがアクセス制限かかって見れなくなった(イントラのみ閲覧可っぽい)ので、ほとんど同じ内容でもメモしとくのは無駄ではないなと。まぁ EverNote にキャプチャしとくだけでもいいっちゃいいけど、微妙に違うことしたい場合はこうしてブログエントリにメモしておくのもありだろう。
Fortran で、form="unformatted", access="stream" で wirte されたファイルを read する
前置き
natures flyers: Fortran でのバイナリ (unformatted, binary) の扱いについてのメモ では write しか考えてなかった。なぜなら FIELDVIEW という可視化ソフトで読み込むことだけ考えてたので。でも今ちょっと、書きだしたデータを読み込んで処理したいなと思ってる。なので読み込み方を例によって trial & error で調べてみた。
Reference
参考にしたのはこのページくらい→ streamIO
open
ファイルの open 自体はそんな難しくない。こんな感じ。
open( & & unit = filenumber & & , file = filename_in & & , iostat = istat & & , action = "read" & & , form = "unformatted" & & , access = "stream" & & , status = "old" & & , position = "rewind" & & )
ちゃんと動くコードはこのエントリ後半に掲載した。
read
これがちょっと面倒。read( ファイル名, pos=現在位置 ) のようにする必要がある。ポイントは「ファイル内での現在位置」を常に把握しておく、ということ。
そのために、loc という変数を用意してみた。これをまず 0 で初期化する。で、ファイルの先頭から読みとりを始めるわけだけど、pos は1から始まる正の整数。そこで、常に pos=loc+1 として、読み取った直後にいま読んだ変数の長さ分 loc にたしてやることにする。
とりあえず int, real(4), real(8) の3パタンだけ短いサブルーチンを作って、モジュールにまとめてみた。
読み取りモジュール
module mod__scan_str implicit none private public :: scan_int_str public :: scan_real_str public :: scan_dble_str integer, parameter :: len_int = 4 integer, parameter :: len_real = 4 integer, parameter :: len_dble = 8 contains subroutine scan_int_str( & & n_file_in & & , loc & & , scanned_int & & ) implicit none integer, intent(in) :: n_file_in integer, intent(inout) :: loc integer, intent(out) :: scanned_int !!------------------------------ read(n_file_in, pos=loc+1) scanned_int loc = loc +len_int return endsubroutine scan_int_str subroutine scan_real_str( & & n_file_in & & , loc & & , scanned_real & & ) implicit none integer, intent(in) :: n_file_in integer, intent(inout) :: loc real(4), intent(out) :: scanned_real !!------------------------------ read(n_file_in, pos=loc+1) scanned_real loc = loc +len_real return endsubroutine scan_real_str subroutine scan_dble_str( & & n_file_in & & , loc & & , scanned_dble & & ) implicit none integer, intent(in) :: n_file_in integer, intent(inout) :: loc real(8), intent(out) :: scanned_dble !!------------------------------ read(n_file_in, pos=loc+1) scanned_dble loc = loc +len_dble return endsubroutine scan_dble_str endmodule mod__scan_str
注意事項
正直、自分は kind 関係のことはよくわかってない。なので len_int とかのとこはたぶん本当は selected_int_kind とかなんとかやるべきなんだろうけど(環境依存性に対処するために?)、 4 とかベタ書きしちゃってる。
テストコード
上のモジュールをテストするためのコード。
include 'mod__open_to_read.f90' include 'mod__open_to_write.f90' include 'mod__scan_str.f90' module mod__sub use mod__open_to_read, only : open_to_read_unform_str use mod__open_to_write, only : open_to_write_unform_str_rewind use mod__scan_str implicit none private public :: main_part contains subroutine main_part implicit none integer, parameter :: n_int = 1 !! テスト用変数の数。任意。以下同様 integer, parameter :: n_real = 2 integer, parameter :: n_dble = 3 integer :: arr_int( n_int) real(4) :: arr_real(n_real) real(8) :: arr_dble(n_dble) !! temporary integer :: i !! 現在位置 integer, save :: loc !! file numbers & names integer, save :: n_file_out integer, save :: n_file_in character(len=72), save :: file_out character(len=72), save :: file_in !! 結果の表示 integer :: scanned_int real(4) :: scanned_real real(8) :: scanned_dble !!------------------- !! set numbers do i=1,n_int arr_int(i) = i enddo do i=1,n_real arr_real(i) = real(i,4) enddo do i=1,n_dble arr_dble(i) = dble(i) enddo !! unformatted, stream で書き出し n_file_out = 30 file_out = 'unformatted_stream.dat' call open_to_write_unform_str_rewind( n_file_out, file_out ) write(n_file_out) (arr_dble(i)*1, i=1,n_dble) write(n_file_out) (arr_real(i)*1, i=1,n_real) write(n_file_out) (arr_int(i) *1, i=1,n_int ) close(n_file_out) !! 上で書き出したものを読み込んで表示し、確認する n_file_in = 40 file_in = file_out call open_to_read_unform_str( n_file_in, file_in ) !! save 属性指定するだけで 0 に初期化されるが、念の為に再度初期化しておく。 loc = 0 !! 以下の読み込み順は write した時に合わせないともちろんダメ !! double do i=1,n_dble call scan_dble_str(n_file_in,loc,scanned_dble) !! intent(in,inout,out) write(*,*) scanned_dble enddo !! real do i=1,n_real call scan_real_str(n_file_in,loc,scanned_real) !! intent(in,inout,out) write(*,*) scanned_real enddo !! integer do i=1,n_int call scan_int_str(n_file_in,loc,scanned_int) !! intent(in,inout,out) write(*,*) scanned_int enddo close(n_file_in) return endsubroutine main_part endmodule mod__sub program test_unform_str use mod__sub, only : main_part implicit none call main_part stop endprogram test_unform_str
ただしここで、以下のファイルオープンモジュール(read用、write用)を使っている。
read用
module mod__open_to_read implicit none private public :: open_to_read__run public :: open_to_read_unform_seq public :: open_to_read_unform_str contains subroutine open_to_read__run( filenumber, filename_in ) implicit none integer, intent(in) :: filenumber !! filenumber to assign character(len=72), intent(in) :: filename_in !! filename as variable (not the actual text file name) integer :: istat=0 !!--------------------- write(*,"(2x,'opening [ ',a48,' ]... ',$)") filename_in !! file open, w/ error handling ! open(filenumber,file=filename_in,status="old",iostat=istat,form="formatted",position="rewind",action="read") open( & & unit = filenumber & & , file = filename_in & & , iostat = istat & & , action = "read" & & , status = "old" & & , position = "rewind" & & , form = "formatted" & ! & , access = "sequential" & & ) if( istat == 0 ) then write(*,"('... [ ',a48,' ] was successfully opened.')") filename_in return else write(*,"(/,2x,'Error: The file [ ',a48,' ] ',/,' does not exist (istat =',i2,'). Aborting...',/)") filename_in, istat stop endif return endsubroutine open_to_read__run subroutine open_to_read_unform_seq( filenumber, filename_in ) implicit none integer, intent(in) :: filenumber !! filenumber to assign character(72), intent(in) :: filename_in !! filename as variable (not the actual text file name) integer :: istat=0 !!--------------------- write(*,"(2x,'opening [ ',a48,' ]... ',$)") filename_in !! file open, w/ error handling open( & & unit = filenumber & & , file = filename_in & & , iostat = istat & & , action = "read" & & , status = "old" & & , position = "rewind" & & , form = "unformatted" & & , access = "sequential" & & ) if( istat == 0 ) then write(*,"('... [ ',a48,' ] was successfully opened.')") filename_in return else write(*,"(/,2x,'Error: The file [ ',a48,' ] ',/,' does not exist (istat =',i2,'). Aborting...',/)") filename_in, istat stop endif return endsubroutine open_to_read_unform_seq subroutine open_to_read_unform_str( filenumber, filename_in ) implicit none integer, intent(in) :: filenumber !! filenumber to assign character(72), intent(in) :: filename_in !! filename as variable (not the actual text file name) integer :: istat=0 !!--------------------- write(*,"(2x,'opening [ ',a48,' ]... ',$)") filename_in !! file open, w/ error handling open( & & unit = filenumber & & , file = filename_in & & , iostat = istat & & , action = "read" & & , form = "unformatted" & & , access = "stream" & & , status = "old" & & , position = "rewind" & & ) if( istat == 0 ) then write(*,"('... [ ',a48,' ] was successfully opened.')") filename_in return else write(*,"(/,2x,'Error: The file [ ',a48,' ] ',/,' does not exist (istat =',i2,'). Aborting...',/)") filename_in, istat stop endif return endsubroutine open_to_read_unform_str endmodule mod__open_to_read
write用
module mod__open_to_write implicit none private public :: open_to_write_form_rewind !! formatted, rewind public :: open_to_write_form_append !! formatted, append public :: open_to_write_unform_seq_rewind !! unformatted, sequential, rewind public :: open_to_write_unform_seq_append !! unformatted, sequential, append public :: open_to_write_unform_str_rewind !! unformatted, stream, rewind contains subroutine open_to_write_form_rewind( filenumber, filename_in ) implicit none integer, intent(in) :: filenumber character(len=72), intent(in) :: filename_in integer :: istat=0 !!--------------------- write(*,"(2x,'opening [ ',a48,' ]... ',$)") filename_in open( & & unit = filenumber & & , file = filename_in & & , iostat = istat & & , action = "write" & & , form = "formatted" & & , status = "replace" & & , position = "rewind" & & ) if( istat == 0 ) then write(*,"('... [ ',a48,' ] was successfully opened.')") filename_in return else write(*,"(/,2x,'Error: The file [ ',a36,' ] ',/,' does not exist (istat =',i2,'). Aborting...',/)") filename_in, istat stop endif return endsubroutine open_to_write_form_rewind subroutine open_to_write_form_append( filenumber, filename_in ) implicit none integer, intent(in) :: filenumber character(len=72), intent(in) :: filename_in integer :: istat=0 !!--------------------- write(*,"(2x,'opening [ ',a48,' ]... ',$)") filename_in open( & & unit = filenumber & & , file = filename_in & & , iostat = istat & & , action = "write" & & , form = "formatted" & & , status = "old" & & , position = "append" & & ) if( istat == 0 ) then write(*,"('... [ ',a48,' ] was successfully opened.')") filename_in return else write(*,"(/,2x,'Error: The file [ ',a36,' ] ',/,' does not exist (istat =',i2,'). Aborting...',/)") filename_in, istat stop endif return endsubroutine open_to_write_form_append subroutine open_to_write_unform_seq_rewind( filenumber, filename_in ) implicit none integer, intent(in) :: filenumber character(len=72), intent(in) :: filename_in integer :: istat=0 !!--------------------- write(*,"(2x,'opening [ ',a48,' ]... ',$)") filename_in open( & & unit = filenumber & & , file = filename_in & & , iostat = istat & & , action = "write" & & , form = "unformatted" & & , access = "sequential" & & , status = "replace" & & , position = "rewind" & & ) if( istat == 0 ) then write(*,"('... [ ',a48,' ] was successfully opened.')") filename_in return else write(*,"(/,2x,'Error: The file [ ',a36,' ] ',/,' does not exist (istat =',i2,'). Aborting...',/)") filename_in, istat stop endif return endsubroutine open_to_write_unform_seq_rewind subroutine open_to_write_unform_seq_append( filenumber, filename_in ) implicit none integer, intent(in) :: filenumber character(len=72), intent(in) :: filename_in integer :: istat=0 !!--------------------- write(*,"(2x,'opening [ ',a48,' ]... ',$)") filename_in open( & & unit = filenumber & & , file = filename_in & & , iostat = istat & & , action = "write" & & , form = "unformatted" & & , access = "sequential" & & , status = "old" & & , position = "append" & & ) if( istat == 0 ) then write(*,"('... [ ',a48,' ] was successfully opened.')") filename_in return else write(*,"(/,2x,'Error: The file [ ',a36,' ] ',/,' does not exist (istat =',i2,'). Aborting...',/)") filename_in, istat stop endif return endsubroutine open_to_write_unform_seq_append subroutine open_to_write_unform_str_rewind( filenumber, filename_in ) implicit none integer, intent(in) :: filenumber character(72), intent(in) :: filename_in integer :: istat=0 !!--------------------- write(*,"(2x,'opening [ ',a48,' ]... ',$)") filename_in open( & & unit = filenumber & & , file = filename_in & & , iostat = istat & & , action = "write" & & , form = "unformatted" & & , access = "stream" & & , status = "replace" & & , position = "rewind" & & ) if( istat == 0 ) then write(*,"('... [ ',a48,' ] was successfully opened.')") filename_in return else write(*,"(/,2x,'Error: The file [ ',a36,' ] ',/,' does not exist (istat =',i2,'). Aborting...',/)") filename_in, istat stop endif return endsubroutine open_to_write_unform_str_rewind endmodule mod__open_to_write
汚いけど、とりあえず公開。あ、こういうのこそ github 使うべきなのか…(いまさら)
実行結果
こんな感じになるはず
$ ./a.exe opening [ unformatted_stream.dat ]... ... [ unformatted_stream.dat ] was successfully opened. opening [ unformatted_stream.dat ]... ... [ unformatted_stream.dat ] was successfully opened. 1.0000000000000000 2.0000000000000000 3.0000000000000000 1.00000000 2.00000000 1