Windows version of FoX

176 views
Skip to first unread message

Norman

unread,
Oct 21, 2011, 2:34:27 AM10/21/11
to FoX-discuss
Is there a Windows version of FoX?
I noticed a post from Shane Clauson in 2008 - did that work and is
it available?

I've had a brief look at the current source code and I notice that "/"
is hard wired as a dir/sub dir separator, this is not too hard to fix,
but I am worried by the way character strings have been used, there
are lots of constructs such as

character, pointer :: scheme(:) => null()

this suggests to me that there is some C interoperability used
somewhere that I have not spotted yet.

My version of intel visual fortran does not understand most of the
compiler directives and I have manually preprocessed the code and on
that basis I can get example 1 to run but not example 2.

What are the main issues about conversion to windows?

Many thanks

Norman

Andrew Walker

unread,
Oct 21, 2011, 5:29:26 AM10/21/11
to fox-d...@googlegroups.com, Norman
Hi Norman,

There is no windows specific version of FoX but, given a standard compliant Fortran 95 compiler, the code should work without modification. Having said that, I've never really tried to build on a windows machine and don't have access to one with the compilers needed to test this out. It's also important to know that the default build system is tied to a unix-like environment but I am aware some people have been successful using the library on windows systems.

On your specific points: just like Fortran, FoX doesn't really know anything about file paths. The hard coding of '/' in the source code is to deal with parsing URI's (needed for xml:base, for example) and extracting URI segments. Now, when you pass a file path into FoX it treats it as both a string that can be passed to the OS to open a file, and as a URI to be associated with the XML document. On a unix file system this is fine. Mostly windows seems to do the 'right thing' if you use '/' as a path separator (I think most Fortran runtimes do a conversion to '/' inside of the open call). You do end up with problems if you need to use disk names on windows - see the last few messages in this thread: http://groups.google.com/group/fox-discuss/browse_thread/thread/9f723d21280319e9 (which reminds me that I need to put something about this in the documentation before the next, very overdue, release).

On the second point, there is no C interoperability used in FoX. The construct "character, pointer :: scheme(:) => null()" is pure Fortran 95 (pointers came along in Fortran 90, I think assigning them to null() on declaration arrived in Fortran 95). It turns out that FoX is a little hard on Fortran compiler vendors - it seems to be very good at finding compiler bugs. It's worth making sure you have an up to date compiler.

I think the biggest issue you'll find with FoX on widows is working out how to build the code without running the configure script and using "make". (1) You probably have three options here: you could try and translate the makefiles into the visual studio equivalent (I think these are called project files but I'm no expert, I think this is what Shane Clauson did). (2) You could install CMake on Windows and use FoX's alternate cmake-based build system (this should work, but I think Allen Barnett has fixes that you'll need to get this working properly). (3) You could install Cygwin and use its unix shell on windows to use standard build machinery (we used to do this when FoX was first being developed, the configure script should be happy with this).

I hope this helps.

Cheers,

Andrew

> --
> You received this message because you are subscribed to the Google Groups "FoX-discuss" group.
> To post to this group, send email to fox-d...@googlegroups.com.
> To unsubscribe from this group, send email to fox-discuss...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/fox-discuss?hl=en.
>

--

Andrew Walker <andrew...@bris.ac.uk>
http://www1.gly.bris.ac.uk/~walker/

Department of Earth Sciences,
University of Bristol,
Wills Memorial Building,
Queen’s Road,
Bristol, BS8 1RJ, UK

Shane Clauson

unread,
Oct 21, 2011, 6:30:24 AM10/21/11
to fox-d...@googlegroups.com
Hi Norman,
Yes, I'm still out here and still happily using FoX with intel fortran
(now version 11.1.6) .
I have a project file that builds a separate library for FoX,
and I link to that library from my project work. I can forward this to
the list if that would help.

The version of the codebase I am using here is slightly modified from
the distribution
to address issues we have with URIs under windows, some minor crashes
with memory errors
and to ensure FoX calls will return an exit status rather than ever
issue "Stop".
This latter issue tends to make our application code appear to "crash"
before being
allowed to handle problems in the xml and exit gracefully !

Cheers,
Shane

Norman Kirkby

unread,
Oct 21, 2011, 7:57:31 AM10/21/11
to fox-d...@googlegroups.com
Dear Shane

This would really help me if I could take a look at your code and the
IVF/Visual studio tweaks

Just to assure you: I am engaged in a research project for the NHS,
this is not a commercial project

Many thanks

Norman

--
Dr Norman Kirkby
Reader in Chemical Engineering
Faculty of Engineering and Physical Sciences (J2)
University of Surrey
Guildford, Surrey, GU2 7XH
Phone 01483 689116 Fax   01483 686581
(Room 31BC02)
Ancient engineering proverb: "It takes a crank to start a revolution"

Reply all
Reply to author
Forward
0 new messages