flang-compiler / flang

Flang is a Fortran language front-end designed for integration with LLVM.
Other
799 stars 134 forks source link

"Modern" Fortran support #63

Open szaghi opened 7 years ago

szaghi commented 7 years ago

Dear flang team,

First of all I would like to thank you very much for your great work, it is really appreciated.

I opened this issue with the only aim to let you know that I am really interested to use your compiler, but it is currently seems to have limitations about modern Fortran support. In particular, I use a lot of Fortran 2003/2008 OOP features that block me to use your great compiler.

I hope you will find the funding/time to add the support for your compiler.

My best regards.

mleair commented 7 years ago

Hi,

We saw your other open issue on Open CoArrays Support. Which other modern Fortran features are you looking for?

szaghi commented 7 years ago

Dear @mleair

Thank you very much for your kind reply.

My Fortran programs are mainly based on OOP, in particular:

I think these are the minimal requirements in order to build FOODIE that is one of my main project. There are others F2003/2008 that I use, but the above are the most important.

My best regards. My best regards.

mleair commented 7 years ago

Hi @szaghi

Flang supports those features today. Of course let us know if you run into any problems using them.

szaghi commented 7 years ago

@mleair

Thanks! Tomorrow I'll try build FOODIE and I'll report my feedback.

My best regards.

szaghi commented 7 years ago

@mleair

Just a funny note: I failed this morning to install flang... its sources and compiled object filled my 15 GB residuals opt storage :smile: I was not conscious llvm is so big... later today I'll accommodate more space into a dedicated partition :smile:

jeffhammond commented 7 years ago

@mleair

  1. DO CONCURRENT, which is trivial to do using whatever you have already for FORALL and straightforward to do as an OpenMP DO loop (i.e. implicitly pre-pend!$omp parallel do [simd])
  2. NORM2, which should be trivial.
  3. Fortran 2008 + TS 29113 features required to support MPI 3.1 Fortran 2008 bindings (see e.g. Implementing the MPI-3.0 Fortran 2008 Binding for details).
  4. coarrays, as noted previously.

I apologize if any of these have been fixed since my last Flang build (May 22). I have not tested 3 yet because the lack of other Fortran 2008 features made me pessimistic.

Related

SolidTux commented 7 years ago

I also tried to compile some of my code and noticed, that execute_command_line, which is part of the 2008 standard, is not supported, but system works.

rouson commented 7 years ago

Following up on the comment of @jeffhammond, as the flang team starts to consider adding the parallel features of Fortran 2008/2015, a good next step after do concurrent is to support the class of embarrassingly parallel problems that don't necessitate declaring a coarray. I have encountered numerous research groups whose parallel programming needs are completely served by

  1. Synchronization:sync all and sync images,
  2. Error termination: error stop, and
  3. Collective subroutines: co_sum, co_broadcast, co_min, co_max, and co_reduce.
  4. Image enumeration: this_image() and num_images()

Each of these could be obtained at relatively low cost by linking to OpenCoarrays and the OpenCoarrays team could work with the flang team on making any necessary adjustments such translating data descriptors and such.