Home > Archive > Fortran > April 2005 > graphics and bounds
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
graphics and bounds
|
|
| rafat@caramail.com 2004-12-21, 3:59 pm |
| hi there,
I'm a long-time fan of linux f77 and have two queries (3 actually) :
1- is there anyway to produces graphics apart from making a system call to
some external prog like gnuplot or xmgr ?
2 - are there compiling options to produces arrays bound checks ? are these
reliable ?
3 - if f77 compiles, links and produces and executable, what is a makefile
for ??
thanks :) !
G.
| |
| meek@skyway.usask.ca 2004-12-21, 3:59 pm |
| In a previous article, rafat@caramail.com wrote:
>hi there,
>I'm a long-time fan of linux f77 and have two queries (3 actually) :
>1- is there anyway to produces graphics apart from making a system call to
>some external prog like gnuplot or xmgr ?
>2 - are there compiling options to produces arrays bound checks ? are these
>reliable ?
>3 - if f77 compiles, links and produces and executable, what is a makefile
>for ??
>thanks :) !
>G.
1. You need a graphics program written in F77 - one way is to
write your own. The easiest o/p (IMO) is .bmp.
Better if someone has written one and is willing to share.
But this is likely compiler dependent because bit manipulation
functionality varies between compilers.
Chris
| |
| Kamaraju Kusumanchi 2004-12-21, 3:59 pm |
| rafat@caramail.com wrote:
> hi there,
> I'm a long-time fan of linux f77 and have two queries (3 actually) :
> 1- is there anyway to produces graphics apart from making a system call to
> some external prog like gnuplot or xmgr ?
http://groups.yahoo.com/group/flumech/message/57
The gnuplotfortran, fortranposix packages written by Madhusudhan singh
is the perfect solution for your problem. They use fortran 90 syntax but
since fortran 90 compiler can compile a f77 code, there should not any
problems if you have access to a fortran 90 compiler.
There are 3 free fortran 90 compilers available.
1) gfortran
2) g95
3) intel fortran compiler for non commercial purposes
Search google for more information.
> 2 - are there compiling options to produces arrays bound checks ? are these
> reliable ?
Most compilers have them. For example, in intel compiler the option is
called -C
For more info see man page of your compiler.
> 3 - if f77 compiles, links and produces and executable, what is a makefile
> for ??
That is good if all the source code is in one file. But imagine the
situation of source code distributed over 100 files (not an
exaggeration, I work with such codes).
Let's say file23 depends on file25 and file file72 with no other
dependencies among other files.
When the source code in file25 changes, ideally you need to compile only
file25, file23 and link the two new object files with the 98 old object
files. Make can take care of all this with just one command.
If you are using the usual (f77) command, you will be compiling all the
100 files and that is a waste of resources and time.
Make is a wonderful thing and I strongly suggest you to read the make
documentation. It can be found at
http://www.gnu.org/software/make/manual/make.html
> thanks :) !
> G.
you are welcome. In future when asking for help, please include your
operating system. That would help us to help you in a better way. As you
mentioned gnuplot and make, I assumed you are using linux. Sorry if I am
wrong.
raju
| |
| Rich Townsend 2004-12-21, 3:59 pm |
| rafat@caramail.com wrote:
> hi there,
> I'm a long-time fan of linux f77 and have two queries (3 actually) :
> 1- is there anyway to produces graphics apart from making a system call to
> some external prog like gnuplot or xmgr ?
No. The same restriction applies to many languages; for instance, C (and
hence gcc) has no built-graphics support.
> 2 - are there compiling options to produces arrays bound checks ? are these
> reliable ?
Yes -- use the compilation switch "-C" (check bounds). This is very
reliable, but it tends to slow down execution a lot, so don't use it for
production code. Also, be warned that it won't detect incorrect
subroutine arguments, which is a major cause of crashes along side
array-bounds violations.
> 3 - if f77 compiles, links and produces and executable, what is a makefile
> for ??
To specify the order in which files need to be compiled. Also, to
recompile only those parts of a program that have changed.
cheers,
Rich
--
Dr Richard H D Townsend
Bartol Research Institute
University of Delaware
[ Delete VOID for valid email address ]
| |
| beliavsky@aol.com 2004-12-21, 3:59 pm |
| Rich Townsend wrote:
makefile[color=darkred]
[color=darkred]
>To specify the order in which files need to be compiled. Also, to
recompile only those parts of a program that >have changed.
I believe that the source files of a Fortran 77 program can generally
be compiled in any order. There are no module dependencies to worry
about, as in Fortran 90/95. I think your second reason for using make
files is more important. Also, a makefile can serve as documentation of
how to compile a program.
| |
| beliavsky@aol.com 2004-12-21, 8:57 pm |
| > hi there,
> I'm a long-time fan of linux f77 and have two queries (3 actually) :
> 1- is there anyway to produces graphics apart from making a system
call to
> some external prog like gnuplot or xmgr ?
<SNIP>
Maybe the thread "creating graphs in postscript format from Fortran" in
this newsgroup from about 1 year ago will be helpful -- you can find it
using Google Groups. Most of the libraries described there work with
Fortran 77 compilers.
| |
| Madhusudan Singh 2004-12-22, 3:57 am |
| rafat@caramail.com wrote:
> hi there,
> I'm a long-time fan of linux f77 and have two queries (3 actually) :
> 1- is there anyway to produces graphics apart from making a system call to
> some external prog like gnuplot or xmgr ?
For gnuplot, you could use my gnuplotfortran library (depends on
fortranposix - also available under LGPL). Works only for *nix like
systems, tested on Linux and Sun.
Check out :
http://gnuplotfortran.sourceforge.net
Uses f95 syntax, but you can always profit from updating to the current
decade :)
xmgr ? I do not know, but I am partial to gnuplot as it is a lot more
powerful.
> 2 - are there compiling options to produces arrays bound checks ? are
> these reliable ?
-CB for ifc, for others check the man pages.
> 3 - if f77 compiles, links and produces and executable, what is a makefile
> for ??
To handle multifile programs and dependencies, especially useful if your
source code is written in more than one language.
| |
| Simon Geard 2005-04-27, 8:58 am |
| m @skyway.usask.ca wrote:
> In a previous article, rafat@caramail.com wrote:
>
>
> 1. You need a graphics program written in F77 - one way is to
> write your own. The easiest o/p (IMO) is .bmp.
> Better if someone has written one and is willing to share.
> But this is likely compiler dependent because bit manipulation
> functionality varies between compilers.
>
>
> Chris
You can interface with the Tk library (although that is for f90) -
checkout http://wiki.tcl.tk/4004
Simon
|
|
|
|
|