Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Nov 14 20:49
    letmaik opened #39
  • Oct 25 09:35

    szaghi on master

    update submodules update travis config (compare)

  • Oct 25 09:30

    szaghi on master

    update submodules (compare)

  • Oct 25 09:19

    szaghi on master

    update submodules update travis config (compare)

  • Oct 21 06:34
    rakowsk commented #7
  • Oct 20 16:09
    unfurl-links[bot] commented #7
  • Oct 20 16:09
    rakowsk commented #7
  • Oct 12 17:49
    ShatrovOA commented #38
  • Oct 11 15:25
    szaghi labeled #38
  • Oct 11 15:25
    szaghi assigned #38
  • Oct 11 15:25
    szaghi commented #38
  • Oct 11 13:52
    ShatrovOA edited #38
  • Oct 11 13:44
    ShatrovOA opened #38
  • Sep 19 11:19
    szaghi commented #7
  • Sep 19 11:08

    szaghi on master

    Fix parsing bug issue#7 The me… update travis config Merge branch 'release/0.1.0' (compare)

  • Sep 19 11:06

    szaghi on fix-parsing-bug-issue#7

    (compare)

  • Sep 19 07:54

    szaghi on fix-parsing-bug-issue#7

    (compare)

  • Sep 19 07:52
    szaghi commented #7
  • Sep 19 07:51
    szaghi labeled #7
  • Sep 19 07:51
    szaghi assigned #7
Milan Curcic
@milancurcic
Bam! THank you @zbeekman, great job as always!!
Izaak "Zaak" Beekman
@zbeekman
Also, http://opencoarrays.org has a new look and gitter.im sidecar integration. Go check it out!
Chris MacMackin
@cmacmackin
Hi all. I've finally gotten around to doing the work needed to get FIAT to a point where I feel I can collaborate with others. As such, I've created a new gitter chatroom for it: https://gitter.im/Fortran-FOSS-Programmers/FIAT. Everyone is invited to join that room and put across their suggestions, questions, and (if you are really eager) volunteer your time to work on it.
Chris MacMackin
@cmacmackin
I've put out a new minor release of FORD, with a number of bugfixes. Since no one from this group reported the bugs I'm guessing you haven't been experiencing any problems, but just thought I'd let you know.
Izaak "Zaak" Beekman
@zbeekman
great, I'll try to get a Homebrew PR in soon
Izaak "Zaak" Beekman
@zbeekman
FORD 4.5.2 available through Homebrew:
brew update
brew install FORD || brew upgrade FORD
Stefano Zaghi
@szaghi
FLAP v1.0.0 is out. It is NOT backward compatible. See you soon.
Chris MacMackin
@cmacmackin
I've put out a new release of FORD on PyPI. No exciting new features, but a bunch of fixes to bugs which I'm amazed I haven't caught before now.
Chris MacMackin
@cmacmackin
[Sigh...] Turns out there was another bug in FORD, this one due to a misunderstanding of the Fortran standard on my part. I've just released v4.5.4 to fix it.
Izaak "Zaak" Beekman
@zbeekman
Only three things are garaunteed in life: death, taxes and software bugs! Major props for fixing it so quickly!
Chris MacMackin
@cmacmackin
Unfortunately, software bugs have to be faced more than once and don't have the benefit of funding research grants.
Stefano Zaghi
@szaghi
Hi all, I am sorry for my long silence but these are very busy days... I would like to introduce a new member @MichaelSiehl : he is a very experienced Fortraner, very active on google group CLF where many of you already know him; he is now developing some great examples (on github) on how exploit CAF to achieve MPMD codes... not to be said it is a great effort! I hope that Michael will start very soon to develop an interesting example-program directly under the behalf of the group on how achieve MPMD by means of CAF and F03/08 OOP; I am very interested on this topic, I hope many of you will join us. @cmacmackin I am quite freezed with FIAT: I have to complete some works at my institute that prevent me to complete my contribute about octree... @milancurcic @rouson @zbeekman the occurrence of the open-call into my institute has blocked me to complete the 2D/3D tests of FOODIE into Fermi cluster: I am sorry, but very soon I will complete it (good news are that FOODIE now compiles with IBM XLF available on Fermi). For all other: I will soon update our Good Practice discussion!
Stefano Zaghi
@szaghi

To whom it may concern,

I have released a library for string handling that should condensate many of your facilities into one, single, OO-designed class:

https://github.com/szaghi/StringiFor

It exposes only one type, string, and it already has many methods inspired by other, more rich, languages (Python, obviously). However, the library can be considered not fully stable, but almost stable.

The documentation is still poor, but almost all should be already clear.

I will adopt it intensively in the near feature (FoXy, FLAP, FOODIE, others).

Your suggestions are, as always, very welcome.

My best regards.

Chris MacMackin
@cmacmackin
I've made a new release of FORD. This includes manyhh bug fixes and a selection of new features. Some of these new features were contributed by others via pull requests, so I would like to thank those involved.
From the changelog:

New features:

  • Arbitrary preprocessor can now be specified (Issue #117, PR #129)
  • CPP now used as default preprocessor instead of gfortran, as former is more widespread (note that this should not
    change results of preprocessing)
  • Pages now ordered according to file-name (Issue #121, PR #122)
  • Integration of Gitter sidecar
  • Optionally print date documentation created in the page footer (PR #115)
  • Can export graphs as SVG images and graphviz source (Issue #97)
  • Single global switch now available to hide local variables, derived types, etc. within procedures (Issue #100)
  • Support for coloured edges in graphs, which can make it easier to read large graphs (Issue #113)

Bug fixes:

  • \g in character literal no longer causes crash (Issue #136)
  • No longer interprets concurrent in do concurrent as function call (Issue #131)
  • Header doesn't cover links to particular lines of source code in source file pages (Issue #132)
  • Copying file trees now works on network file systems (Issue #128)
  • :: now accepted in all use statements (Issue #120, PR #123)
  • deferred now included in lists of type-bound procedure attributes
  • Correct handling of include paths with user's home directory specified by ~ (Part of issue #134)
  • Correctly interprets output from preprocessors when running with Python 3 (PR #129)
  • Can now copy file hierarchies deeper than 10 directories (PR #127)
  • MathJax now works for both HTTP and HTTPS (PR #126)
Stefano Zaghi
@szaghi
Dear all,

I have created a skeleton page for list Group's member

Fortran-FOSS-Programmers/Fortran-FOSS-Programmers.github.io#5

I hope you like it.

See you soon.

P.S. @cmacmackin great!

Stefano Zaghi
@szaghi

Help Wanted for polymorphic arguments!

My dear, I have a trivial question to which I am not able to respond... I need your help

Let us suppose we an subroutine that among others accept 3 unlimited polymorphic dummies

subroutine foo(arg1, arg2, arg3, ...)
class(*), intent(in) :: arg1
class(*), intent(in) :: arg2
class(*), intent(in) :: arg3
...
end subroutine foo

Before using the arg# I have to check their type/class, right? so something like

subroutine foo(arg1, arg2, arg3, ...)
class(*), intent(in) :: arg1
class(*), intent(in) :: arg2
class(*), intent(in) :: arg3
...
select type(arg1)
type is(integer)
    select type(arg2)
    type is(integer)
      select type(arg3)
      type is(integer)
           ! do my integer stuff
      end select
    end select
end select
end subroutine foo

That is very verbose and error-prone. In the case I am sure that the combination of arg# is always uniform, namely they are ALL integers, reals, complexs... and I never fall into the case that one is real and others are integers, two are reals and the last is integer and similar etherogeneous cases, there is something smarter that I can do? I am confident that there is no other way to deal with unlimited polymorphic other than select type, but I prefer to listen this from your voice :smile:

Thank you far any comments!

Tom Dunn
@tomedunn
I think I would just write a separate subroutine for each type of argument and then overload a generic subroutine to call them all via the same subroutine. It doesn't allow you to reuse the code between the subroutines but it does allow you to get rid of the nested select type statements.
Stefano Zaghi
@szaghi
Hi @tomedunn thank you for your help. Yes, generic name and dynamic dispatch was my first approach, but then I come to unlimited polymorphic just to avoi to write tons of foo_real_64, foo_real_32, foo_integer_32... where only few statements differ (again error-prone). Indeed I have written a pre-processor just for this case, but I have write a piece of code with a minimum dependency for easy-sharing and adding a pre-processor dependency is not a viable approach. Anyhow thank you very much!
Chris MacMackin
@cmacmackin
The nested select type blocks is the only way to do it. I don't find unlimited polymorphics to be especially useful, for this reason. At the end of the day, the issue here is that Fortran lacks generic programming facilities. Any attempt to replicate that functionality will be messy.
Stefano Zaghi
@szaghi
@cmacmackin Thanks, I should know this, but I was hoping to have missed something... I know that you prefer transfer workaround (I have studied FIAT even I still have not find the time to contribute to it) and I have to admit that you are right. In this case, I think I will go with the old overloading of generic names with a tons of foo_xxx. Thank you all for your help.
Stefano Zaghi
@szaghi
@cmacmackin @tomedunn @zbeekman and all, sorry to bother you again. Lefting the unlimited polymorphic approach, I am now wondering if the assumed rank arrays can help me to avoid code-duplication. I know that assumed rank arrays, e.g. real, intent(in) :: x(..) have been introduced for a better C-interop, but I am wonderding if they can help me. There are some cons in their usage? Copy-in-out? I never used them, something of you do this? Thanks in advance!
Stefano Zaghi
@szaghi

Universal Linux Package

@giacombum pointed out this interesing project

http://snapcraft.io/

I know that @rouson @zbeekman and Co. have done a lot of work in packaging OpenCoarrays, maybe this project can be of any help for them and others.

My best regards.

Giacomo Rossi
@giacombum
and if this can be helpful also for all our Fortran projects?
Chris MacMackin
@cmacmackin
From what I recall, assumed-rank isn't all that useful, for much the same reason that unlimited-polymorphics aren't that useful. Assumed size may work better for you.
Stefano Zaghi
@szaghi
@cmacmackin :worried: Thanks!
Izaak "Zaak" Beekman
@zbeekman
Yes I was excited about assumed rank until I started learning more about it... Seems mostly only useful for its intended C interop functionality
BTW the latest versions of FORD and JSON-Fortran are in Homebrew thanks to @cmacmackin's dedication and hard work to resolve a few issues.
Giacomo Rossi
@giacombum
Dear all, I've a question regarding deferred procedures and concrete types: in an abstract type I've declared an abstract procedure, that I want to use in two different concrete types. Obviously, in the two concrete types, the procedure does the same thing, but in a different manner (because of the differences between concrete types), so it needs arguments of different type or different rank... How can I overcome this problem?
One (bad) workaround could be to declare the deferred procedure into the abstract type with a lot of optional arguments, but it seems too bad also for me :-)
Stefano Zaghi
@szaghi
To whom it may concern, the new version of FoBiS v2.0.2 now supports SUBMODULES: also projects that rely on submodules can be automatically built by means of FoBiS, see https://github.com/szaghi/FoBiS. My best regards.
Stefano Zaghi
@szaghi

@giacombum
To my knowledge ALL deferred TBP must be implemented in a valid concrete extension of an abstract type. So I think you have 2 alternatives:

Optionals abuse

The abstract interface must consider all the optional arguments...

module foo_t
type, abstract :: foo
contains
  procedure(bar_interface), deferred :: bar
end type foo
abstract interface
  subroutine bar_interface(self, arg1, arg2)
  import :: foo
  class(foo), intent(in) :: self
  integer, intent(in), optional :: arg1
  integer, intent(in), optional :: arg2(1:)
  end subroutine bar_interface
end interface
end module foo_t

module foo_concretes
use foo_t
type, extends(foo) :: concrete1
contains
  procedure :: bar => bar_concrete1
end type concrete1 

type, extends(foo) :: concrete2
contains
  procedure :: bar => bar_concrete2
end type concrete2

contains
  subroutine bar_concrete1(self, arg1, arg2)
  class(concrete1), intent(in) :: self
  integer, intent(in), optional :: arg1
  integer, intent(in), optional :: arg2(1:)
  ! use only arg1, arg2 is never used
  end subroutine bar_concrete1

  subroutine bar_concrete2(self, arg1, arg2)
  class(concrete2), intent(in) :: self
  integer, intent(in), optional :: arg1
  integer, intent(in), optional :: arg2(1:)
  ! use only arg2, arg1 is never used
  end subroutine bar_concrete2
end module foo_concretes

In the case the dummy arguments are many this approach is not concise, neither clear.

Avoid the deferred at all

This makes the abstrac less clear, the contract becomes not explicit, but the concretes are not polluted by never-used optionals

module foo_t
type, abstract :: foo
  ! for developers: rember to implement a concrete bar!
end type foo
end module foo_t

module foo_concretes
use foo_t
type, extends(foo) :: concrete1
contains
  procedure :: bar => bar_concrete1
end type concrete1 

type, extends(foo) :: concrete2
contains
  procedure :: bar => bar_concrete2
end type concrete2

contains
  subroutine bar_concrete1(self, arg1, arg2)
  class(concrete1), intent(in) :: self
  integer, intent(in) :: arg1
  ! use only arg1
  end subroutine bar_concrete1

  subroutine bar_concrete2(self, arg2)
  class(concrete2), intent(in) :: self
  integer, intent(in) :: arg2(1:)
  ! use only arg2
  end subroutine bar_concrete2
end module foo_concretes
Giacomo Rossi
@giacombum
Well, both approaches seems to have pros and cons, and you have highlighted them... is there any other opinion? I prefer the second one: more clean.
Stefano Zaghi
@szaghi

@/all Dear all, do you have a VIM syntax file for Fortran supporting submodule related syntax?

In particular, let us consider the following snippet:

submodule (foo) bar
contains
  module subroutine foo_bar
  ...
  end subroutine foo_bar
endsubmodule bar

I want:

  • highlight submodule and endsubmodule;
  • enable folding of module subroutine/end subroutine and module function/end function.

Thank you in advance!

P.S. @giacombum I have not a particular preference for your question, it depends on how many arguments are optional.

@tomedunn I see that you have two different Fortran vim syntax. Which is the best among them? The update time is very close...

https://github.com/tomedunn/vim.modfortran => Aug 16, 2015
https://github.com/tomedunn/vim.fortran => Jul 11, 2015

Tom Dunn
@tomedunn
I think the second one is the one to go with. I can't say I've dealt with them that much since I uploaded them. The first one, vim.modfortran was my attempt to completely redo the Vim Fortran syntax package. But I don't think I ever finished it. The second one looks like what I've been using to modify the existing Vim Fortran syntax package.
Stefano Zaghi
@szaghi
@tomedunn Just tried both. Effectively the second seems works bettter, i.e. it enables syntax highlight for submodule/endmodule. However, I am not able to correctly fold module subroutine/end subroutine and module function/end function. Is it difficult to improve the folding? Anyhow thank you very much, now your vim.fortran is my preferred Fortran vim syntax :clap:
Tom Dunn
@tomedunn
@szaghi Glad it helps. Back when I put together the vim.modfortran package I put a good deal of effort into understanding how Vim syntax packages work but I never got very far. Compared to the syntax highlighting package I put together for the Atom text editor writing one for Vim is much more complex.
Stefano Zaghi
@szaghi
@tomedunn sad to learn this. I like Atom, but I am too much addicted to vim to use anything else...
Tom Dunn
@tomedunn
@szaghi yeah, I know what you mean. There is a pretty decent mod for Atom that gives basic Vim style keybindings but you still miss out a lot of helpful things. If you want to try to setup code folding for submodules you can find examples in the default Vim Fortran syntax file by searching for region.
Stefano Zaghi
@szaghi
@tomedunn Thanks a lot, I am not sure if I will find the time, but this information is a great help! :clap:
Stefano Zaghi
@szaghi
@tomedunn Dear Tom, I have just created a Pull Request for your vim.fortran. I have added the fortranModuleFunction and fortranModuleSubroutine regions for folding these constructs. I was unable to create a region for submodule/end submodule, the regex of vim is not intuitive at all! Indeed, I had few minutes to play with it, but the first saw vim regex really makes me afraid... The two folding regions addes seem to work, but feel free to discard my PR. Thank you again.
Tom Dunn
@tomedunn
@szaghi I added a region for folding submodules.
Stefano Zaghi
@szaghi
@tomedunn great! :clap:
Chris MacMackin
@cmacmackin
@giacombum I'm of the opinion that abstract procedures should only be used when the implementations have the same interface. This requirement is not peculiar to Fortran but is intrinsic to all object-oriented languages. The optional argument choice strikes me as really bad. If you are dealing with a polymorphic variable of this type, then you won't know which argument you should be passing. To be honest, there isn't really any point in having an abstract procedure if it won't have the same interface in all implementations.
Stefano Zaghi
@szaghi
@cmacmackin I disagree. In FOODIE the deferred method for the ODE time derivative as an optional argument, the time t. It reflects very well that the residual function can or cannot explicitely depend on time. If the concrete ODE has U_t=R(U(t)) than you will not pass t to the method %time_derivative, on the contrary if U_t=R(U(t), t)) you will pass t. So, the API is not unique, but the usefulness of having an abstract is tremendus. I am not so rigorous in exploiting abstract.
Chris MacMackin
@cmacmackin
That may be areasonable exception. What I'm objecting to is more the idea of using one optional argument in one implementation and a different one in another. At that point i I don't see the point of using a deferred procedure.