 Welcome to another edition of RCE again. This is Brock Palin. You can find us online at rce-cast.com And yes, we are still doing these episodes. I know it's it's been a we took a little bit of time off. We did some things and We are just going forward with this But I have on the other end as usual Jeff Squires from Cisco Systems and one of the authors open MPI Jeff Thanks again for helping us out. Yeah, we're back. We took a summer hiatus. That's what I'm saying. It's my story And I'm sticking to it So we are just one month away from SC. I just got my travel stuff done and I believe we will both be there Oh, yeah So I'm gonna be there too big party in Salt Lake and our our unnamed mystery guest Which you'll hear in a minute and I he'll be there as well and for the big big party in Salt Lake and I'll tell you I can safely say I am already being crushed by my super computing deadlines I have so many things to get done before then I have escaped the past couple of years of not having any Deliverables at super computing, but this year I've got a lot of them and they're killing me So yeah, we'll all be down there Um, you know, we'll be probably tweeting a little bit and other things like that You can find all those linked off the RCE dash cast comm website Also, you can find all the old back episodes on there and everything else and you can find a link to Jeff's blog Where he recently announced something about MPI 3. Yeah, that's right big deal. That took a long time in the making There's a lot of new interesting things Happening in the MPI 3 arena and they're actually being implemented in the future and a lot of interesting stuff there I won't go too much into it here But there there is at least one thing that we'll talk about MPI 3 a little later here in the in the show Okay, well here. Let's let's go ahead and roll into that our guest today is Steve Lionel how he works for Intel but He is here to talk about modern for training what the different updates of for train and what they've provided for Computing, so Steve why don't you take a moment to introduce yourself? Thanks, Brock up. Well, I've been in and around for trend for going on 35 years now. It only seems like longer I started back in 78 with the deck on backs for trend and I've Been working on compilers for for trend runtime libraries and now since 2001 I work for Intel and I'm doing Technical support for Intel for the compilers Part of Intel's developer products division and we do more than compilers we have Some nifty analysis tools that are certainly of use for Fortran programmers Okay, so let's get a little bit of background here Can you give us an idea exactly what Fortran is and what it aimed to do? Fortran was designed back in the 19 late 1950s as a way of letting scientists Write programs rather than than have Other people try to translate what their formulas into Computer language the name Fortran stood for formula translation and it was a pretty novel idea at the time The early Fortran Language as it was defined was really very small over the years It has become standardized became a initially in an anti-standard in 1966 And there have been several revisions to it since then see seventy seven seventy seven ninety ninety five 2003 and 2008 2008 is the latest Fortran standard it is it was designed with operations that scientists and engineers and high performance people like to use and It's still very popular So what is the main motivation for continued development? So I mean Fortran is pretty old It's very mature. It has a lot of features in it But what what motivates the continued development of new features? What do people? Need new basically and and why do you guys keep working on this? Well, the one of the great things about Fortran is that it allows you to mix old code That code that was written 40 or 40 years ago will still compile and run in today's Fortran compilers but people also want the things that some of the other whooper snapper languages have such as derived types polymorphism dynamic allocation parallel processing and We're responding to the needs of the community that are developing applications and they want to use these in Fortran So the standard has evolved So why is Fortran so popularly used? I mean, it's it's an older language People's any like, well, don't we have anything better? Why is it still so popular? Well, it's it's saying that it's old is perhaps Not really good. I mean, I'm old, but I hope I'm still useful The The nice thing of the benefits of the Fortran language are that it tends to allow you to create very efficient programs that run fast it has types of operations that are very commonly used in high performance computing such as arrays and Derived types and other things and it is compatible with an enormous body of tried and true Fortran code that's been written over the years and decades And it's just you know, people are familiar with it. It it works and it doesn't have a lot of the Messiness that some of the other languages have Tries to be clean. Although the standard keeps getting bigger and bigger Now, how do you tread the fine line there between, you know, staying away from being messy? But still using, you know, some of the features from the young whipper snapper things like types and Polymorphism and all those things the way the standards committee has tended to work it is that They say, okay, we we're looking to add something such as polymorphism So you look at that you say, okay, well C++ is Established and they've got polymorphism What from see what concepts from C++ work? Which ones could be could we make look Fortran like and which ones are pretty messy that we don't want anything to do with and It's it's a give-and-take. It is compromises and so for example with polymorphism Fortran has the equivalent of destructors and Fortran. They're called finalizers, but it doesn't have C++'s constructors Although you can sort of create one So sometimes there are little things left out they try to make fit it into the Fortran view of the world and That allows existing Fortran programmers to adapt these new features without going crazy Now I'm on the MPF forum and so I'm well familiar with how Complex some of these discussions can get in a standardization body kinds of things But maybe could you lead us through this a little bit though? So the idea of having destructor but not a constructor give us a little bit of the flavor about What was the rationale that led to that decision? well, I was I wasn't part of the discussions at that time, but my understanding is that they couldn't agree on the particular semantics for some operation that happens off independently when you bring a variable into scope, which is what a constructor would be and Decided that you they would add to the language features that you could essentially write your own constructor that did whatever Setup needed to be done As I said, I wasn't there at the time with they talked about that so I don't know why Finalizers destructors were hard enough as it was and perhaps they ran out of time I don't know sometimes when something when they decide that we just can't keep adding more stuff They said we'll defer that discussion to a later standard and that has happened in the past So these different updates to Fortran Has a focus use always been scientific applications or is this also are they looking to have you know kernels written in Fortran for You know whole operating systems The focus has absolutely been HPC in engineering It is there's never been an intention for Fortran to be the universal language and in fact Fortran I think is unusual if not unique in Embracing the concept of mixed language programming with the C interoperability features that were added in Fortran 2003 You know many programmers had mixed Fortran in other languages over the past but always using extensions That different vendors had implemented and now there is a standard way of doing this so there is this notion of Fortran isn't every the solution to every problem and by keeping focusing on HPC in engineering and scientific programming we can make Fortran to be excellent for that and not Diluted with concepts that are not that are foreign to the Fortran world Okay, but along that same line. Have you had much focus adding features to the language that are specific to Helping out doing math and you said you'll formula translation Sure. Well, there are certainly array operations. It was a new thing in Fortran 90 and That has been expanded over time. There's the concept of Elemental functions where it's a function that takes a scalar But you pass it an array and the compiler essentially calls it on every element. There are a reduction Intrinsics there are Many types there's floating point control. There was IEEE floating point standard support added in Fortran 2003 Many of the things that the HPC programmers had been struggling to use as extensions or operating system specific things that Were added into the Fortran language so that you could write standard conforming and portable code That use these features now one of these other things that is Kind of the relationship to MPI now There's no direct relationship to MPI in Fortran But on the MPI forum, I was part of the whole new Fortran 08 bindings for MPI and that turned out to be an incredibly complex topic for a variety of reasons but It created the opportunity for a great collaboration between the MPI forum and the J3 committee which is the Fortran standards body and We were very pleased that the J3 committee actually added some things to Fortran that were very helpful to MPI That enabled a new much stronger robust Set of Fortran bindings. Can you comment on that process at all? Sure. I was sort of sort of involved in it The Fortran committee has long had collaborations with other standards bodies MPI open MP and others and they we There were proposals that for things that MPI really needed in particular the equivalent of C's void star and the ability to pass Fortran arrays to some external library that knew how to Access the array and the dimensions and all of and things like that so we added to the Fortran language in a extension to Fortran 2008 called the technical specification on Expanded C interoperability there were Three basic things that were added one was a concept called type star which is essentially void There was dimension dot dot which means something that matches any rank of array and Dot dot was used because that's sort of a colon on its side both star and colon Had already had meanings in Fortran. So we had dot dot and there was a set of routines that could be called from C to manipulate Fortran array descriptors in a standard conforming manner and those things put together would help MPI provide a an efficient and easily usable library for use by Fortran programmers And then I think you also added a third thing to or you strengthen the definition of the keyword asynchronous too, right? Oh, yes, that's right there. That was something that was added in Fortran 2003 and Its meaning was a little bit ambiguous And so yes, there was some tightening up as to exactly what that meant allowing the compiler to do optimizations And not not losing optimizations when it realized that for example an MPI call might update an array after the call returned Yeah, for example like a non-blocking MPI receive where the user application specifies a buffer and we want the Fortran compiler not to do any optimization on that buffer until much later when The user pulls MPI for completion and says yes The receive has completed behind the scenes for you there But we had to you know indicate to the Fortran compiler that the buffer might be changing Behind the scenes and beyond your control for example hardware might be writing to it directly and things like that So this actually made non-blocking operations safe in MPI Fortran, which is a very very good thing Okay, so we've been throwing a lot of things out here and something I see a lot is from users like well, I need a Fortran 90 compiler well 1990 was over 20 years ago, so What are the current like modern Specifications of Fortran that have been updated since then The current version of Fortran the latest one that was adopted in 2010 is Fortran 2008 Which is a pretty large jump over what was in Fortran 2003 that was adopted in 2004 And it was a pretty large jump over Fortran 95, which was adopted in 97 There are no full language Fortran 2008 compilers out there none There are two full language Fortran 2003 compilers IBM and Cray IBM for their their AIX systems and cray for their Cray OS systems not the ones that run Linux Intel is pretty close with Fortran 2003 and we have a bunch of Fortran 2008 features but we're not fully there yet and some other vendors are at varying stages in Fortran 2003 compliance the fact that Some eight years after the adoption of Fortran 2003. There are only two 2003 compilers out there has Caused the standards committee to sort of caught pause Adding new features so the next revision of the Fortran standard will not Have a whole bunch of new things so is this like Taking are the different compiler manufacturers kind of like taking what they think is the most likely to be used features Well, we most of them well depends on the vendors the Hardware and software vendors the commercial vendors look to their users and say, you know, what are you looking for and Intel and and the others We listen to our users and they say we want to use this feature And then there's some other features that they are not asking for and I think the two Fortran 2003 features We care least about our user to find drive type by a oh and parameterized drive types Which we haven't implemented and many of the other compiler vendors have not implemented I think only cray and IBM have those But it is a case of listening to the users and this is also why Several of the compilers have implemented some Fortran 2008 features because our users found those more compelling than the missing Fortran 2003 features So your personal opinion if I was going to be writing a new for Fortran code today What's the newest standard I could write to to make sure my stuff was usable across the largest amount of platforms. I Think you would find that Fortran 2003 would meet your needs there are quite a few compilers that Implement the most useful parts of Fortran 2003 There might be some you might want to steer clear of those features that aren't implemented There's this great table. That's updated. I think quarterly in the I triple EACM Fortran forum magazine That is a list for a whole bunch of Standard features which compilers have those features and any limitations there So I would certainly recommend checking that out if you want to know Which compilers support a particular feature I will tell you that for the Intel compiler We document in each release which Fortran 2003 and 2008 features we support and that list does grow with each new version So on a similar vein but according to my own bias here For the three or four Fortran 2008 features that MPI can exploit What do you see as the implementation timeline or if you can even comment on that for Intel? And what do you think the adoption rate of the others will be? Well, that's this bad question should I not know it's a it's a great question. It's one I get all the time. Okay We are Definitely looking at Fortran 2008 features to implement We of course like all vendors have Sort of limited resources. We can't do everything instantly So we have to set priorities and it's going to take some number of years We have committed that we will implement all fortune 2003. I expect that we'll eventually get to all of Fortran 2008 But it's going to take some time and we have to look very carefully at what our customers are are demanding and Which ones they want to use and which ones we think would be the most useful We did take quite of a big leap of faith in implementing the co-array feature from Fortran 2008 We're Intel's the only Vendor mainstream vendor to offer that at this time. Cray has had it for a long time even before it was standardized in Fortran 2008 and There's been a lot of excitement in the Fortran community over co-arrays G Fortran the part of the GCC tool suite they are implementing pieces of the co-arrays and There's an open UH compiler from Rice University of Houston. I think I'm trying to remember where they exactly where they are That supports co-arrays, but doesn't support much of Fortran 2003 so That's got a lot of excitement in the community because it's a new parallel feature when we will get that into a later question Parallel feature in the language and that's something new for Fortran Okay, so actually we've got a little bit of question about how these Editions are added to you know that we got all these modern versions of Fortran that have added all these features on top of the previous versions Should we call the old gray beard stereotype dead and we should call that done and If that's the case if there's not this magical panel of old Fortran gray beard setting these things Is it just Fortran compiler vendors kind of working together to set these standards or are there people besides compiler manufacturers having input into this? Absolutely, there are quite a few members of the Fortran standards committee who are Users they are from for example national labs universities governments and They often drive the proposals for what's to be at what's to be added There aren't quite as many Fortran vendors in the world as there used to be The Fortran standards committee is quite a bit smaller than it was. Let's say even five or six years ago But I was at the most recent or the most recent international Meeting that was held at IBM Canada in June In fact, there's a meeting of the American committee J3 going on this week out in Las Vegas So there it's a collaboration between the vendors and the users and as far as gray beards go there's quite a few young people who are using Fortran and Driving the process as well So let's talk about some of these new features here What what things have been added and say in in o3 and o8 and so on that are specific to Parallel or distributed or shared memory and things like that Well, it would be in 2008 was the first of those there are two particular features that were added to Fortran 2008 one is co arrays, which is a Partition global address space language that Provides for distributing an application and that is Distribution could be on a shared memory system or could be across a cluster and Intel's Implementation, which we layer on MPI Does support both shared memory and distributed memory? Implementations there's also a feature called do concurrent which I like to call a for all done right for all was a Feature from a discarded extension to Fortran 90 called high-performance Fortran and was adopted into Fortran 95 and it was an attempt to To make something that sort of looked like a do loop that would run in parallel Except that the semantics were so restrictive it could not effectively be paralyzed So in Fortran 2008 do concurrent was Provided and that looks much more like a regular do loop except that the standard says if you have this Then each iteration of the loop can be run in parallel and in any order And then it's up to the programmer to make sure that there are no loop dependencies The Intel compiler will parallelize a do concurrent if you ask for auto parallelization Now what's the relation then between do concurrent and open MP for example? There is no direct relationship Our particular implementation uses open MP underlying the do concurrent and auto parallel Implementation, but there's nothing specific there You of course open MP can be used in Fortran programmers programs has been used for many many years And is probably one of the more popular ways of getting parallelism in a Fortran program in a shared memory environment So is there a reason that I would use? Do concurrent over open MP? I mean now right now you said you're the only vendor I think that has done do concurrent and so for portability. I might still choose open MP But semantic wise or performance wise is there a reason to use one over the other I? Said we were the only ones who did co-arrays. I don't know. I'm sorry. That's fine I don't actually know what the state of do concurrent is across other vendors The programming model is different. You have to look at what your application needs some applications I mean if you want to think of it as difference between open MP and MPI that not every application is Perfectly suited for one or the other and there are some applications that use a mix of both and that's the way it is here You have to if you have something where there's a lot of computation being done Sort of individually in a slice and not a lot of communication between the instances of the code Then something looser such as co-arrays or MPI would be effective if you're simply doing something tight parallelization with with let's say a large array and Then do concurrent might be more useful as is open MP So Kory let's let's talk about Kory a little bit What what is the space for Kory verse like we already have things like MPI? That seems to be available on almost every platform and we also have things like one-sided memory operations You know shmem and other things Why why Kory why something else? well, first of all Kory is in the FORTRAN standard and therefore the the syntax and the use of it is standardized whereas MPI is is Mostly standard, but there are sometimes little differences in implementation among the different MPI versions The also co-arrays are well integrated into the FORTRAN language. You can do I O of a co-array You can call a routine and pass a co-array. There are intrinsics that Get information about co-arrays and you can sort of just using regular FORTRAN syntax reach out and touch piece of a co-array that's in another image with MPI you're talking about library calls and the compiler doesn't really know about What that library call does with co-arrays? There's much more the compiler knows a lot more about what's going on But doesn't it also put a lot of extra burden on the compiler to be aware of like the most effective way to Transfer data across different types of networks on different platforms rather than just being aware of like CPU architecture and things like that Well, the compiler doesn't really need to know about that That's more of an issue for the underlying transport layer and there are there are many possible Transport layers available. I know that G for TRAN and is they're using one and open UH is using Something up a P gas library. We use MPI. That's which is one possible thing We layer on Intel MPI which is an implementation We know about that has been optimized for use with different types of underlying fabrics so The compiler doesn't need to worry about that the compiler does need to worry about making it Efficient to do the communication and yes a good MPI programmer For example might be able to write a program that works better than a co-array program, but the co-array program is Perhaps easier to understand more FORTRAN like and integrates better with the rest of the FORTRAN language Do you have many customers who are writing co-array FORTRAN stuff because I I would love to hear about some real-world Expertise with us because I think we all agree that MPI is not necessarily the answer is probably among the most prominent and most used parallel paradigms, but it is certainly not the Only answer and is not the best answer for for many applications and open MP was supposed to be The big MPI killer and it kind of isn't and so is co-array FORTRAN posed to take over that space for at least some classes of applications I Certainly do know of customers who are shifting from MPI to co-arrays The semantics are close enough in many ways. It makes this sort of easy If you've already got an MPI application, you can probably start inserting co-array stuff without completely rewriting it That wouldn't be quite the case of with an open MP application I don't know that I can name customers, but I we do have some that are using them in real-world applications So is the new features for FORTRAN added anything to hook into Some accelerators or any type of third-party peripherals rather than traditional CPUs What we're looking at is the open MP committee is standardizing syntax for offloading work to a Some external processor of course Intel has the the new Intel Xeon Phi co-processors That we recently announced in our shipping now You'll see a lot of exciting things about that especially if you come to super computing Well, there would be a lot of customers doing presentations on how they used Intel Xeon Phi so far That's supported with Intel specific directives in the FORTRAN and C++ compilers But we are working with the open MP committee to standardize syntax for that and we will support the open MP syntax When that comes about the FORTRAN standard itself is not currently moving in that direction Okay, when you say that FORTRAN is not moving in that direction Are you talking specifically in terms of directives because I've seen You know advertisements from other compiler vendors saying you know touting their Accelerator support GPU support in particular. Is that done with the compiler specific extensions then and not Language, okay. I see yes. Yeah, they the other vendors who who have added accelerator support in In FORTRAN, they all do it with directives. There's various competing models The the FORTRAN standards committee is pausing about adding significant new features to the language And so the for the next revision of the FORTRAN standard, which is going to be called FORTRAN 2015 There are just a few new features being added the enhanced seeder or operability to help MPI is one of them and additions to co arrays is another one Okay, and that makes sense because you want to standardize on best practices not standardize on on new Things that haven't really been proven yet. So there's kind of a so if I can infer what you're saying and there's kind of a shootout going between Which one of these competing approaches is is going to work is that a is that a fair characterization? Well, there does seem to be some competition in that space. Yes Okay, do you ever see a Merging of ideas or that are the models similar that such that they could be combined into a grand unified model Or is it more of an either or kind of thing? Well, I'm not the best expert on this But my understanding is there's there is a lot of overlap and the differences are Significant but not a large part of the of the approach all of the approaches. I've seen Require the user to indicate a body of code That is to be offloaded to the co-processor the nice thing I like about Intel's model is that The co-processor is optional and that if you are running your program on a system that doesn't have an Intel Z on fi processor Then it will the code will just run on your regular Intel processor the x86 processor Whereas the the other approaches if you don't have the the particular co-processor that it's designed for you're dead So what are some of the Features that you would like to see added to the Fortran standard that are not quite there yet I would like us to implement. What's in the standard now? and I would let look to users to Help us find a direction for what need what they need to be added I think that Fortran is an incredibly capable language as it is now I've been programming in it for you know for decades and I write lots of things in Fortran that you might not Normally expect to be done in Fortran and I've seen customers do that too. I Don't think there's anything really that sticks out in my mind as Fortran is useless unless it has feature x y and z Okay, so one question I ask most software developers who we talked to here And this really has nothing to do with with Fortran or or anything like that But it's just a question. I like to ask people is what do you guys use internally there and in the Intel shop for? Version control for the code that you develop for the Fortran compiler and why I just love to hear people's different answers for this Intel is currently using subversion. We had been using what CVS. I think it is before that and We switched to subversion within the last year or so Okay, well Steve. Thank you very much for your time You'd be able to find this show online soon at rce-cast.com and you can also find all of our back shows there Steve where can we find more information about the Fortran standard? the Fortran standard of j3-fortran.org I believe is the Website for the US Fortran standards committee and that has links to the current standard and lots of information about the standard You could go to software.intel.com to find out about Intel's Fortran products and also our analysis tools that work with Fortran and Also, we have links in our sort of frequently asked questions to the Fortran standards and various other articles Okay, Steve. Thank you very much again. Thanks for your time Steve. My pleasure