Error - compiler and library support required

26 views
Skip to first unread message

Gyan

unread,
Aug 11, 2017, 2:54:35 PM8/11/17
to moose-users
Hi,

I added a new kernel for a material. When I tried to compile, it gives errors which are probably related to #include <random> in .C

Errors are:

/projects/bison$ make
MOOSE Compiling C++ (in opt mode) /home/gs3/projects/bison/src/materials/CreepUO2.C...
In file included from /opt/moose/gcc_4.9.1/include/c++/4.9.1/random:35:0,
                 from /home/gs3/projects/bison/src/materials/CreepUO2.C:20:
/opt/moose/gcc_4.9.1/include/c++/4.9.1/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support for the \
  ^

. . .
. . .

Gyan

Cody Permann

unread,
Aug 11, 2017, 3:07:09 PM8/11/17
to moose-users
Gyan, 

We DO include the "-std=gnu++11" flag in our build lines. You can verify this by type "make -n" and by searching through huge amount of text that comes out when the compiler sees a .C (capital) file. GCC 4.9.1 should be fine as well. However, why are including random yourself? MOOSE has a random system that deals with most of the problems with generating good quality random number streams for fields in a parallel consistent platform agnostic fashion. If you try to generate numbers yourself, you probably won't have any of these features.

Cody

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/c3de9eb4-7d79-4f15-917d-9a771108f2f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gyan

unread,
Aug 15, 2017, 3:59:11 PM8/15/17
to moose-users
Cody,

These material model kernels were written by a colleague; I am just using it. The error was due to the version mismatch, and rewriting the material model based on the in-built model on my bison version solved it. But still not sure why the error asked for including -std=gnu++11 when it was already there. Thanks anyway.

Gyan
Reply all
Reply to author
Forward
0 new messages