f



Suggestions on mimicing fgetc and fseek with F90

Hi all,

I know that many compilers have hooks to the C routines fgetc and fseek. 
      I'  However, I was hoping to use standard F90 I/O to do this.  I 
read data files that vary from 3MB to 45MB in size.  So sometime the 
whole file is read to access data.  Other times I seek into the file to 
pluck a few bytes out.

Would something like the following be practical

To mimic reading a file in a fgetc fashion

character(1) c1
character(100) text100
open(iunit, fname='foo', form='formatted',access='sequential')

do i =1,100
   read(iunit,'(A1)',advance='no')c1
   text100(i:i) = c1
end do


The to do a seek followed by a read I was thinking of something like the 
following that would read characters starting at the 300th character and 
stopping at the 399th character.

character(1) c1
character(100) text100
open(iunit, fname='foo', form='formatted',access='direct',recl=1)

j = 1
do i =300,399
   read(iunit,rec=i)c1
   text100(j:j) = c1
   j = j +1
end do


Does this seem like a reasonable approach?  Are there any known speed 
issues with this approach?  Fgetc and fseek are working for me now, but 
I would like to removed the non-standard fortran calls.

Thanks in advance,

Mike Sutton

0
mws116 (5)
10/26/2005 1:30:49 AM
comp.lang.fortran 11908 articles. 1 followers. Post Follow

17 Replies
468 Views

Similar Articles

[PageSpeed] 6

m sutton <mws116@usa.com> wrote:

> To mimic reading a file in a fgetc fashion
....
> do i =1,100
>    read(iunit,'(A1)',advance='no')c1
>    text100(i:i) = c1
> end do

Perhaps I misrecall (as I don't tend to do things like this, so I'd have
to check to be sure), but I don't think this will ever read past the end
of the first record.

> The to do a seek followed by a read I was thinking of something like the
> following that would read characters starting at the 300th character and
> stopping at the 399th character.
> 
> character(1) c1
> character(100) text100
> open(iunit, fname='foo', form='formatted',access='direct',recl=1)
> 
> j = 1
> do i =300,399
>    read(iunit,rec=i)c1
>    text100(j:j) = c1
>    j = j +1
> end do
> 
> Does this seem like a reasonable approach?  Are there any known speed
> issues with this approach?  Fgetc and fseek are working for me now, but
> I would like to removed the non-standard fortran calls.

Many, many issues. Start with the fact that you aren't guaranteed to be
able to open an arbitrary file as direct access at all, though you
probably can on most current systems. Then there is the problem that,
even if you can do such an open, the conversion between the resulting
"record numbers" and file position is not well-defined and portable. In
particular, you are likely to find "surprises" in switching between
unix-like systems (where end-of-record for text files tends to be a
single byte), vs dos/windows-like systems where it tends to be two bytes
(and we'll ignore vms-like systems where things are more different than
that).

Oh, and your read is unformatted, while the open is formatted. I'll
assume that is just a typo; in any case it is easily fixed.  You can
concievably do character data either way, but you do need to be
consistent, and each has a slightly different set of subtle portavility
issues.

Yes, reading character-at-a-time can have speed issues. So can direct
access in general (it can turn off some read-ahead optimizations). They
might not be significant enough to worry about for your application;
that part is hard to tell. If you are doing formatted I/O, then pretty
much by definition, you aren't going to be going blazingly fast anyway,
the format processing might dwarf anything else, and you probably aren't
dealing with gigabyte-sized files.

All those "issues" aside, it might work adequately for you. Things
aren't as bad as, on rereading the above, I've made it sound. Might even
be the best current approach for your application, all things
considered. But don't think that this will make your code perfectly
standard-conforming, portable, and bullet-proof.

Come f2003 compilers, I think you'll want to look at stream I/O, but the
day for that is not quite yet here.

-- 
Richard Maine                    | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle           |  -- Mark Twain
0
nospam47 (9747)
10/26/2005 3:29:55 AM
In message <1h50833.ighhr11xx8akyN%nospam@see.signature>, Richard Maine 
<nospam@see.signature> writes
>Come f2003 compilers, I think you'll want to look at stream I/O, but the
>day for that is not quite yet here.
>

Richard has perhaps forgotten (or chosen to ignore) the fact that the 
g95 compiler (which you can download free from www.g95.org) implements 
the F2003 Stream I/O specification in all its glory.  I wrote some notes 
on how it works at here:
  http://www.star.le.ac.uk/~cgp/streamIO.html



-- 
Clive Page
0
junk3604 (64)
10/27/2005 5:57:42 PM
In article <gfAaskCWURYDJw7P@page.demon.co.uk>,
	Clive Page <junk@page.demon.co.uk> writes:
> In message <1h50833.ighhr11xx8akyN%nospam@see.signature>, Richard Maine 
> <nospam@see.signature> writes
>>Come f2003 compilers, I think you'll want to look at stream I/O, but the
>>day for that is not quite yet here.
>>
> 
> Richard has perhaps forgotten (or chosen to ignore) the fact that the 
> g95 compiler (which you can download free from www.g95.org) implements 
> the F2003 Stream I/O specification in all its glory.  I wrote some notes 
> on how it works at here:
>   http://www.star.le.ac.uk/~cgp/streamIO.html

Perhaps, Richard noticed that the OP specifically requested a
"standard F90 I/O to do this".

-- 
Steve
http://troutmask.apl.washington.edu/~kargl/
0
kargl (773)
10/27/2005 6:16:12 PM
Clive Page <junk@page.demon.co.uk> wrote:

> In message <1h50833.ighhr11xx8akyN%nospam@see.signature>, Richard Maine
> <nospam@see.signature> writes
> >Come f2003 compilers, I think you'll want to look at stream I/O, but the
> >day for that is not quite yet here.
> 
> Richard has perhaps forgotten (or chosen to ignore) the fact that the
> g95 compiler (which you can download free from www.g95.org) implements
> the F2003 Stream I/O specification in all its glory.

A little bit of both (forgotten and chosen to ignore). I had forgotten,
though your mention reminds me that I did see mention of this feature
being done. I was "ignoring" it in that the poster seemed to have
interest in portability, and having the feature in one or two compilers
doesn't yet get you there.

Still, your point is well taken. And g95 is running on enough different
platforms that you do have at least a certain kind of portability with
it today (with more in the future as other compilers implement this).

-- 
Richard Maine                     | Good judgment comes from experience;
email: my first.last at org.domain| experience comes from bad judgment.
org: nasa, domain: gov            |       -- Mark Twain
0
nospam47 (9747)
10/27/2005 6:21:10 PM
In message <djr5hc$cra$1@gnus01.u.washington.edu>, Steven G. Kargl 
<kargl@troutmask.apl.washington.edu> writes
>Perhaps, Richard noticed that the OP specifically requested a
>"standard F90 I/O to do this".
>
Well maybe that's the explanation.   Of course there really isn't such a 
thing, as F90 didn't support it.  There are three solutions as far as I 
know:

(1) Use g95 which is a Standard F90 compiler supporting stream I/O 
conforming to the latest Standard.  So far this solution isn't very 
portable because I don't know of other compilers which have added this 
F2003 feature, but no doubt more will be along soon.  But it seems to me 
to work well, and is the most future-proof.

(2) Use some other Fortran90 compiler which has stream or binary I/O as 
a proprietary extension.  Not, in my opinion, as good as (1).

(3) Do it using formatted direct-access with RECL=1, which works with 
many compilers but is awkward to use (though it can be wrapped in a set 
of subroutines), inefficient (I suspect), and not totally portable.




-- 
Clive Page
0
junk3604 (64)
10/27/2005 9:55:58 PM
Clive Page wrote:
> In message <djr5hc$cra$1@gnus01.u.washington.edu>, Steven G. Kargl 
> <kargl@troutmask.apl.washington.edu> writes
> 
>> Perhaps, Richard noticed that the OP specifically requested a
>> "standard F90 I/O to do this".
>>
> Well maybe that's the explanation.   Of course there really isn't such a 
> thing, as F90 didn't support it.  There are three solutions as far as I 
> know:
> 
> (1) Use g95 which is a Standard F90 compiler supporting stream I/O 
> conforming to the latest Standard.  So far this solution isn't very 
> portable because I don't know of other compilers which have added this 
> F2003 feature, but no doubt more will be along soon.  But it seems to me 
> to work well, and is the most future-proof.

I reckon (1) is the way to go .... along with a request to one's compiler vendor (assuming 
one also has a licensed compiler along with g95) to start adding f2003 features. I mean, 
that's what upgrade/maintenance fees should be for, no?  :o)  I would think the addition 
of the f2003 access="stream" feature on I/O would be one of the more easier additions to 
make to current compilers (seeing as most of them have it as extensions under a variety of 
different names) if it hasn't been done already.

<aside>
Apart from allocatable components of derived types, one of the other things I'm hanging 
out for in f2003 is the PROTECTED attribute for module variables (I wouldn't think that 
would be difficult to implement either, but it's probably the total opposite).
</aside>

Questions from managers can be answered with your future-proofing argument. It might also 
stimulate a bit more groundswell for faster development of, and transition to, f2003 
compilers.

Anyway... it's getting late. ehem.

cheers,

paulv

-- 
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
0
paul.vandelst (1947)
10/27/2005 10:25:15 PM
Clive Page wrote:
> In message <djr5hc$cra$1@gnus01.u.washington.edu>, Steven G. Kargl
> <kargl@troutmask.apl.washington.edu> writes
>> Perhaps, Richard noticed that the OP specifically requested a
>> "standard F90 I/O to do this".
>>
> Well maybe that's the explanation.   Of course there really isn't
> such a thing, as F90 didn't support it.  [...]

Well, all of the functionality of *formatted* streams was
already supported in F90.  The F2003 formatted stream
feature adds nothing to the capability of the Fortran
language.

-- 
J. Giles

"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies."   --  C. A. R. Hoare


0
jamesgiles (2210)
10/27/2005 11:11:42 PM
Thanks for the ideas.  For now I will stick with fgetc & fseek even 
though they are not standard.  I have to support the Sun, CVF, PGI and 
SGI compilers.  These are the compilers that the users have.

I have not tried g95 or gfortran yet.  It looks like gfortran does not 
support fgetc and fseek.

Mike Sutton
0
mws116 (5)
11/2/2005 3:32:36 AM
In article <orW9f.5760$Kv.1971@newssvr22.news.prodigy.net>,
	m sutton <mws116@usa.com> writes:
> 
> I have not tried g95 or gfortran yet.  It looks like gfortran does not 
> support fgetc and fseek.
> 

It's on the gfortran TODO list.

-- 
Steve
http://troutmask.apl.washington.edu/~kargl/
0
kargl (773)
11/2/2005 6:02:13 PM
>  Apart from allocatable components of derived types, one of the other things I'm hanging
> out for in f2003 is the PROTECTED attribute for module variables (I wouldn't think that
> would be difficult to implement either, but it's probably the total opposite).

Sun f95 has supported the PROTECTED attribute for more than three years
now.
It was not difficult to implement.  It did require extensions to Sun's
module file
format, and they were not done correctly; but that was a matter of
process, not
technology.

Bob Corbett

0
11/3/2005 9:43:53 AM
> (1) Use g95 which is a Standard F90 compiler supporting stream I/O
> conforming to the latest Standard.  So far this solution isn't very
> portable because I don't know of other compilers which have added this
> F2003 feature, but no doubt more will be along soon.

Sun f95 has had stream access for more than three years now.

Bob Corbett

0
11/3/2005 9:45:27 AM

robert.corbett@sun.com wrote:
>> Apart from allocatable components of derived types, one of the other things I'm hanging
>>out for in f2003 is the PROTECTED attribute for module variables (I wouldn't think that
>>would be difficult to implement either, but it's probably the total opposite).
> 
> 
> Sun f95 has supported the PROTECTED attribute for more than three years
> now.
> It was not difficult to implement.  It did require extensions to Sun's
> module file
> format, and they were not done correctly; but that was a matter of
> process, not
> technology.
> 
> Bob Corbett
> 
There's a potential gotcha in PROTECTED variables.  The
standard basically says they can't be defined (or undefined)
outside of the module.  That's easy enough for the compiler
to enforce in the USEing routine, but not if they are
passed on to an external subroutine.
       use some_module, only : a_protected_variable
       call some_random_external (a_protected_variable)
and you're on your own.  There's no guaranteed compiler
help with the protection.

Dick Hendrickson

0
11/3/2005 5:23:50 PM
Dick Hendrickson wrote:
> 
> 
> robert.corbett@sun.com wrote:
> 
>>> Apart from allocatable components of derived types, one of the other 
>>> things I'm hanging
>>> out for in f2003 is the PROTECTED attribute for module variables (I 
>>> wouldn't think that
>>> would be difficult to implement either, but it's probably the total 
>>> opposite).
>>
>>
>>
>> Sun f95 has supported the PROTECTED attribute for more than three years
>> now.
>> It was not difficult to implement.  It did require extensions to Sun's
>> module file
>> format, and they were not done correctly; but that was a matter of
>> process, not
>> technology.
>>
>> Bob Corbett
>>
> There's a potential gotcha in PROTECTED variables.  The
> standard basically says they can't be defined (or undefined)
> outside of the module.  That's easy enough for the compiler
> to enforce in the USEing routine, but not if they are
> passed on to an external subroutine.
>       use some_module, only : a_protected_variable
>       call some_random_external (a_protected_variable)
> and you're on your own.  There's no guaranteed compiler
> help with the protection.

Hmm. How is this different from the case where one does:

   call some_random_external(1)

   subroutine some_random_external(j)
     integer j
     j = j+1
   end subroutine some_random_external

?? (If at all)

If, in your
    use some_module, only : a_protected_variable
    call some_random_external (a_protected_variable)
example, the external routine modifies the protected variable, what happens upon return to 
the calling routine? I.e what value does "a_protected_variable" contain?

cheers,

paulv

-- 
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
0
paul.vandelst (1947)
11/3/2005 5:34:19 PM

Paul Van Delst wrote:

> Dick Hendrickson wrote:
> 
>>
>>
>> robert.corbett@sun.com wrote:
>>
>>>> Apart from allocatable components of derived types, one of the other 
>>>> things I'm hanging
>>>> out for in f2003 is the PROTECTED attribute for module variables (I 
>>>> wouldn't think that
>>>> would be difficult to implement either, but it's probably the total 
>>>> opposite).
>>>
>>>
>>>
>>>
>>> Sun f95 has supported the PROTECTED attribute for more than three years
>>> now.
>>> It was not difficult to implement.  It did require extensions to Sun's
>>> module file
>>> format, and they were not done correctly; but that was a matter of
>>> process, not
>>> technology.
>>>
>>> Bob Corbett
>>>
>> There's a potential gotcha in PROTECTED variables.  The
>> standard basically says they can't be defined (or undefined)
>> outside of the module.  That's easy enough for the compiler
>> to enforce in the USEing routine, but not if they are
>> passed on to an external subroutine.
>>       use some_module, only : a_protected_variable
>>       call some_random_external (a_protected_variable)
>> and you're on your own.  There's no guaranteed compiler
>> help with the protection.
> 
> 
> Hmm. How is this different from the case where one does:
> 
>   call some_random_external(1)
> 
>   subroutine some_random_external(j)
>     integer j
>     j = j+1
>   end subroutine some_random_external
> 
> ?? (If at all)
I don't think it's fundamentally different.  It's a
programming error, and one which compilers generally
have trouble diagnosing.

> 
> If, in your
>    use some_module, only : a_protected_variable
>    call some_random_external (a_protected_variable)
> example, the external routine modifies the protected variable, what 
> happens upon return to the calling routine? I.e what value does 
> "a_protected_variable" contain?

Unless I missed something in the standard, it's undefined.
The rule is ultimately a boy scout one, "Thou shalt not mess
up a protected variable".  If you do, your program is non
standard and anything can happen.

Protected variables might be stored in read-only memory,
or they might be passed-by-value, but you can't count it.

Dick Hendrickson
> 
> cheers,
> 
> paulv
> 

0
11/3/2005 5:45:09 PM
Paul Van Delst wrote:
> Dick Hendrickson wrote:
....
>> There's a potential gotcha in PROTECTED variables.  The
>> standard basically says they can't be defined (or undefined)
>> outside of the module.  That's easy enough for the compiler
>> to enforce in the USEing routine, but not if they are
>> passed on to an external subroutine.
>>       use some_module, only : a_protected_variable
>>       call some_random_external (a_protected_variable)
>> and you're on your own.  There's no guaranteed compiler
>> help with the protection.
>
> Hmm. How is this different from the case where one does:
>
>    call some_random_external(1)
>
>    subroutine some_random_external(j)
>      integer j
>      j = j+1
>    end subroutine some_random_external
>
> ?? (If at all)
>
> If, in your
>     use some_module, only : a_protected_variable
>     call some_random_external (a_protected_variable)
> example, the external routine modifies the protected variable, what
> happens upon return to the calling routine? I.e what value does
> "a_protected_variable" contain?

I think that's the point Dick was making.  In both cases the
call is illegal.  But, the standard doesn't require implementations
to detect or report the violation.  And in fact, actual compilers
seldom will.  It's not just a "quality of implementation" issue
since detecting this can actually cause significant degradation
in quality (specifically efficiency).  It's one of those where
it's up to the individual programmer to be aware of the
problem and not do the illegal call.

(In your example above of passing a literal constant, I support
a change in the standard anyway.  The rule should be that when
you pass literals or named constants the compiler should use
call-by-value semantics for that argument.  That is, the procedure
may cause the dummy argument to be redefined or become
undefined but the caller ignores any change in value.  That's
already a very common behavior of implementations when the
actual argument is an expression.)

-- 
J. Giles

"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies."   --  C. A. R. Hoare


0
jamesgiles (2210)
11/3/2005 5:54:09 PM
Dick Hendrickson <dick.hendrickson@att.net> wrote:

> Paul Van Delst wrote:
> > I.e what value does "a_protected_variable" contain?
> 
> Unless I missed something in the standard, it's undefined.

I'll quibble with that answer. I think that what you have is illegal
code in that case. This in the category of illegal code for which
anything can happen. "Anything" encompasses a lot more than just the
value of the variable being undefined. For example, the code might well
abort wkith some kind of error. It might even fail to compile. You can't
count on the compiler detecting such things, but it is certainly allowed
to, and one could imagine scenarios in which it might be possible.

When the standard says that the value of a variable is undefined, that
at least ties down the effects to that variable. Illegal code doesn't
tie things down that much.

I'm sure that Dick knows all this stuff and was probably just speaking
loosely. My elaboration is just for other readers.

-- 
Richard Maine                     | Good judgment comes from experience;
email: my first.last at org.domain| experience comes from bad judgment.
org: nasa, domain: gov            |       -- Mark Twain
0
nospam47 (9747)
11/3/2005 7:03:03 PM
Dick Hendrickson wrote:
| Paul Van Delst wrote:
| 
|| Dick Hendrickson wrote:
|||| 
||| There's a potential gotcha in PROTECTED variables.  The
||| standard basically says they can't be defined (or undefined)
||| outside of the module.  That's easy enough for the compiler
||| to enforce in the USEing routine, but not if they are
||| passed on to an external subroutine.
|||       use some_module, only : a_protected_variable
|||       call some_random_external (a_protected_variable)
||| and you're on your own.  There's no guaranteed compiler
||| help with the protection.
|| 
|| 
|| Hmm. How is this different from the case where one does:
|| 
||   call some_random_external(1)
|| 
||   subroutine some_random_external(j)
||     integer j
||     j = j+1
||   end subroutine some_random_external
|| 
|| ?? (If at all)
|
| I don't think it's fundamentally different.  It's a
| programming error, and one which compilers generally
| have trouble diagnosing.
| 
| Protected variables might be stored in read-only memory,
| or they might be passed-by-value, but you can't count it.
 
There is a likely difference in implementation though.
For constants (and expressions?), it's fairly easy for 
compiler to put them in read-only memory (CVF and IVF
do that by default and you'll get a run-time error if
you try Paul's code). 

However, for protected variables compiler can't do that 
because it couldn't know when it will be (legally) written 
by module procedures or (illegally) written by outside 
procedures, and one can't mark OS memory pages as 
"full access for these routines and read-only for others".

So, the bottom line is that it *is* a programmer's error
but I wouldn't be optimistic that compilers would be able
to catch it in all situations (but, for example, if dummy
argument j of some_random_external had an INTENT(INOUT)
declared & explicit interface provided, a compile-time 
error would be justified).
-- 
 Jugoslav
___________
www.xeffort.com

Please reply to the newsgroup.
You can find my real e-mail on my home page above.
0
jdujic (694)
11/4/2005 7:47:59 AM
Reply:

Similar Artilces:

install fortran f90
Hi, Can you please help me to intall fortran f90 for linux red hat for free thank you very mutch ...

MEX and fortran (f90), howto?
Hello there, I found a piece of MATLAB code that would be very useful for me (http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=11723&objectType=file). Unfortunately this envolves some fortran code (which I haven't learnt.. yet) and a .mod file. How do I compile this mex file, and this f90 code and link them together? I'm using SunOS 5.10, and I have the fortran compilers and some 'mex' programs. When I try "> mex nlDiffFilter.f90" I get a .mexsol file. When I run the MATLAB script which uses this function, it complains about the whe...

calling fortran f90 in labview
dear frnds.. i have labview 7.0 and a matlab script file.. the matlab file uses the excel files obtained as output from labview and the processes it and sends the output back to labview for display.. can any one tell me how i can accomplish this ?? thanz in advance karthik ...

Python and fortran Interface suggestion
I am developing a code under Ubuntu(64bit) with python using various librar= ies. Once done, I need to generate an executable which shall be interfaced = with fortran program on account of further collaboration. The python execut= able shall be used with windows(32bit). So, I guess everytime my python executable is called by the fortran code on= each time step, all those from **** import *'s will be executed and are time consuming (which is not at all required). Mor= eover, creating executable for windows, using linux is that possible by any= means? What is a better methodo...

C lang. suggestion for a newbie...
hi i am interested in system programming only on the open system architectures like the linux os. but i have only done C prog. on the TurboC on windows . i want to know that do i have to learn C prog. differently on the different os platforms and on different compilers because in linux there is GCC compiler. in the GCC compiler there is no conio.h,graphics.h,dos.h header files and we have to write int main() function instead of void main() function. i have searched for C lang. books but all are for the windows platform only. from where do i get books or materials to learn C prog. in the linux ...

suggestions for Fortran 2008 loops
In Fortran 90 one can label DO loops, for example ii: do i=1,n jj: do j=1,n print*,i,j,i*j end do jj end do ii Usually it is only the END DO that I need to label, to remind me which loop I am closing in deeply nested loops, so I wonder if Fortran could be changed to allow do i=1,n do j=1,n print*,i,j,i*j end do j end do i where the "j" and "i" in the END DO statements could be checked by the compiler for consistency. It would be illegal to interchange them in the above code. Currently, one can of course comment the END DO statements end do ! j e...

mfef90
Hello, I am installing a program on a SGI - Octane, dual CPU, O/S 6.5 w/ SGI's f90 compiler- machine. On 'make install' cmd, the following is generated ==> make install mkdir ../exe cd lib; make install ../Compile L2 -P new2oldparm.f cat new2oldparm.f | /lib/cpp -P -DIRIS -DMEM_ALLOC -DHAS_FTN_ERFC -DMPI -DRLE -DROWAT -DBLAS1 -DSGIFFT -DTFP -DCACHE_BLOCKSIZE=2500 > _new2oldparm_.f f90 -nocpp -mips4 -n32 -r10000 -c -O2 -old_rl -OPT:roundoff=3:IEEE_arithmetic=3:alias=restrict -TENV:X=1 _new2oldparm_.f ...

GCC options to mimic Fortran assumptions?
Hi, A number of people seem to think that Fortran is often faster than C for numerical codes because Fortran compilers can make assumptions that C compilers cannot. Does GCC have compiler optimization switches that allow gcc/g++ to make these same assumptions and thus speed up the compiled C++ code? Sorry I have no specific examples to give. This is is just the sense of what I've gleaned over the years, and now that I'm trying to optimize some numerical C codes I want to make sure I'm getting all the advantage I can out of my compiler. Thanks, Charlie -- Charlie Zender, surname@...

need suggestions on Fortran editor in Linux
Hi, all I just started learning to write Fortran codes in Linux. Before I used the Compaq visual Fortran, which seems to be a nice editor. But now I have to use the SSH to login into the server and it seems to be totally different from the GUI-based editor in Windows. So I badly need some advice on a good editor to speed up the writing the code and debugging. Thank you. Andy In article <ffe89469-4ed0-403e-92ee-2f3c2631bece@m34g2000hsf.googlegroups.com>, jun wen <jwen.nju@gmail.com> writes: > Hi, all > > I just started learning to write Fortran codes in Linux. Before ...

omp.lang.fortran viewing options
I posted this, was confirmed, and it's now disappeared - one more mystery. So here it is again 15 minutes later. ** original** I'm having trouble suddenly with what I see and what I can do. I think these are changed personal options or Google has changed something.. "BEFORE" I would immeditely see listings and not summaries, but now I have to click on "Listings" first. There was an easy way to get to the latest item. Now you have to click on "newer" till you get there. If one does something odd, it sets you back to the beginning. I could make a new p...

I would like to learn FORTRAN any book suggestions?
I need to learn FORTRAN for my job. I need to create a deatiled FLOWCHART of some existing FORTRAN code. Any suggestions out there? Jason jspaldin@umflint.edu (Jason) wrote: >I need to learn FORTRAN for my job. I need to create a deatiled >FLOWCHART of some existing FORTRAN code. Any suggestions out there? > >Jason What version of Fortran does the program use? What compiler will you be using? The main Fortran standards in current use are Fortran 77, 90, and 95. The Fortran 90 standard is backwards compatible with Fortran 77, and Fortran 95 mostly is. Links to Fortran tutor...

Suggestions for parallelizing Fortran code on dual G5?
Having never dealt with the issue of parallelizing code before, I thought I'd ask the c.l.f folks for suggestions. Problem: We've got some antenna array modeling to do, and we need it to be done fast. Currently, we're using a dual processor G5, 2.5GB of RAM, and MATLAB. The runtimes are still unacceptable, so we're moving to Fortran for the task. However, no one involved with the project has had to consider the problem of taking advantage of multiple CPUs effectively. Any particular resources I should be looking at, compilers I should be investigating??? OpenM...

VIM : used for Fortran files .f or .f90
Hello! The VIM version I use does the following when I edit .f or .f90 source Fortran files : displays a yellow color when I am beyond 72 column and does an automatic new line when I tape in this zone. I have two questions : 1) which command do I have to make in VIM to allow me to have , instead of fixed format, free source format? 2) Is it possible, by putting some command in my vimrc file, to have automatically free format when editing .f90 file and fixed format with ..f files Thaks in advance Bernard Bru bru scripsit: > Hello! > > The VIM versio...

MIPSPro 7 Fortran F90 Compiling error
Hi, I got the following compiling error when using MIPSpro7.3 in IRIX6.5 system. Any expert can help me correct this error? Thanks, Phil ================Here is the error message============ f90 -c invsrc/drivomp4.f -64 -O2 -C -col72 -o obj/drivomp4.o if(bp.eq..False.)call dosim(ms_each_it(1),finivv,th,nth) ^ f90-303 f90: ERROR DRIVOMP4, File = invsrc/drivomp4.f, Line = 111, Column = 16 Data type LOGICAL is not allowed with LOGICAL for the operation "eq". =================...

Help needed! Fortran Dll works for compaq fortran not for Intel Fortran
Dear all, I am porting a compaq fortran project (version 6.x) over to the intel fortran compiler (version 8.0). However, crash always happens at the internal write statement under the intel fortran compiler. ========= project brief: ========= The soultion comprises two parts, one is the c++ project, which in charge of the user interface, the other project is a Fortran Dll project. The Fortran Dll is invoked by the C++ project. the problem I meet here is every simple, the C++ project is just a framework of the dialog based mfc win32 application. In the code response to the click OK button, it...

Announcement: (partial) F90 Interface to POSIX for gnu Fortran
Hi, I'd like inform all gnu fortran 95 users about this new project hosted on Savannah: http://savannah.nongnu.org/projects/posix90/. From the description: This project intends to provide a good, clean and consistent interface to posix routines from within gnu fortran 90. At present, it covers directories and files, Environment, errno error codes, file characteristics , C-Style IO, process management, regular expressions and time. Not all of these are complete, though. Once completed, gnu fortran programs can use most features of Posix from within Fortran, with all its type checks and...

mex using f90 files (Compaq Visual Fortran)
Hi! Perhaps i did some error for i couldn't see my previous message. So i am using Matlab 7.0.1 (R14) and have Compaq Visual Fortran compiler. I have made mex using f- and for -fortran files and mex command worked OK and got my dll made but then i tried to use f90-fortran (free format) files and mex doesn't work or compiler doesn't recoqnize source code format and keeps it as fixed format (f- or for- fortran file). Has somebody experienced same features when using f90 files? Good advices are wellcome! Check the compiler fags in mexopts.bat in your prefdir to make sure there isn&#...

any suggestion for fortran compiler allowing dynamically allocating memory
I've got several threads yessterday. Thanks for all of you concern. But i have a more important question. Which fortran compiler support 'dynamically allocating memory' function in Matlab 6.5 or 7? I have compaq f6.5 and matlab 6.5(soon get matlab 7) in windown 2000 system, but i can't have my compiler do this function. I am willing to purchase another compiler, if they allow 'dynamically allocating memory' issues. Welcome any suggestion. Thanks in advance for all of your help. Enki enki1004 <enki1004@hotmail.com> wrote in message news:<eee9c6c.-1@webx.raydaf...

Help needed! Fortran Dll works for compaq fortran not for Intel Fortran #2
Dear all, I am porting a compaq fortran project (version 6.x) over to the intel fortran compiler (version 8.0). However, crash always happens at the internal write statement under the intel fortran compiler. ========= project brief: ========= The soultion comprises two parts, one is the c++ project, which in charge of the user interface, the other project is a Fortran Dll project. The Fortran Dll is invoked by the C++ project. the problem I meet here is every simple, the C++ project is just a framework of the dialog based mfc win32 application. In the code response to the click OK button, it...

A Lange & Sohne Lange Double Split
A Lange & Sohne Lange Double Split - A Lange & Sohne Watches Discount A Lange & Sohne Lange Double Split: http://www.fashion163.com/A_Lange_Sohne_Lange_Double_Split.html Luxury Watches Lower Prices: http://www.fashion163.com/ Quality A Lange & Sohne Watches http://www.fashion163.com/a_lange_sohne.html We guarantee our A Lange & Sohne Lange Double Split and A Lange & Sohne Lange Double Split aren't just a simple imitation. We use the same fine materials and technology that the original does. Each A Lange & Sohne Lange Double Split produced is examined careful...

Fortran to C to Fortran Arrays
I'm doing a little research. I want to create a multi-dimensional array in fortran containing real values and pass it to a C/C++ program. In the C/C++ program the array will be loaded with values gathered using a libjpeg library or something (haven't figured that out yet). Then I want to return this array back to the Fortran program, loaded with data so that it can be handled there. I have not started to write code yet on this I am just researching some. Can this be done? deadpickle wrote: > I'm doing a little research. I want to create a multi-dimensional > array in fortran...

include header in f90 file using compaq visual fortran
Hello- I'm running into an issue when I try to include a C header file in a project that includes an .f90 file (free source format). I'm working on a project with a large number of subroutines/.f files, and there was no issue with including the C header file until I changed one file to .f90 to take advantage of the free source format. Now, when I try to include the header in the .f90 file, it seems the Compaq Visual Fortran is trying to compile the header file (and giving me messages related to Fortran syntax errors). I know the .f90 file is causing the error because when I comment...

MathCode F90: generating optimized Fortran 90 Code from Mathematica
The Wolfram Research MATHwire recently announced the product MathCode F90. Here are some details from http://www.wolfram.com/products/applications/mathcodef90/ . "The MathCode F90 code-generation system provides high performance, connectivity, and easy-to-use matrix arithmetic for the Mathematica developer. The core of the product is the translation of a subset of Mathematica code to Fortran 90. MathCode F90 requires an external Fortran 90 compiler to generate executables from the Fortran 90 source code (Digital Visual Fortran or Intel Visual Fortran). However, all interaction with the ...

Why xml:lang instead of lang?
What was the reason to introduce a new attribute "xml:lang" instead of "lang"? This bothers both authors and browsers in different language versions: HTML 4, XHTML 1.0, XHTML 1.1. HTML has only "lang"; XHTML 1.1 has only "xml:lang"; XHTML 1.0 has both! For example, Mozilla 1.7 recognizes the lang attribute http://www.unics.uni-hannover.de/nhtcapri/temp/lang-attribute.htm but it does not recognize the xml:lang attribute. http://www.unics.uni-hannover.de/nhtcapri/temp/lang-attribute.xhtml What do we gain from "xml:lang"? Andreas Prilop wrot...

Web resources about - Suggestions on mimicing fgetc and fseek with F90 - comp.lang.fortran

Suggestion - Wikipedia, the free encyclopedia
Suggestion is the psychological process by which one person guides the thoughts, feelings, or behaviour of another. Nineteenth century writers ...

Facebook Provides Advice For Those Users Who See Deceased Friend Suggestions
Over the past couple days a relatively substantial number of users have been complaining about Facebook’s upgraded suggestions feature for occasionally ...

What's your suggestion for an awesomely... - The Dish - Andrew Sullivan - Facebook
What's your suggestion for an awesomely bad Super PAC name?

Facebook’s Instant Personalization Improves Suggestions on Clicker Online TV Recommendations
... personalization for online television recommendations engine Clicker. When you visit the site while logged in to Facebook, you'll see suggestions ...

New tailored suggestions for you to follow on Twitter
... the first time, we want that process to be easy and fast. Currently, when new users come to Twitter, we show them all almost the same suggestions ...

Couple of suggestions for Fargo bloggers re Disqus comments.
Regarding Disqus comments: You can turn off the links to articles, if you don't care about revenue. Here's how: Go to the Disqus dashboard ...

New on Quora: Suggestions for Ask to Answer and... - Joel's Posts - Quora
One of the great parts of Quora is having a question answered by the perfect person, like a former Navy pilot who can explain what it's like ...

Chideo = The Charity Network - Exclusive Celebrity Videos from Fan Suggestions on the App Store on iTunes ...
Get Chideo = The Charity Network - Exclusive Celebrity Videos from Fan Suggestions on the App Store. See screenshots and ratings, and read customer ...

Suggestion for Feedhose - Flickr - Photo Sharing!
First thing I did when I saw Dave's Feedhose was narrow its browser window and drag it to the side of my screen. Which naturally led to visions ...

Suggestion Box: The Roots' Harry Potter Rap - YouTube
In honor of the show's trip to Universal Orlando, Tarik and The Roots perform a Harry Potter-themed rap. Subscribe NOW to The Tonight Show Starring ...

Resources last updated: 2/18/2016 7:57:05 PM