nDarray error

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
fjubair
Posts: 1
Joined: Tue Sep 09, 2008 12:06 pm
Location: Purdue University

nDarray error

Post by fjubair »

I am trying to build OpenSees2.0.0 on Linux but nDarray keeps complaining about this error:

cc1plus: warning: -f[no-]force-mem is nop and option will be removed in 4.2
BJtensor.cpp: In member function قBJtensor BJtensor::operator*(BJtensor&)ق:
BJtensor.cpp:1174: error: unable to find a register to spill in class قDIREGق
BJtensor.cpp:1174: error: this is the insn:
(insn 130 124 131 8 (parallel [
(set (reg:DI 2 cx [457])
(unspec:DI [
(mem:BLK (reg:DI 459 [ arg_indices ]) [0 A8])
(reg:QI 4 si [461])
(const_int 1 [0x1])
(reg:DI 37 r8 [460])
] 20))
(use (reg:SI 19 dirflag))
(clobber (reg:DI 459 [ arg_indices ]))
(clobber (reg:CC 17 flags))
]) 740 {*strlenqi_rex_1} (insn_list:REG_DEP_TRUE 128 (insn_list:REG_DEP_TRUE 126 (insn_list:REG_DEP_TRUE 127 (insn_list:REG_DEP_TRUE 129 (insn_list:REG_DEP_TRUE 124 (nil))))))
(expr_list:REG_DEAD (reg:SI 19 dirflag)
(expr_list:REG_DEAD (reg:DI 37 r8 [460])
(expr_list:REG_DEAD (reg:QI 4 si [461])
(expr_list:REG_DEAD (reg:DI 459 [ arg_indices ])
(expr_list:REG_UNUSED (reg:CC 17 flags)
(expr_list:REG_UNUSED (reg:DI 459 [ arg_indices ])
(nil))))))))
BJtensor.cpp:1174: confused by earlier errors, bailing out
make: *** [BJtensor.o] Error 1




my makefile.def is as follow:


############################################################################
#
# Program: OpenSees
#
# Purpose: A Top-level Makefile to create the libraries needed
# to use the OpenSees framework. Works on Linux version 6.1
# and below.
#
# Written: fmk
# Created: 10/99
#
# Send bug reports, comments or suggestions to fmckenna@ce.berkeley.edu
#
############################################################################

# %---------------------------------%
# | SECTION 1: PROGRAM |
# %---------------------------------%
#
# Specify the location and name of the OpenSees interpreter program
# that will be created (if this all works!)

OpenSees_PROGRAM = $(HOME)/bin/OpenSees

# %---------------------------------%
# | SECTION 2: PATHS |
# %---------------------------------%
#
# Note: if vendor supplied BLAS and LAPACK libraries or if you have
# any of the libraries already leave the directory location blank AND
# remove the directory from DIRS.

BASE = /usr/local
HOME = /home/fjubair
FE = $(HOME)/OpenSees/SRC

BLASdir = $(HOME)/OpenSees/OTHER/BLAS
CBLASdir = $(HOME)/OpenSees/OTHER/CBLAS
LAPACKdir = $(HOME)/OpenSees/OTHER/LAPACK
SUPERLUdir = $(HOME)/OpenSees/OTHER/SuperLU_3.0/SRC
ARPACKdir = $(HOME)/OpenSees/OTHER/ARPACK
UMFPACKdir = $(HOME)/OpenSees/OTHER/UMFPACK
METISdir = $(HOME)/OpenSees/OTHER/METIS
SRCdir = $(HOME)/OpenSees/SRC


DIRS = $(BLASdir) $(CBLASdir) $(LAPACKdir) \
$(SUPERLUdir) $(ARPACKdir) $(UMFPACKdir) $(SRCdir) $(METISdir)

# %-------------------------------------------------------%
# | SECTION 3: LIBRARIES |
# | |
# | The following section defines the libraries that will |
# | be created and/or linked with when the libraries are |
# | being created or linked with. |
# %-------------------------------------------------------%
#
# Note: if vendor supplied BLAS and LAPACK libraries leave the
# libraries blank. You have to get your own copy of the tcl/tk
# library!!
#
# Note: For libraries that will be created (any in DIRS above)
# make sure the directory exsists where you want the library to go!

FE_LIBRARY = $(HOME)/lib/libOpenSees.a
NDARRAY_LIBRARY = $(HOME)/lib/libndarray.a # BJ_UCD jeremic@ucdavis.edu
MATMOD_LIBRARY = $(HOME)/lib/libmatmod.a # BJ_UCD jeremic@ucdavis.edu
BJMISC_LIBRARY = $(HOME)/lib/libBJmisc.a # BJ_UCD jeremic@ucdavis.edu
LAPACK_LIBRARY = $(HOME)/lib/libLapack.a
BLAS_LIBRARY = $(HOME)/lib/libBlas.a
SUPERLU_LIBRARY = $(HOME)/lib/libSuperLU.a
CBLAS_LIBRARY = $(HOME)/lib/libCBlas.a
ARPACK_LIBRARY = $(HOME)/lib/libArpack.a
UMFPACK_LIBRARY = $(HOME)/lib/libUmfpack.a
METIS_LIBRARY = $(HOME)/lib/libMetis.a
TCL_LIBRARY = /usr/lib/libtk8.4.so /usr/lib/libX11.so /usr/lib/libtcl8.4.so
BLITZ_LIBRARY = $(HOME)/blitz/lib/libblitz.a

# WATCH OUT .. These libraries are removed when 'make wipe' is invoked.
WIPE_LIBS = $(FE_LIBRARY) \
$(LAPACK_LIBRARY) \
$(BLAS_LIBRARY) \
$(CBLAS_LIBRARY) \
$(SUPERLU_LIBRARY) \
$(ARPACK_LIBRARY) \
$(UMFPACK_LIBRARY) \
$(METIS_LIBRARY)

# %---------------------------------------------------------%
# | SECTION 4: COMPILERS |
# | |
# | The following macros specify compilers, linker/loaders, |
# | the archiver, and their options. You need to make sure |
# | these are correct for your system. |
# %---------------------------------------------------------%

# Compilers
CC++ = /usr/bin/g++
CC = /usr/bin/gcc
FC = /usr/bin/g77

AR = ar
ARFLAGS = cqls
RANLIB = ranlib
RANLIBFLAGS =

# Compiler Flags
#
# NOTES:
# C++ FLAGS TAKE need _UNIX or _WIN32 for preprocessor dircetives
# - the _WIN32 for the Windows95/98 or NT operating system.
# C FLAGS used -DUSE_VENDOR_BLAS (needed in SuperLU) if UNIX in C++ FLAGS
#

C++FLAGS = -Wall -funroll-loops -fcse-follow-jumps \
-fthread-jumps -fcse-skip-blocks -frerun-cse-after-loop \
-felide-constructors \
-fcaller-saves -ffloat-store -fforce-addr \
-fschedule-insns -fschedule-insns2 -D_LINUX -D_UNIX \
-fexpensive-optimizations \
-fforce-addr -fforce-mem -finline-functions \
-fkeep-inline-functions \
-fno-function-cse -fno-inline -fno-peephole \
-fomit-frame-pointer \
-fschedule-insns -fschedule-insns2 \
-fstrength-reduce -fthread-jumps

# modified as optimizaton currently causing problems with Steel01 code
#C++FLAGS = -Wall -O2 -D_UNIX -ftemplate-depth-30 -D_LINUX
CFLAGS = -Wall -O2
FFLAGS = -Wall -O

# Linker
LINKER = $(CC++)
LINKFLAGS =

# Misc
MAKE = make
CD = cd
ECHO = echo
RM = rm
RMFLAGS = -f
SHELL = /bin/sh

# %---------------------------------------------------------%
# | SECTION 5: COMPILATION |
# | |
# | The following macros specify the macros used in |
# | to compile the source code into object code. |
# %---------------------------------------------------------%

.SUFFIXES:
.SUFFIXES: .C .c .f .f90 .cpp .o .cpp

#
# %------------------%
# | Default command. |
# %------------------%
#
.DEFAULT:
@$(ECHO) "Unknown target $@, try: make help"
#
# %-------------------------------------------%
# | Command to build .o files from .f files. |
# %-------------------------------------------%
#

.cpp.o:
@$(ECHO) Making $@ from $<
$(CC++) $(C++FLAGS) $(INCLUDES) -c $< -o $@

.C.o:
@$(ECHO) Making $@ from $<
$(CC++) $(C++FLAGS) $(INCLUDES) -c $< -o $@
.c.o:
@$(ECHO) Making $@ from $<
$(CC) $(CFLAGS) -c $< -o $@
.f.o:
@$(ECHO) Making $@ from $<
$(FC) $(FFLAGS) -c $< -o $@

# %---------------------------------------------------------%
# | SECTION 6: OTHER LIBRARIES |
# | |
# | The following macros specify other libraries that must |
# | be linked with when creating executables. These are |
# | platform specific and typically order does matter!! |
# %---------------------------------------------------------%
MACHINE_LINKLIBS = -L$(BASE)/lib \
-L$(HOME)/lib

MACHINE_NUMERICAL_LIBS = -lm \
$(ARPACK_LIBRARY) \
$(SUPERLU_LIBRARY) \
$(UMFPACK_LIBRARY) \
$(LAPACK_LIBRARY) $(BLAS_LIBRARY) $(CBLAS_LIBRARY) \
-lg2c -ldl

MACHINE_SPECIFIC_LIBS =


# %---------------------------------------------------------%
# | SECTION 7: INCLUDE FILES |
# | |
# | The following macros specify include files needed for |
# | compilation. |
# %---------------------------------------------------------%
MACHINE_INCLUDES = -I/usr/include \
-I$(BASE)/include \
-I/usr/include/cxx \
-I$(HOME)/include -I$(HOME)/blitz

# this file contains all the OpenSees/SRC includes
include $(FE)/Makefile.incl

TCL_INCLUDES = -I/usr/include -I/usr/lib/tcl8.4

INCLUDES = $(TCL_INCLUDES) $(FE_INCLUDES) $(MACHINE_INCLUDES)



I appreciate any suggestions to fix the problem, thanks.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

change the C++ flag settings:

Code: Select all

C++FLAGS = -Wall -D_LINUX -D_UNIX  -D_TCL84  -D_LINUX -D_HTTPS \
        $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(MUMPS_FLAG) \
        $(PROGRAMMING_FLAG) -O3 -ffloat-store
Post Reply