forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

gFortran
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Wed Sep 13, 2017 12:57 am    Post subject: Reply with quote

About ten years ago, a symbolic debugger called Insight was available for use in Cygwin. I used it, and found it quite capable. It had panes for locals, stack, etc., quite similarly to the ones in SDBG. Unfortunately, it is gone now.
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Wed Sep 13, 2017 4:35 am    Post subject: Re: gFortran Reply with quote

kaliuzhkin wrote:
How do I compile and link gFortran? “x86_64-w64-mingw32-gfortran.exe/?” is useless.


One of the problems I have/had as a new user of gFortran was : Where is the usage documentation?

To be able to compile, link and run gFortran programs on Windows and in a cmd.exe box, you need to define their path:
where the .exe files are located, (...\bin directory) and
where the libraries are located. (...\lib directory)

The key to solving this is to modify the PATH environment variable.

The location of the .exe files must be included in the PATH environment variable.
Some versions of gFortran can locate the libraries, based on the ...\bin path, while some versions define a lib environment variable, eg some versions of equation.com use EQ_LIBRARY_PATH=C:\Program Files (x86)\gcc_7.1.0\x86_64-w64-mingw32\lib

I previously posted examples of my approach to modifying the PATH environment variable by defining:
GCC_PATH = exe path; lib path
FTN95_PATH = exe path for FTN95 .exe programs
orig_path = PATH that OS and other installs generate

I then define PATH=%gcc_path%;%ftn95_path%;%orig_path%;c:\utils
This is done in control panel > SYSTEM > Advanced system settings > Environment Variables

I use c:\utils as my own area for .exe and .bat files that I have developed

Note:
FTN95 also defines a directory for global <include> files (f95include) and .mod files. (mod_path)
FTN95 has other environment variables, (documented somewhere ?)
gFortran may have a similar approach, but I have not found it documented.

You could search the FTN95 and gFortran documentation for environment variable settings.

I don't know why I can't find this information ? Maybe it is just me or is it a test to make sure users have enough general knowledge to use the product ?

Finally, gFortran comes as 32 bit (i686) or 64 bit (x86_64). Unless you have a definite reason, I would recommend using the 64-bit version. Same applies to FTN95.

I hope this helps
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Wed Sep 20, 2017 2:37 am    Post subject: Reply with quote

PaulLaidler wrote:
Plato support for gFortran is of necessity fairly minimal

It may be minimal, but I have found it to be quite functional.
By creating a project in PLATO, I have been able to achieve an OpenMP build, using varying compile options for different routines.
I selected Release x64 and Tools > Options... > Use gFortran/gcc for x64; I was able to build the project.
The properties offers "gFortran options", "Linker Options" and "Launch arguments" which have enabled me to build and run a fairly complex OpenMP test program.
Other options; "gcc options" and "windres options" are provided, although as yet, I am not familiar with their use.
Properties can be allocated to a project or a file, which helps with selective compile options for different files.
Compile and link options for Clearwin64 are included as default. I could not turn them off, although they did not cause any problems. (A release .exe may require the .dll's?)

The only problem I have found is that the setting "Tools > Options... > Use gFortran/gcc for x64" is not retained in the project definition file.

To use gFortran and PLATO, the default system PATH must be correctly configured, which is the answer to the original post in this thread.

Paul's use of the term "minimal" may be referring to the lack of menu support for the gFortran compile options, which is quite understandable.
It would be a significant task, especially if combined with a info pop-up for each option, although would be a big help!

PLATO is an IDE that works for gFortran.

John
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Wed Sep 20, 2017 8:02 am    Post subject: Reply with quote

Thanks for the encouraging feedback John.
You are right, I was thinking of the gFortran command line options;
also that clearwin64f.dll might become incompatible with new releases of gFortran.

Regarding the switch between FTN95 and gFortran, I will check what is saved in the ini file.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Wed Sep 20, 2017 8:15 am    Post subject: Reply with quote

The gFortran switch is saved and restored correctly for me.

It is stored as UseGFortran in C:\Users\Paul\AppData\Roaming\SilverFrost\FTN95\Plato.ini on my machine.
Back to top
View user's profile Send private message AIM Address
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Wed Sep 20, 2017 3:25 pm    Post subject: Reply with quote

Hi Paul,

I have limited experience with projects in PLATO, as I am still becoming familiar with these features. The results are encouraging, especially for accessing OpenMP.

Regarding the gFortran selection in Tools > Options... : I was expecting that this status would be included in the project.ftn95p file.
I was also expecting that the (Release x64) compile MODE drop down switch would also be included in the .ftn95p file.

If I change either the compile MODE or "Tools > Options... > Use gFortran/gcc for x64" (eg when changing to other projects), this can disrupt the Project > Properties... display, when returning to a gFortran project.

Also, is it possible to adjust the clearwin64 compile and build options ? as you suggest clearwin64f.dll may not be compatible with other versions of windows gFortran. I have not experienced this problem, while I am using different versions of gFortran, that are not from mingw-w64.

The next phase I shall be attempting is use of .dll and libraries, associated with gFortran (and /64), which also needs some documentation. I will see what I can update.

John
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Thu Sep 21, 2017 8:57 am    Post subject: Reply with quote

John

I will see if the gFortran switch can be included in the project data in a simple way.

I will also check that "Release x64" is saved. This should already be the case.

I don't know if the ClearWin64 compile and build options can be adjusted. In fact I don't know what this implies. It may already be possible for you to build clearwin64f.dll for yourself, if not then I should be able to provide you with a build script. You would only need this if clearwin64f.dll becomes incompatible with the version of gFortran that you are using.

As I mentioned before, we can't undertake to keep pace with new versions of gFortran. I don't remember all of the details right now but I think that this means that you should either avoid using clearwin64f.dll or that we need to provide you with a means to rebuild it if it becomes incompatible.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Thu Sep 21, 2017 9:24 am    Post subject: Reply with quote

John

For me, "Release x64" is saved correctly. Are you aware of the latest download? A link is provided in the Plato section of this forum.

I have added the state of the gFortran switch to the project data (for the next release).
Back to top
View user's profile Send private message AIM Address
kaliuzhkin



Joined: 17 Sep 2012
Posts: 33

PostPosted: Thu Sep 28, 2017 9:39 pm    Post subject: Reply with quote

As the OP, I give up on trying to use Silverfrost's GFortran. Sad I haven't been able to compile any code, even the GFortran samples. Back to FTN95, ver 8.10.
Back to top
View user's profile Send private message Send e-mail
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Sat Sep 30, 2017 3:51 am    Post subject: Reply with quote

kaliuzhkin,

I do not find your experience; I suspect you do not have the path for gfortran and ftn95 correctly defined for PLATO. PLATO needs the path system environment variable to include the paths for gfortran and ftn95 to be able to work correctly.

Could you :
1) open a cmd.exe box and type set path > path.log
2) open path.log in notepad and place an <enter> after each ";", as the line is very long.
3) could you post this info.

What you should see included in path list is the path name of where gfortran.exe and ftn95.exe are installed.
You should inspect the contents of C:\Program Files (x86) and C:\Program Files to locate the executable for FTN95 and gFortran.
For example, my paths are:
C:\Program Files\mingw-w64\x86_64-7.1.0-posix-seh-rt_v5-rev2\mingw64\bin
C:\Program Files (x86)\Silverfrost\ftn95
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group