Delft 3Dを始めてみよう (4) - 付属波の計算例の実行エラーを修正
前回はコンパイルは上手く行ったのですが、例にある波の計算がエラーで出来なかったところでした。
vagrant@ubuntu-bionic:~/delft3d_repository/examples/07_wave$ ./run.sh mdw-file : obw.mdw D3D_HOME : /home/vagrant/delft3d_repository/src/bin/.. Working directory: /home/vagrant/delft3d_repository/examples/07_wave executing: /home/vagrant/delft3d_repository/src/bin/../bin/wave obw.mdw 0 -------------------------------------------------------------------------------- - Delft3D - Deltares, Delft3D-WAVE Version 3.07.00.66656, May 23 2020, 23:01:03 - Open source - -------------------------------------------------------------------------------- *** MESSAGE: Delft3D-WAVE runs stand alone Done reading input Initialising grids and grid mappings Start loop over SWAN grids, time = 0.000 Allocate input fields Allocate and read SWAN depth Write SWAN depth file Deallocate input fields Write SWAN input <<Run SWAN... >>...Check file swan_sh.log /home/vagrant/delft3d_repository/src/bin/../bin/swan_4072ABCDE_del_l64_i11_omp.exe: error while loading shared libraries: libiomp5.so: cannot open shared object file: No such file or directory mv: cannot stat 'PRINT': No such file or directory *** WARNING: unable to run SWAN using "swan.sh". Trying with "swan.bat" ... sh: 1: swan.bat: not found >>...End of SWAN run *** ERROR: file 'norm_end' expected to signal a correct SWAN calculation ERROR: *** ERROR: file 'norm_end' expected to signal a correct SWAN calculation Wave exited abnormally terminate called after throwing an instance of 'char const*' Program received signal SIGABRT: Process abort signal. Backtrace for this error: #0 0x1476a6bdd2ed in ??? #1 0x1476a6bdc503 in ???
エラーメッセージを良くみてみるとlibiomp5.so
というライブラリファイルがないので起動出来ないとなっています。
デルフト3Dのディレクトリ内を探してみるとファイルはあるようなのでPATHが通っていないのが原因のようです。
vagrant@ubuntu-bionic:~/delft3d_repository$ find ./ -name libiomp5.so ./src/third_party_open/swan/bin/linux/libiomp5.so ./src/third_party_open/esmf/lnx64/bin/libiomp5.so
実行スクリプトのrun.sh
をみてみると
vagrant@ubuntu-bionic:~/delft3d_repository/examples/07_wave$ cat run.sh #!/bin/bash ../../src/bin/run_dwaves.sh obw.mdw
別のスクリプト../../src/bin/run_dwaves.sh
を呼んでいるようなので、この中の実行ファイルを呼んでいるあたりをみてみます。
export LD_LIBRARY_PATH=$libdir:$LD_LIBRARY_PATH export PATH=$bindir:$PATH echo "executing:" echo "$bindir/wave $mdwfile 0" echo $bindir/wave $mdwfile 0
LD_LIBRARY_PATH
に無理やり先程見つけたファイルのフォルダを追加してみましょう。
export LD_LIBRARY_PATH=$libdir:$LD_LIBRARY_PATH:/home/vagrant/delft3d_repository/src/third_party_open/swan/bin/linux export PATH=$bindir:$PATH echo "executing:" echo "$bindir/wave $mdwfile 0" echo $bindir/wave $mdwfile 0
もう一度計算を実行してみます。
vagrant@ubuntu-bionic:~/delft3d_repository/examples/07_wave$ ./run.sh mdw-file : obw.mdw D3D_HOME : /home/vagrant/delft3d_repository/src/bin/.. Working directory: /home/vagrant/delft3d_repository/examples/07_wave executing: /home/vagrant/delft3d_repository/src/bin/../bin/wave obw.mdw 0 -------------------------------------------------------------------------------- - Delft3D - Deltares, Delft3D-WAVE Version 3.07.00.66656, May 23 2020, 23:01:03 - Open source - -------------------------------------------------------------------------------- *** MESSAGE: Delft3D-WAVE runs stand alone Done reading input Initialising grids and grid mappings Start loop over SWAN grids, time = 0.000 Allocate input fields Allocate and read SWAN depth Write SWAN depth file Deallocate input fields Write SWAN input <<Run SWAN... >>...Check file swan_sh.log >>...End of SWAN run Allocate output fields Read SWAN output Write WAVE map file, nest 1 time 0.000 Time written 0 Write WAVE NetCDF map file, nest 1 time 0.000 Write WAVE NetCDF his file, nest 1 time 0.000 Start loop over SWAN grids, time = 60.000 Allocate input fields Allocate and read SWAN depth Write SWAN depth file Deallocate input fields Write SWAN input <<Run SWAN... >>...Check file swan_sh.log >>...End of SWAN run Allocate output fields Read SWAN output Write WAVE map file, nest 1 time 60.000 Time written 60 Write WAVE NetCDF map file, nest 1 time 60.000 Write WAVE NetCDF his file, nest 1 time 60.000 Delft3D-WAVE finished normally.
正常に計算できました。次回は計算結果をプロットしてみましょう。