mickyaero / moose-core

C++ basecode and python scripting interface
GNU General Public License v3.0
0 stars 0 forks source link

Data Extraction Code Is giving Seg fault #4

Open mickyaero opened 6 years ago

mickyaero commented 6 years ago

The data extraction code is giving segmentation fault. The day you wrote it, it was not giving errors. Could you please see if the code is correct? The code in Clock.cu file seems to be correct as I copied the code that was working but still it gave errors, therefore, the problem is in some other file.

dilawar commented 6 years ago

Commit number which reproduce this ?

dilawar commented 6 years ago

Also post the backtrace of seg-fault in gdb. Do not take the screenshot but copy-paste the text from terminal.

mickyaero commented 6 years ago

Program received signal SIGSEGV, Segmentation fault. 0x0000000002297740 in ?? () (gdb) bt

0 0x0000000002297740 in ?? ()

1 0x00007fffefa1d87d in VoxelPools::updateRates(double const, double) const () from /home/micky/moose-core/_build/python/moose/_moose.so

2 0x00007fffefa24b0d in unsigned long boost::numeric::odeint::detail::integrate_adaptive<boost::numeric::odeint::controlled_runge_kutta<boost::numeric::odeint::runge_kutta_cash_karp54<std::vector<double, std::allocator >, double, std::vector<double, std::allocator >, double, boost::numeric::odeint::range_algebra, boost::numeric::odeint::default_operations, boost::numeric::odeint::initially_resizer>, boost::numeric::odeint::default_error_checker<double, boost::numeric::odeint::range_algebra, boost::numeric::odeint::default_operations>, boost::numeric::odeint::initially_resizer, boost::numeric::odeint::explicit_error_stepper_tag>, BoostSys, std::vector<double, std::allocator >, double, boost::numeric::odeint::null_observer>(boost::numeric::odeint::controlled_runge_kutta<boost::numeric::odeint::runge_kutta_cash_karp54<std::vector<double, std::allocator >, double, std::vector<double, std::allocator >, double, boost::numeric::odeint::range_algebra, boost::numeric::odeint::default_operations, boost::numeric::odeint::initially_resizer>, boost::numeric::odeint::default_error_checker<double, boost::numeric::odeint::range_algebra, boost::numeric::odeint::default_operations>, boost::numeric::odeint::initially_resizer, boost::numeric::odeint::explicit_error_stepper_tag>, BoostSys, std::vector<double, std::allocator >&, double&, double, double&, boost::numeric::odeint::null_observer, boost::numeric::odeint::controlled_stepper_tag) () from /home/micky/moose-core/_build/python/moose/_moose.so

3 0x00007fffefa27651 in unsigned long boost::numeric::odeint::integrate_adaptive<boost::numeric::odeint::controlled_runge_kutta<boost::numeric::odeint::runge_kutta_cash_karp54<std::vector<double, std::allocator >, double, std::vector<double, std::allocator >, double, boost::numeric::odeint::range_algebra, boost::numeric::odeint::default_operations, boost::numeric::odeint::initially_resizer>, boost::numeric::odeint::default_error_checker<double, boost::numeric::odeint::range_algebra, boost::numeric::odeint::default_operations>, boost::numeric::odeint::initially_resizer, boost::numeric::odeint::explicit_error_stepper_tag>, BoostSys, std::vector<double, std::allocator >, double>(boost::numeric::odeint::controlled_runge_kutta<boost::numeric::odeint::runge_kutta_cash_karp54<std::vector<double, std::allocator >, double, std::vector<double, std::allocator >, double, boost::numeric::odeint::range_algebra, boost::numeric::odeint::default_operations, boost::numeric::odeint::initially_resizer>, boost::numeric::odeint::default_error_checker<double, boost::numeric::odeint::range_algebra, boost::numeric::odeint::default_operations>, boost::numeric::odeint::initially_resizer, boost::numeric::odeint::explicit_error_stepper_tag>, BoostSys, std::vector<double, std::allocator >&, double, double, double) () from /home/micky/moose-core/_build/python/moose/_moose.so

4 0x00007fffefa1e135 in VoxelPools::advance(ProcInfo const*) () from /home/micky/moose-core/_build/python/moose/_moose.so

5 0x00007fffefa5429c in Ksolve::process(Eref const&, ProcInfo const*) () from /home/micky/moose-core/_build/python/moose/_moose.so

6 0x00007fffefad3793 in Clock::handleStep(Eref const&, unsigned long) () from /home/micky/moose-core/_build/python/moose/_moose.so

7 0x00007fffef7d2214 in Shell::doStart(double, bool) () from /home/micky/moose-core/_build/python/moose/_moose.so

8 0x00007fffef4b95f6 in moose_start(_object, _object) () from /home/micky/moose-core/_build/python/moose/_moose.so

9 0x00000000004c468a in PyEval_EvalFrameEx ()

10 0x00000000004c9d8f in PyEval_EvalFrameEx ()

11 0x00000000004c9d8f in PyEval_EvalFrameEx ()

12 0x00000000004c2765 in PyEval_EvalCodeEx ()

13 0x00000000004c2509 in PyEval_EvalCode ()

14 0x00000000004f1def in ?? ()

15 0x00000000004ec652 in PyRun_FileExFlags ()

16 0x00000000004eae31 in PyRun_SimpleFileExFlags ()

17 0x000000000049e14a in Py_Main ()

18 0x00007ffff7810830 in __libc_start_main (main=0x49dab0
, argc=2, argv=0x7fffffffddc8, init=, fini=,

rtld_fini=<optimized out>, stack_end=0x7fffffffddb8) at ../csu/libc-start.c:291

19 0x000000000049d9d9 in _start ()

mickyaero commented 6 years ago

commit number - 69b22a7 .

dilawar commented 6 years ago

Did you commit all file? I am getting /home1/dilawars/Work.SVN/OTHERS/Micky/moose-core/_build/libmoose.so: undefined reference tovoxelPoolToCudaOdeSystem(VoxelPools&, CudaOdeSystem*)`.

I noticed that this function is declared in CudaKsolve.h file. The .so file links but not the moose.bin. Most likely the signature of function is wrong.

Some source code with function voxelPoolToCudaOdeSystem is not added to git.

I am on branch issue4.

dilawar commented 6 years ago

Commit 6af2bdc61 brings the code back to pristine state. I've added my CudaKsolve.cu since it was missing from repo.

After compilation ( cd tests/gpu && make ) runs. It still gives seg-fault but at the very end. See if you can reproduce these results.

Update CudaKsolve.cu with your version and check again.

mickyaero commented 6 years ago

The branch which has the latest code is issue 3 and CudaKsolve.cu is not there. I ran the code in issue4 branch, it gave errors at the end

dilawar commented 6 years ago

So which commit I should try to debug? I tried 69b22a7 (as you mentioned) but it does not compile/link due to missing file. I need a working commit which reproduces the bug.

mickyaero commented 6 years ago

okay, then issue 3 branch has the latest code. This branch will reproduce the bug

dilawar commented 6 years ago

Merged issue3 branch on issue4. Runs fine. (commit ~69b22a7~ 13756d87559ff2f846c1b82c601a1c21abc578e3).

( cd ../tests/gpu/ && make )
With Cuda
PYTHONPATH=/home1/dilawars/Work.SVN/OTHERS/Micky/moose-core/tests/gpu/../../_build/python python test_ksolve.py
No CPU information available. Assuming single core.
No CPU information available. Assuming single core.
on node 0, numNodes = 1, numCores = 1
[INFO] Time to define moose classes:0.015089
[INFO] Time to initialize module:0.03331
[INFO] Using moose from /home1/dilawars/Work.SVN/OTHERS/Micky/moose-core/_build/python/moose/__init__.py
Volume of cylinder a is 3.14159e-06
Debug: Setting stoich for voxel 0
Debug: Setting stoich for voxel 1
Debug: Setting stoich for voxel 2
Debug: Setting stoich for voxel 3
Debug: Setting stoich for voxel 4
Debug: Setting stoich for voxel 5
Debug: Setting stoich for voxel 6
Debug: Setting stoich for voxel 7
Debug: Setting stoich for voxel 8
Debug: Setting stoich for voxel 9
== Before simulation
        A0 = 0.10000 18919115495278220
        B0 = 0.00000 34
        C0 = 0.00100 189191154952782
        A1 = 0.10000 18919115495278220
        B1 = 0.00000 34
        C1 = 0.00100 189191154952782
        A2 = 0.10000 18919115495278220
        B2 = 0.00000 34
        C2 = 0.00100 189191154952782
        A3 = 0.10000 18919115495278220
        B3 = 0.00000 34
        C3 = 0.00100 189191154952782
        A4 = 0.10000 18919115495278220
        B4 = 0.00000 34
        C4 = 0.00100 189191154952782
        A5 = 0.10000 18919115495278220
        B5 = 0.00000 34
        C5 = 0.00100 189191154952782
        A6 = 0.10000 18919115495278220
        B6 = 0.00000 34
        C6 = 0.00100 189191154952782
        A7 = 0.10000 18919115495278220
        B7 = 0.00000 34
        C7 = 0.00100 189191154952782
        A8 = 0.10000 18919115495278220
        B8 = 0.00000 34
        C8 = 0.00100 189191154952782
        A9 = 0.10000 18919115495278220
        B9 = 0.00000 34
        C9 = 0.00100 189191154952782
       A10 = 0.10000 18919115495278220
       B10 = 0.00000 34
       C10 = 0.00100 189191154952782
       A11 = 0.10000 18919115495278220
       B11 = 0.00000 34
       C11 = 0.00100 189191154952782
       A12 = 0.10000 18919115495278220
       B12 = 0.00000 34
       C12 = 0.00100 189191154952782
       A13 = 0.10000 18919115495278220
       B13 = 0.00000 34
       C13 = 0.00100 189191154952782
       A14 = 0.10000 18919115495278220
       B14 = 0.00000 34
       C14 = 0.00100 189191154952782
       A15 = 0.10000 18919115495278220
       B15 = 0.00000 34
       C15 = 0.00100 189191154952782
       A16 = 0.10000 18919115495278220
       B16 = 0.00000 34
       C16 = 0.00100 189191154952782
       A17 = 0.10000 18919115495278220
       B17 = 0.00000 34
       C17 = 0.00100 189191154952782
       A18 = 0.10000 18919115495278220
       B18 = 0.00000 34
       C18 = 0.00100 189191154952782
       A19 = 0.10000 18919115495278220
       B19 = 0.00000 34
       C19 = 0.00100 189191154952782
       A20 = 0.10000 18919115495278220
       B20 = 0.00000 34
       C20 = 0.00100 189191154952782
       A21 = 0.10000 18919115495278220
       B21 = 0.00000 34
       C21 = 0.00100 189191154952782
       A22 = 0.10000 18919115495278220
       B22 = 0.00000 34
       C22 = 0.00100 189191154952782
       A23 = 0.10000 18919115495278220
       B23 = 0.00000 34
       C23 = 0.00100 189191154952782
       A24 = 0.10000 18919115495278220
       B24 = 0.00000 34
       C24 = 0.00100 189191154952782
       A25 = 0.10000 18919115495278220
       B25 = 0.00000 34
       C25 = 0.00100 189191154952782
       A26 = 0.10000 18919115495278220
       B26 = 0.00000 34
       C26 = 0.00100 189191154952782
       A27 = 0.10000 18919115495278220
       B27 = 0.00000 34
       C27 = 0.00100 189191154952782
       A28 = 0.10000 18919115495278220
       B28 = 0.00000 34
       C28 = 0.00100 189191154952782
       A29 = 0.10000 18919115495278220
       B29 = 0.00000 34
       C29 = 0.00100 189191154952782
       A30 = 0.10000 18919115495278220
       B30 = 0.00000 34
       C30 = 0.00100 189191154952782
       A31 = 0.10000 18919115495278220
       B31 = 0.00000 34
       C31 = 0.00100 189191154952782
       A32 = 0.10000 18919115495278220
       B32 = 0.00000 34
       C32 = 0.00100 189191154952782
[DEBUG] total streamers 0
=== After simulation
        A0 = 0.10032 18978880840191032
        B0 = 0.00032 59765344912836
        C0 = 0.00068 129425810039979
        A1 = 0.10032 18978880840191032
        B1 = 0.00032 59765344912836
        C1 = 0.00068 129425810039979
        A2 = 0.10032 18978880840191032
        B2 = 0.00032 59765344912836
        C2 = 0.00068 129425810039979
        A3 = 0.10032 18978880840191032
        B3 = 0.00032 59765344912836
        C3 = 0.00068 129425810039979
        A4 = 0.10032 18978880840191032
        B4 = 0.00032 59765344912836
        C4 = 0.00068 129425810039979
        A5 = 0.10032 18978880840191032
        B5 = 0.00032 59765344912836
        C5 = 0.00068 129425810039979
        A6 = 0.10032 18978880840191032
        B6 = 0.00032 59765344912836
        C6 = 0.00068 129425810039979
        A7 = 0.10032 18978880840191032
        B7 = 0.00032 59765344912836
        C7 = 0.00068 129425810039979
        A8 = 0.10032 18978880840191032
        B8 = 0.00032 59765344912836
        C8 = 0.00068 129425810039979
        A9 = 0.10032 18978880840191032
        B9 = 0.00032 59765344912836
        C9 = 0.00068 129425810039979
       A10 = 0.10032 18978880840191032
       B10 = 0.00032 59765344912836
       C10 = 0.00068 129425810039979
       A11 = 0.10032 18978880840191032
       B11 = 0.00032 59765344912836
       C11 = 0.00068 129425810039979
       A12 = 0.10032 18978880840191032
       B12 = 0.00032 59765344912836
       C12 = 0.00068 129425810039979
       A13 = 0.10032 18978880840191032
       B13 = 0.00032 59765344912836
       C13 = 0.00068 129425810039979
       A14 = 0.10032 18978880840191032
       B14 = 0.00032 59765344912836
       C14 = 0.00068 129425810039979
       A15 = 0.10032 18978880840191032
       B15 = 0.00032 59765344912836
       C15 = 0.00068 129425810039979
       A16 = 0.10032 18978880840191032
       B16 = 0.00032 59765344912836
       C16 = 0.00068 129425810039979
       A17 = 0.10032 18978880840191032
       B17 = 0.00032 59765344912836
       C17 = 0.00068 129425810039979
       A18 = 0.10032 18978880840191032
       B18 = 0.00032 59765344912836
       C18 = 0.00068 129425810039979
       A19 = 0.10032 18978880840191032
       B19 = 0.00032 59765344912836
       C19 = 0.00068 129425810039979
       A20 = 0.10032 18978880840191032
       B20 = 0.00032 59765344912836
       C20 = 0.00068 129425810039979
       A21 = 0.10032 18978880840191032
       B21 = 0.00032 59765344912836
       C21 = 0.00068 129425810039979
       A22 = 0.10032 18978880840191032
       B22 = 0.00032 59765344912836
       C22 = 0.00068 129425810039979
       A23 = 0.10032 18978880840191032
       B23 = 0.00032 59765344912836
       C23 = 0.00068 129425810039979
       A24 = 0.10032 18978880840191032
       B24 = 0.00032 59765344912836
       C24 = 0.00068 129425810039979
       A25 = 0.10032 18978880840191032
       B25 = 0.00032 59765344912836
       C25 = 0.00068 129425810039979
       A26 = 0.10032 18978880840191032
       B26 = 0.00032 59765344912836
       C26 = 0.00068 129425810039979
       A27 = 0.10032 18978880840191032
       B27 = 0.00032 59765344912836
       C27 = 0.00068 129425810039979
       A28 = 0.10032 18978880840191032
       B28 = 0.00032 59765344912836
       C28 = 0.00068 129425810039979
       A29 = 0.10032 18978880840191032
       B29 = 0.00032 59765344912836
       C29 = 0.00068 129425810039979
       A30 = 0.10032 18978880840191032
       B30 = 0.00032 59765344912836
       C30 = 0.00068 129425810039979
       A31 = 0.10032 18978880840191032
       B31 = 0.00032 59765344912836
       C31 = 0.00068 129425810039979
       A32 = 0.10032 18978880840191032
       B32 = 0.00032 59765344912836
       C32 = 0.00068 129425810039979
 Time takes 0.241003
#PYTHONPATH=/home1/dilawars/Work.SVN/OTHERS/Micky/moose-core/tests/gpu/../../_build/python python_in_gdb.sh test_ksolve.py
Without Cuda
PYTHONPATH='' python test_ksolve.py
[INFO] Using moose from /usr/lib/python2.7/site-packages/moose/__init__.pyc
Volume of cylinder a is 3.14159e-06
== Before simulation
        A0 = 0.10000 18919115495278220
        B0 = 0.00000 34
        C0 = 0.00100 189191154952782
        A1 = 0.10000 18919115495278220
        B1 = 0.00000 34
        C1 = 0.00100 189191154952782
        A2 = 0.10000 18919115495278220
        B2 = 0.00000 34
        C2 = 0.00100 189191154952782
        A3 = 0.10000 18919115495278220
        B3 = 0.00000 34
        C3 = 0.00100 189191154952782
        A4 = 0.10000 18919115495278220
        B4 = 0.00000 34
        C4 = 0.00100 189191154952782
        A5 = 0.10000 18919115495278220
        B5 = 0.00000 34
        C5 = 0.00100 189191154952782
        A6 = 0.10000 18919115495278220
        B6 = 0.00000 34
        C6 = 0.00100 189191154952782
        A7 = 0.10000 18919115495278220
        B7 = 0.00000 34
        C7 = 0.00100 189191154952782
        A8 = 0.10000 18919115495278220
        B8 = 0.00000 34
        C8 = 0.00100 189191154952782
        A9 = 0.10000 18919115495278220
        B9 = 0.00000 34
        C9 = 0.00100 189191154952782
       A10 = 0.10000 18919115495278220
       B10 = 0.00000 34
       C10 = 0.00100 189191154952782
       A11 = 0.10000 18919115495278220
       B11 = 0.00000 34
       C11 = 0.00100 189191154952782
       A12 = 0.10000 18919115495278220
       B12 = 0.00000 34
       C12 = 0.00100 189191154952782
       A13 = 0.10000 18919115495278220
       B13 = 0.00000 34
       C13 = 0.00100 189191154952782
       A14 = 0.10000 18919115495278220
       B14 = 0.00000 34
       C14 = 0.00100 189191154952782
       A15 = 0.10000 18919115495278220
       B15 = 0.00000 34
       C15 = 0.00100 189191154952782
       A16 = 0.10000 18919115495278220
       B16 = 0.00000 34
       C16 = 0.00100 189191154952782
       A17 = 0.10000 18919115495278220
       B17 = 0.00000 34
       C17 = 0.00100 189191154952782
       A18 = 0.10000 18919115495278220
       B18 = 0.00000 34
       C18 = 0.00100 189191154952782
       A19 = 0.10000 18919115495278220
       B19 = 0.00000 34
       C19 = 0.00100 189191154952782
       A20 = 0.10000 18919115495278220
       B20 = 0.00000 34
       C20 = 0.00100 189191154952782
       A21 = 0.10000 18919115495278220
       B21 = 0.00000 34
       C21 = 0.00100 189191154952782
       A22 = 0.10000 18919115495278220
       B22 = 0.00000 34
       C22 = 0.00100 189191154952782
       A23 = 0.10000 18919115495278220
       B23 = 0.00000 34
       C23 = 0.00100 189191154952782
       A24 = 0.10000 18919115495278220
       B24 = 0.00000 34
       C24 = 0.00100 189191154952782
       A25 = 0.10000 18919115495278220
       B25 = 0.00000 34
       C25 = 0.00100 189191154952782
       A26 = 0.10000 18919115495278220
       B26 = 0.00000 34
       C26 = 0.00100 189191154952782
       A27 = 0.10000 18919115495278220
       B27 = 0.00000 34
       C27 = 0.00100 189191154952782
       A28 = 0.10000 18919115495278220
       B28 = 0.00000 34
       C28 = 0.00100 189191154952782
       A29 = 0.10000 18919115495278220
       B29 = 0.00000 34
       C29 = 0.00100 189191154952782
       A30 = 0.10000 18919115495278220
       B30 = 0.00000 34
       C30 = 0.00100 189191154952782
       A31 = 0.10000 18919115495278220
       B31 = 0.00000 34
       C31 = 0.00100 189191154952782
       A32 = 0.10000 18919115495278220
       B32 = 0.00000 34
       C32 = 0.00100 189191154952782
=== After simulation
        A0 = 0.10032 18978880840191112
        B0 = 0.00032 59765344912923
        C0 = 0.00068 129425810039892
        A1 = 0.10032 18978880840191112
        B1 = 0.00032 59765344912923
        C1 = 0.00068 129425810039892
        A2 = 0.10032 18978880840191112
        B2 = 0.00032 59765344912923
        C2 = 0.00068 129425810039892
        A3 = 0.10032 18978880840191112
        B3 = 0.00032 59765344912923
        C3 = 0.00068 129425810039892
        A4 = 0.10032 18978880840191112
        B4 = 0.00032 59765344912923
        C4 = 0.00068 129425810039892
        A5 = 0.10032 18978880840191112
        B5 = 0.00032 59765344912923
        C5 = 0.00068 129425810039892
        A6 = 0.10032 18978880840191112
        B6 = 0.00032 59765344912923
        C6 = 0.00068 129425810039892
        A7 = 0.10032 18978880840191112
        B7 = 0.00032 59765344912923
        C7 = 0.00068 129425810039892
        A8 = 0.10032 18978880840191112
        B8 = 0.00032 59765344912923
        C8 = 0.00068 129425810039892
        A9 = 0.10032 18978880840191112
        B9 = 0.00032 59765344912923
        C9 = 0.00068 129425810039892
       A10 = 0.10032 18978880840191112
       B10 = 0.00032 59765344912923
       C10 = 0.00068 129425810039892
       A11 = 0.10032 18978880840191112
       B11 = 0.00032 59765344912923
       C11 = 0.00068 129425810039892
       A12 = 0.10032 18978880840191112
       B12 = 0.00032 59765344912923
       C12 = 0.00068 129425810039892
       A13 = 0.10032 18978880840191112
       B13 = 0.00032 59765344912923
       C13 = 0.00068 129425810039892
       A14 = 0.10032 18978880840191112
       B14 = 0.00032 59765344912923
       C14 = 0.00068 129425810039892
       A15 = 0.10032 18978880840191112
       B15 = 0.00032 59765344912923
       C15 = 0.00068 129425810039892
       A16 = 0.10032 18978880840191112
       B16 = 0.00032 59765344912923
       C16 = 0.00068 129425810039892
       A17 = 0.10032 18978880840191112
       B17 = 0.00032 59765344912923
       C17 = 0.00068 129425810039892
       A18 = 0.10032 18978880840191112
       B18 = 0.00032 59765344912923
       C18 = 0.00068 129425810039892
       A19 = 0.10032 18978880840191112
       B19 = 0.00032 59765344912923
       C19 = 0.00068 129425810039892
       A20 = 0.10032 18978880840191112
       B20 = 0.00032 59765344912923
       C20 = 0.00068 129425810039892
       A21 = 0.10032 18978880840191112
       B21 = 0.00032 59765344912923
       C21 = 0.00068 129425810039892
       A22 = 0.10032 18978880840191112
       B22 = 0.00032 59765344912923
       C22 = 0.00068 129425810039892
       A23 = 0.10032 18978880840191112
       B23 = 0.00032 59765344912923
       C23 = 0.00068 129425810039892
       A24 = 0.10032 18978880840191112
       B24 = 0.00032 59765344912923
       C24 = 0.00068 129425810039892
       A25 = 0.10032 18978880840191112
       B25 = 0.00032 59765344912923
       C25 = 0.00068 129425810039892
       A26 = 0.10032 18978880840191112
       B26 = 0.00032 59765344912923
       C26 = 0.00068 129425810039892
       A27 = 0.10032 18978880840191112
       B27 = 0.00032 59765344912923
       C27 = 0.00068 129425810039892
       A28 = 0.10032 18978880840191112
       B28 = 0.00032 59765344912923
       C28 = 0.00068 129425810039892
       A29 = 0.10032 18978880840191112
       B29 = 0.00032 59765344912923
       C29 = 0.00068 129425810039892
       A30 = 0.10032 18978880840191112
       B30 = 0.00032 59765344912923
       C30 = 0.00068 129425810039892
       A31 = 0.10032 18978880840191112
       B31 = 0.00032 59765344912923
       C31 = 0.00068 129425810039892
       A32 = 0.10032 18978880840191112
       B32 = 0.00032 59765344912923
       C32 = 0.00068 129425810039892
 Time takes 0.006465
echo "Test is done"
Test is done
mickyaero commented 6 years ago

It is working but it doesn't have the data extraction code, so i will add that code to it and check

dilawar commented 6 years ago

With commit afb2f63b0546b8c81faf7f770a9c4e95 ; I am getting a different error

( cd ../tests/gpu/ && make )
With Cuda
#PYTHONPATH=/home1/dilawars/Work.SVN/OTHERS/Micky/moose-core/tests/gpu/../../_build/python python test_ksolve.py
PYTHONPATH=/home1/dilawars/Work.SVN/OTHERS/Micky/moose-core/tests/gpu/../../_build/python python_in_gdb.sh test_ksolve.py
GNU gdb (GDB; openSUSE Leap 42.2) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.opensuse.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...Reading symbols from /usr/lib/debug/usr/bin/python2.7.debug...done.
done.
Starting program: /usr/bin/python test_ksolve.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Missing separate debuginfo for /home1/dilawars/.local/lib/python2.7/site-packages/numpy/core/../.libs/libgfortran-ed201abd.so.3.0.0
[New Thread 0x7ffff2ba2700 (LWP 27787)]
[New Thread 0x7ffff23a1700 (LWP 27788)]
[New Thread 0x7fffedba0700 (LWP 27789)]
[New Thread 0x7fffeb39f700 (LWP 27790)]
[New Thread 0x7fffe8b9e700 (LWP 27791)]
[New Thread 0x7fffe639d700 (LWP 27792)]
[New Thread 0x7fffe3b9c700 (LWP 27793)]
[New Thread 0x7fffe339b700 (LWP 27794)]
[New Thread 0x7fffdeb9a700 (LWP 27795)]
[New Thread 0x7fffdc399700 (LWP 27796)]
[New Thread 0x7fffd9b98700 (LWP 27797)]
[New Thread 0x7fffd7397700 (LWP 27798)]
[New Thread 0x7fffd4b96700 (LWP 27799)]
[New Thread 0x7fffd2395700 (LWP 27800)]
[New Thread 0x7fffcfb94700 (LWP 27801)]
No CPU information available. Assuming single core.
No CPU information available. Assuming single core.
on node 0, numNodes = 1, numCores = 1
[INFO] Time to define moose classes:0.01576
[INFO] Time to initialize module:0.03642
Missing separate debuginfo for /home1/dilawars/.local/lib/python2.7/site-packages/matplotlib/.libs/libz-a147dcb0.so.1.2.3
[New Thread 0x7fffb7074700 (LWP 27802)]
[Thread 0x7fffcfb94700 (LWP 27801) exited]
[Thread 0x7fffd2395700 (LWP 27800) exited]
[Thread 0x7fffd4b96700 (LWP 27799) exited]
[Thread 0x7fffd7397700 (LWP 27798) exited]
[Thread 0x7fffd9b98700 (LWP 27797) exited]
[Thread 0x7fffdc399700 (LWP 27796) exited]
[Thread 0x7fffdeb9a700 (LWP 27795) exited]
[Thread 0x7fffe339b700 (LWP 27794) exited]
[Thread 0x7fffe3b9c700 (LWP 27793) exited]
[Thread 0x7fffe639d700 (LWP 27792) exited]
[Thread 0x7fffe8b9e700 (LWP 27791) exited]
[Thread 0x7fffeb39f700 (LWP 27790) exited]
[Thread 0x7fffedba0700 (LWP 27789) exited]
[Thread 0x7ffff23a1700 (LWP 27788) exited]
[Thread 0x7ffff2ba2700 (LWP 27787) exited]
Detaching after fork from child process 27803.
[INFO] Using moose from /home1/dilawars/Work.SVN/OTHERS/Micky/moose-core/_build/python/moose/__init__.pyc
Volume of cylinder a is 3.14159e-06
Debug: Setting stoich for voxel 0
Debug: Setting stoich for voxel 1
Debug: Setting stoich for voxel 2
Debug: Setting stoich for voxel 3
Debug: Setting stoich for voxel 4
Debug: Setting stoich for voxel 5
Debug: Setting stoich for voxel 6
Debug: Setting stoich for voxel 7
Debug: Setting stoich for voxel 8
Debug: Setting stoich for voxel 9
== Before simulation
        A0 = 0.10000 18919115495278220
        B0 = 0.00000 34
        C0 = 0.00100 189191154952782
        A1 = 0.10000 18919115495278220
        B1 = 0.00000 34
        C1 = 0.00100 189191154952782
        A2 = 0.10000 18919115495278220
        B2 = 0.00000 34
        C2 = 0.00100 189191154952782
        A3 = 0.10000 18919115495278220
        B3 = 0.00000 34
        C3 = 0.00100 189191154952782
        A4 = 0.10000 18919115495278220
        B4 = 0.00000 34
        C4 = 0.00100 189191154952782
        A5 = 0.10000 18919115495278220
        B5 = 0.00000 34
        C5 = 0.00100 189191154952782
        A6 = 0.10000 18919115495278220
        B6 = 0.00000 34
        C6 = 0.00100 189191154952782
        A7 = 0.10000 18919115495278220
        B7 = 0.00000 34
        C7 = 0.00100 189191154952782
        A8 = 0.10000 18919115495278220
        B8 = 0.00000 34
        C8 = 0.00100 189191154952782
        A9 = 0.10000 18919115495278220
        B9 = 0.00000 34
        C9 = 0.00100 189191154952782
       A10 = 0.10000 18919115495278220
       B10 = 0.00000 34
       C10 = 0.00100 189191154952782
       A11 = 0.10000 18919115495278220
       B11 = 0.00000 34
       C11 = 0.00100 189191154952782
       A12 = 0.10000 18919115495278220
       B12 = 0.00000 34
       C12 = 0.00100 189191154952782
       A13 = 0.10000 18919115495278220
       B13 = 0.00000 34
       C13 = 0.00100 189191154952782
       A14 = 0.10000 18919115495278220
       B14 = 0.00000 34
       C14 = 0.00100 189191154952782
       A15 = 0.10000 18919115495278220
       B15 = 0.00000 34
       C15 = 0.00100 189191154952782
       A16 = 0.10000 18919115495278220
       B16 = 0.00000 34
       C16 = 0.00100 189191154952782
       A17 = 0.10000 18919115495278220
       B17 = 0.00000 34
       C17 = 0.00100 189191154952782
       A18 = 0.10000 18919115495278220
       B18 = 0.00000 34
       C18 = 0.00100 189191154952782
       A19 = 0.10000 18919115495278220
       B19 = 0.00000 34
       C19 = 0.00100 189191154952782
       A20 = 0.10000 18919115495278220
       B20 = 0.00000 34
       C20 = 0.00100 189191154952782
       A21 = 0.10000 18919115495278220
       B21 = 0.00000 34
       C21 = 0.00100 189191154952782
       A22 = 0.10000 18919115495278220
       B22 = 0.00000 34
       C22 = 0.00100 189191154952782
       A23 = 0.10000 18919115495278220
       B23 = 0.00000 34
       C23 = 0.00100 189191154952782
       A24 = 0.10000 18919115495278220
       B24 = 0.00000 34
       C24 = 0.00100 189191154952782
       A25 = 0.10000 18919115495278220
       B25 = 0.00000 34
       C25 = 0.00100 189191154952782
       A26 = 0.10000 18919115495278220
       B26 = 0.00000 34
       C26 = 0.00100 189191154952782
       A27 = 0.10000 18919115495278220
       B27 = 0.00000 34
       C27 = 0.00100 189191154952782
       A28 = 0.10000 18919115495278220
       B28 = 0.00000 34
       C28 = 0.00100 189191154952782
       A29 = 0.10000 18919115495278220
       B29 = 0.00000 34
       C29 = 0.00100 189191154952782
       A30 = 0.10000 18919115495278220
       B30 = 0.00000 34
       C30 = 0.00100 189191154952782
       A31 = 0.10000 18919115495278220
       B31 = 0.00000 34
       C31 = 0.00100 189191154952782
       A32 = 0.10000 18919115495278220
       B32 = 0.00000 34
       C32 = 0.00100 189191154952782
Debug: Total 1 ksolves are found 
+ Ode system 
 Method : rk5
 Dimentions: 6729915426273446717

Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x00007fffc7202db4 in CudaOdeSystem::print (this=0x1605f30)
    at /home1/dilawars/Work/OTHERS/Micky/moose-core/scheduling/CudaOdeSystem.h:38
38              cout << f[i] << " ";

As you can see, the error in accessing f[i]. This can be backtracked and fixed easily by looking closely at the f.