- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm running a job on a cluster and I receive a segmentation fault error. In the past, using traceback, I had received indications on where it was happening, but now I don't get any line information.
mpif90 -extend-source -r8 -c -O2 -g -traceback -warn noalign 3dpic_full_mpi.f
mpif90 -o 3dpic_full_mpi.exe 3dpic_full_mpi.o -lsiloh5 -lhdf5_hl -lhdf5 -lsz -lz -lm -lrt -ldl -lstdc++ -O2 -g -traceback -mcmodel medium
Do I have to change something?
Thanks
GB
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Usually when you get a segmentation fault that has no traceback (with trace back enabled), this often is due to nested library calls to libraries not compiled with Fortran (and/or not with traceback). The source of this is difficult to identify unless you can catch it with a debugger. In situations where you cannot catch this with a debugger, then I suggest inserting some conditional compile assert code preceding suspected library calls.
!dir$ if defined(USE_ASSERTS) ! you define USE_ASSERTS when you want asserts
IF(YourAPIfailTestHere) call YourBugCatcher("Your message")
! or IF(YourAPIfailTestHere) call TRACEBACKQQ( "Your message")
!dir$ endif
call SomeLibrary(...)
.or.
#ifdef(USE_ASSERTS)
! Using FPP you define USE_ASSERTS when you want asserts
IF(YourAPIfailTestHere) call YourBugCatcher(__FILE__, __LINE__, "Your message")
#endif
call SomeLibrary(...)
.or.
#ifdef(USE_ASSERTS)
! Using FPP you define USE_ASSERTS when you want asserts
write(UnitOfYourTraceFile, *) __FILE__, __LINE__
flush(UnitOfYourTraceFile)
#endif
call SomeLibrary(...)
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jim,
I doubt it is an external library: I'm working on a new routine inside my code and I expect this is creating the problem!
But I'll look into it.
GB
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page