getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Getfem-users] C++11 in Getfem


From: Andriy Andreykiv
Subject: Re: [Getfem-users] C++11 in Getfem
Date: Thu, 20 Mar 2014 14:30:21 +0100

Dear Yves,

As you can see, for instance, from this document
http://gcc.gnu.org/gcc-4.6/cxx0x_status.html

gcc 4.6 supports most of the features (yes, not all). At least it supports all that I currently use: atomic's, lambda's, auto's, range based for-loop. Regarding your question if it's stable, well, I propose to call it stable as long as the code can be compiled with good diagnostics and it can pass Getfem tests.  Additionally, here, in our company, we daily run a large number of tests, so if we notice anything broken, we'll let Getfem users know as well. 

But I would like to say that I am not "pushing" :) . If any of Getfem users has a desire to wait a bit, I don't mind. 

Best regards,
                        Andriy


On 20 March 2014 13:59, Yves Renard <address@hidden> wrote:

Dear all,

I was thinking to release a version this summer (may be the 5.0 if new assembly and new time stepping are sufficiently developped and an intermediary version 4.3 if not).
So the question seems to be either to adopt C++11 standard before or after this release.

Andriy, do you think that gcc 4.6.3 with the option -std=c++0x is a stable enough implementation of what you presently use of the c++11 new facilities ?
If yes, I think we can rapidly switch to the new standard. If not, I think that Kostas is right, the better would be to wait a bit (about 4 months), release the new version with the old standard and then switch to c++11.

Best regards,

Yves.



Le 20/03/2014 11:37, Andriy Andreykiv a écrit :
Dear Kostas and Getfem users,

I agree that we should give it a thought, but regarding the argument on Getfem users using older versions of Linux. 
I, from my side still have Ubuntu 12.04 and run gcc 4.6.3 (at home), but I enable most of the C++11 features using 
-std=c++0x or -std=gnu++0x compiler options. And I didn't upgrade my Linux for a few years now (I think). 

Yet, similar to you, Kostas, I also propose to take the opinion of people who will have a problem with this dependency, but 
lets hear if there are any. So, may be, given Yves announcement, we could wait for a week or two, if there is anybody
against this move. If not, we go ahead. Do you agree?

Best regards,
                        Andriy

 


On 19 March 2014 20:16, Konstantinos Poulios <address@hidden> wrote:
Dear all,

I had interpreted Andriy's question, as if getfem++ should use C++11 by default or not. I now see that the actual question is if it is ok for getfem++ to depend on C++11. My opinion is that at some point soon or later getfem++ (like also many other software projects) will depend on C++11 anyway. So the actual question is when.

A dependence on C++11 will not affect me personally and packaging for future Linux distribution is not a problem either because most of them come with gcc 4.8 anyway. One problem that I see is with people that may need to compile getfem++ on e.g. university clusters with older linux distributions like Ubuntu 12.04 and CentOS. I think it is common for university clusters to run on outdated --some call it stable-- linux distributions with older compiler versions. So making C++11 a hard dependence may affect some people for the next 1-2 years or so.

I think a realistic approach is to release the next version (soon) without depending on C++11 and merge all C++11 specific features just after the release. In any case I would recommend to give it a more technical thought before doing the switch, in the sense that Yves mentioned in his email.

Btw. some code clean up would also be very welcome but I think this also fits better after the next stable release.

Best regards

Kostas




On Wed, Mar 19, 2014 at 1:13 PM, Yves Renard <address@hidden> wrote:


Dear All,

What made me hesitate to definitely switch to C++11 is the fact that the version of gcc on the stable release of Ubuntu (2012) is gcc 4.6.4. that does not support C++11. Consequently, caution rather led me to wait a little longer (namely 2017 the next stable version of Ubuntu). In addition, I did not personally need the new features of C++11 for the moment (of course, I would not have developed the library gmm in the same way with the features of C++11 if it had been available in the early 2000s!).
But of course, I understand Andriy who sees the interest to use these new features. Three years is a little bit long. I am not against the switch but it will force us to use at least gcc 4.8  and force the update of a few things in the code (such as obsolescence of auto_ptr).

In conclusion, has anybody some further arguments against the switch ?

If not, I think I will check carrefully the compatibility of Getfem sources to gcc 4.8 and  enforce C++11 ...

Yves.



Le 19/03/2014 12:08, Andriy Andreykiv a écrit :
Dear Kostas and Getfem users,

At our company we build Getfem on Windows with Intel C++ as well as MSVS 2012 C++
and on Linux with GCC 4.81. As far as I know Clang supports 11th standard too. 
These are major C++ compilers (correct me if I"m wrong) and all of them 
happily support major C++11 features.

What you, Kostas, are proposing, about conditional compilation of 11th features, sure possible, but 
is really a big burden to maintain, at least for our side. Imagine if I use Lambda's and auto's and then 
I have to conditionally provide code for the case C++11 is not enabled, then I have to sometimes 
re-design several functions. If I have to do that, then I have no reasons to use 11th features at all.
I do use conditional compilation now and then, during implementation of multithreaded assembly. 
It, sure, makes sense for performance reasons, but C++11 is always available and not such a reason. 

Given the above I would propose to Getfem community to have 11th standard enforced by default,
and allow code that compiles only with C++11 on. Please tell me what you think about this.


Best regards,
                      Andriy




On 19 March 2014 11:17, Konstantinos Poulios <address@hidden> wrote:
Dear Andriy,

actually the intention of my change was getfem to support C++11 by default if the compiler supports it by default.

Are you using msvc or gcc? I thought that my change would affect only compiling with gcc which officially does not support c++11 by default.

Even with gcc one can still enable c++11 by adding the appropriate CXXFLAGS at running the configure script.

Within getfem we just need to use
#if __cplusplus > 199711L
#endif
conditionals for features that depend on C++11.

Is there any practical issue that I am forgetting here?

Best regards
Kostas




On Wed, Mar 19, 2014 at 10:26 AM, Andriy Andreykiv <address@hidden> wrote:
Dear Getfem users,

Currently, Getfem is configured by default not to support C++11 (revision 4536).
May I ask why?  I would really want to have it supported. I like to use lambda's auto's and the new for loop syntax in my code, but,
more importantly, C++11 includes libraries that otherwise have to be included through Boost (I'm using at least <thread> and <atomic>)

Best regards,
                        Andriy

_______________________________________________
Getfem-users mailing list
address@hidden
https://mail.gna.org/listinfo/getfem-users





_______________________________________________
Getfem-users mailing list
address@hidden
https://mail.gna.org/listinfo/getfem-users


-- 

  Yves Renard (address@hidden)       tel : (33) 04.72.43.87.08
  Pole de Mathematiques, INSA-Lyon             fax : (33) 04.72.43.85.29
  20, rue Albert Einstein
  69621 Villeurbanne Cedex, FRANCE
  http://math.univ-lyon1.fr/~renard

---------




-- 

  Yves Renard (address@hidden)       tel : (33) 04.72.43.87.08
  Pole de Mathematiques, INSA-Lyon             fax : (33) 04.72.43.85.29
  20, rue Albert Einstein
  69621 Villeurbanne Cedex, FRANCE
  http://math.univ-lyon1.fr/~renard

---------


reply via email to

[Prev in Thread] Current Thread [Next in Thread]