Subject: [FFC-dev] long type for constants

From: Reza Farrahi Moghaddam <[email-masked]>
Date: Fri, 25 Apr 2008 14:50:59 -0700 (PDT)

The problem with boost and enableDemos is resolved. 
Now, I have a problem with compiled form file. The form file is attached. When linking the program, there are some errors about integer costants which are large for "long" type. The log is presented below. 
Is it possible to change the type of constants from "long" to "long long"?
Reza
P.S. The errors will disappear when the last function "sigmma" is removed and a fixed value for sigmaa is used.
[rfarahi@alteran cpp]$ scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
c++ -o main.o -c -Wall -pipe -ansi -g -O2 -fno-strict-aliasing -pthread -DDEBUG -DNDEBUG -DPACKAGE_VERSION=0.7.2 -DHAS_UMFPACK=1 -DHAS_GTS=1 -I/usr/local/include -I/usr/local/include/libxml2 -I/home/rfarahi/math/dolfin-hg/linux-opt/include -I/usr/local/lib/python2.5/site-packages/numpy/core/include -I/home/rfarahi/math/UMFPACK/Include -I/home/rfarahi/math/AMD/Include -I/home/rfarahi/math/UFconfig -I/usr/local/include/python2.5 -I/usr/include/boost-1_35 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include main.cpp
In file included from main.cpp:31:
NonlinearPoissonparam.h:5854: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:5854: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:5854: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:5854: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:5854: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:5854: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:5854: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:5854: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:5854: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:5854: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:5854: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:5854: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:5854: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:5854: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:5854: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:5854: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:5854: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:5854: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:12543: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:12543: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:12543: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:12543: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:12543: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:12543: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:12543: error: integer constant is too large for "long" type
NonlinearPoissonparam.h:12543: error: integer constant is too large for "long" type
scons: *** [main.o] Error 1
scons: building terminated because of errors.

      __________________________________________________________________
Get a sneak peak at messages with a handy reading pane with All new Yahoo! Mail: http://ca.promos.yahoo.com/newmail/overview2/

---

From: Anders Logg <[email-masked]>
Date: Sat, 26 Apr 2008 09:26:17 +0200

Can you attach the relevant portions of the header file?

-- 
Anders

On Fri, Apr 25, 2008 at 02:50:59PM -0700, Reza Farrahi Moghaddam wrote:
> Now, I have a problem with compiled form file. The form file is attached. When
> linking the program, there are some errors about integer costants which are
> large for "long" type. The log is presented below.
> 
> c++ -o main.o -c -Wall -pipe -ansi -g -O2 -fno-strict-aliasing -pthread -DDEBUG
> -DNDEBUG -DPACKAGE_VERSION=0.7.2 -DHAS_UMFPACK=1 -DHAS_GTS=1 -I/usr/local/
> include -I/usr/local/include/libxml2 -I/home/rfarahi/math/dolfin-hg/linux-opt/
> include -I/usr/local/lib/python2.5/site-packages/numpy/core/include -I/home/
> rfarahi/math/UMFPACK/Include -I/home/rfarahi/math/AMD/Include -I/home/rfarahi/
> math/UFconfig -I/usr/local/include/python2.5 -I/usr/include/boost-1_35 -I/usr/
> include/glib-2.0 -I/usr/lib/glib-2.0/include main.cpp
> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> All new Yahoo! Mail - Get a sneak peak at messages with a handy reading pane.

> _______________________________________________
> FFC-dev mailing list
> [email-masked]
> http://www.fenics.org/mailman/listinfo/ffc-dev