Segmentation fault in VDP example
Closed this issue · 3 comments
Hi,
I built v1.1-beta on centos7 and tried to run the example, but it showed segmentation fault. Could you help me solve the problem?
Here is the option I used:
scons DEBUG=yes SAME_IC=True LOG_OUTPUT=True LOG_END_ONLY=False t_end=2000.0 t_step=1.0 blas_lapack_dir="/usr/lib64/" blas_lapack_libs="lapack,blas" sundials_inc_dir="/home/appolloford/sundials/inst/include/" sundials_lib_dir="/home/appolloford/sundials/inst/lib/" mechanism_dir=examples/van_der_pol
The lib I used:
sundials-2.6.2
boost-1.68.0
lapack, blas-3.4.2
run and result:
./radau2a-int 1 1
# ODEs: 1
# threads: 1
Segmentation fault
Hi -- sorry for the delayed response! I've been slammed with work (actually working on a re-write of this code to accommodate new OpenCL solvers!).
In any case, a couple of questions:
Are you on the latest master commit? i.e., 3a4fa33
I was able to build and run the VDP example using the following command line:
scons mechanism_dir=./examples/van_der_pol/ DEBUG=no SAME_IC=True LOG_END_ONLY=False LOG_OUTPUT=True t_end=2000 t_step=1.0 cpu
and run using:
>./radau2a-int 1 1
># ODEs: 1
># threads: 1
>Time: 3.872000000000000e-02 sec
>Time per step: 1.936000e-05 (s) 1.936000000000000e-05 (s/thread)
>TFinal: 1.706168e+00
without issue. (note: DEBUG=no is required to avoid the rather silly check on the first entry of the state vector here -- this originated from checking the temperature in chemical kinetic ODEs, you can also just comment that bit out).
The Radau solver doesn't use Sundials or Boost, so only the lapack / blas libraries should be of issue here -- I've used MKL & OpenBLAS w/o issue before, but I don't know that I've used a default serial blas / lapack.
Can you use gdb to track down the source of the segfault, i.e. set scons DEBUG=True
, comment out the lines mentioned above and run:
gdb --args ./radau2a-int 1 1
and see where the segfault occurs?
A valgrind trace (i.e., valgrind --log-file=logf ./radau2a-int 1 1
& copy-paste the resulting logf file here) would be useful as well.
Hi, Thank you for your reply. I have solved the problem. The program reported the error because of the lack of log/
directory. After I added the directory, everything worked.
The version I used is the release version 1.1-beta, instead of the master branch.