FEAP User Forum
FEAP => Installation => Topic started by: Yaakov on March 15, 2016, 02:12:53 AM
-
Hi everyone,
how can i check my own f-codes in FEAP in Ubuntu, e.g. user-element, user-material.
firstly, i cheke grammatic errors with help of make install command.
but how can i check logical oder dimensional errors (i check codes errors by myself as i write codes) in Debugger.
Many thanks in advance!
Jakob
-
Ubuntu should have gdb for debugging.
Or you can output the information for a simple problem you can check by hand to see if the results are correct.
Feap has a matrix output routine for real quantities:
For example if you have:
real*8 aa(nd,nc)
you can output part of the array using
call mprint(aa,nrow,ncol,nd,'AA')
A similar routine exists for integer (integer*4) as call iprint(ia,nrow,ncol,nd,'IA')
In the above 'ND' is the first dimension, 'NROW','NCOL' the amount you would like to output.
EXAMPLE
real*8 c(6,7)
call mprint(c,6,7,6,'C")
would output the entire array.
-
Dear Prof. Taylor,
Thanks very much for your answer, now i use simple way for debugger
e.g. write(*,*) 'isw:',isw
read(*,'(a)')
the next time, i will try feap own debugger.
-
gdb in ubuntu is working pretty well und most IDE and some text editors
provides an GUI for easy using, e.g. geany, eclipse,...
-
Dear Mr. JStorm,
In the same topic problem, I also use the Codeblock IDE to check for codes that are independent of the FEAP library.
I wonder you have any hint on the way you debug your element in the IDE (as you suggest geany or eclipse).
I mean you element always calls FEAP library so it is impossible to debug on these IDE without any special treatment.
Best regards
-
Are you familiar with debugging of compiled code like Fortran, C, etc.? Debugging FEAP does not need any special treatment.
-
No, since I am new to Fortran.
I only debug my element by print out variables on the screen to trace where the bug is.
I wonder there is any way to debug FEAP element in a more friendly IDE like Geany, eclipse as you suggested.
I tried with Codeblock but the problem is that FEAP user element always includes FEAP library which makes it impossible to debug on an IDE like Codeblock.
Are you debugging your elements in those IDEs or only via gdb?
-
You can also use Codeblock IDE for debugging with GDB as backend. The debugger do not care that FEAP is compiled into a library.
Before bothering with FEAP, read a HowTo about debugging Fortran code. Than create a simple HelloWorld Fortran project and make sure you can debug this (setting breakpoints and check content of variables). Finally, check that you have compiled FEAP with the debugging flag (if not then recompile all) and run the debugger on FEAP.
-
Thank you very much for your helpful suggestion.
I have some experiences to debug code with breakpoints (Matlab, Java on Eclipse).
As you suggested, the new things to me now are:
1. Use Codeblock IDE for debugging with GDB as backend
2. Compiled FEAP with the debugging flag
I really appreciate if you can show me any example or relevant link.
Best regards
-
I have never used Code::Blocks. You should look for help in Code::Blocks or Fortran user forums in order to learn debugging, because this is a basic skill for coding in FEAP. I have found this explanation: http://wiki.codeblocks.org/index.php/Debugging_with_Code::Blocks (http://wiki.codeblocks.org/index.php/Debugging_with_Code::Blocks). In case you want to use another IDE, then search the IDE's name + debugging to find the manuals and user forums.
-
Thank you very much for your kind help.