This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gFortran advice


Ok --  instead of hijacking Colin's thread, I will start a new one with
some more details on the gFortran advice I was asked, hence why I was
reading posts about gFortran and  butting in on that thread. I hoep it's
not frivolous use of the list, I have indeed already pointed my
colleague to the extensive on-line documentation but a little word of
advice from the experts may help get his code working straight away, at
this point it's prior advice, we have not yet actually tried it. 

I don't really want you to do my work for me -- but if I am going really
wrong you might save me headaches with a quick tip or two.
 
I have installed gcc version 4.0.2 (suse 10.0 )  and 4.2.2(homebuilt),
also g77 from Suse compat-g77-3.3.5-2 package is available. I think the
4.2 would be the best as the code is using openmp, though I believe the
Suse 4.0 has the earlier version of openmp compiled into it.

I am just building a new 4.2 today from svn to make sure it's
up-to-date. Is that a bad idea for any reason? 

The previous build is getting old, I think it's from before the official
release:
gccv42 (GCC) 4.2.0 20070130 (prerelease) 

(There's also Intel ifort but unless that's what he used before and it
already works, I'm suggesting using gfortran 4.2 'cause you folks are so
nice and helpful! Among other reasons.) 

My colleague asked the following (** lines)  and I replied as best, if I
am wrong then please let me know! In a couple of cases I do not know the
answer so one of us may have to RTFM -- but I am not even sure where to
start, so even  a pointer to relevent section of TFM would be
appreciated.

** the location of the user manual or the synthax to: 
   I provided link to current GNU compiler collection documents, of
course there's also man pages. But if the specific questions have simple
answers we could get working code straight away. 


- use direct format of the source file
  I am not sure what this means, I asked for some clarification. 
  Does this mean something to fortran users? 

- use extended length for the lines in the source file (132 characters) 
  This is the -ffixed-line-length=132 option, or perhaps -ffree-form
would be suitiable 

- use byte as the size of a word in unformatted files 
  This one I don't know, is it quite simple ? 

- format for the openmp directives 
  I referred to the online documents, I am only familiar with using them
in C 
  I gather the string !$omp introduces the directives. I thought it
should be standard across compilers? 
  Or is the precise string used to introduce the directive
compiler-dependent?

- how to take them into account 
   Use -fopenmp flag (just like in gcc C , is this correct?) 
   Do you need to explicitly attach the gomp library in some way? If I
understand the 

Thanks
Robert


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]