Comments (7)
@ccaprani I don't know what is the issue with your built, but I confirm that, at my local openseespy.so built, both getEleClassTags()
and getEleLoadClassTags()
work correctly. @mhscott wrote elsewhere that the new official openseespy module will come soon.
Anyway I'm polishing an update of ops_vis, which among others, add a new plotting function (which uses getEleLoadClassTags()
and getEleLoadData()
): plot_supports_and_loads_2d()
and the result would be:
And the output from the opensees functions are for example:
ele_load_tags_all_patterns: [1]
ele_load_types_all_patterns: [12]
ele_load_data_all_patterns: [-0.5, -1.0, 0.5, 1.0, 0.2, 0.8]
I still need to figure out the method to do the proper scaling of arrows for beams.
from openseespy.
@sewkokot I love the teaser - those images look great indeed! I look forward to adding and supporting your development more in future.
I suspect that opensees.so from the normal installation was still somehow cached (even though i restarted the kernel etc). Do you mind sharing how you build the OpenSeesPy package - do you just initiate the build_pip.py
script fully (which I didn't do)?
EDIT:
Found why the build with the new functions wasn't getting picked up: the Anaconda base environment was still active. Once switching to a new venv without openseespy
installed it picks up the 'correct' module.
Unfortunately it seems the build wasn't successful with a strange import error:
ImportError: ../openseespylinux/opensees.so: undefined symbol: _ZN11LognormalRVC1EiRK6Vector
which using c++filt
is from LognormalRV::LognormalRV(int, Vector const&)
: presumably this is a linker issue, but the make succeeded with no linker errors or warnings.
from openseespy.
@ccaprani, I wish I had more time to work on the ops_vis library :)
Under Debian Sid linux, I use the following Makefile to build opensees.so module, which works and I don't get this _ZN11LognormalRVC1EiRK6Vector
error with the latest OpenSees sources. I use only Debian python packages (no Anaconda), so I have no idea how to help more.
my Makefile.def
OPS_PYLIB_DIR = $(HOME)/opensees_pylib
CP = cp
MV = mv
INTERPRETER_LANGUAGE = PYTHON
OPT_FLAG = -O3 -march=native
PROGRAMMING_MODE = SEQUENTIAL
#PROGRAMMING_MODE = PARALLEL
#PROGRAMMING_MODE = PARALLEL_INTERPRETERS
ifeq ($(PROGRAMMING_MODE), PARALLEL)
OpenSees_PROGRAM = $(HOME)/bin/OpenSeesSP
endif
ifeq ($(PROGRAMMING_MODE), PARALLEL_INTERPRETERS)
OpenSees_PROGRAM = $(HOME)/bin/OpenSeesMP
endif
# reliability configuration
RELIABILITY = YES_RELIABILITY
RELIABILITY_FLAG = -D_RELIABILITY
RELIABILITY_LIBRARY = $(HOME)/lib/libReliability.a
OPTIMIZATION_LIBRARY = $(HOME)/lib/libOptimization.a
OPERATING_SYSTEM = LINUX
GRAPHICS = NONE
GRAPHIC_FLAG = -D_NOGRAPHICS
DEBUG_MODE = YES_DEBUG
TRIANGLE_LIBRARY = $(HOME)/lib/libTriangle.a
TETGEN_LIBRARY = $(HOME)/lib/libTetgen.a
# %---------------------------------%
# | 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
FE = $(HOME)/git/OpenSees/SRC
TRIANGLEdir = $(HOME)/git/OpenSees/OTHER/Triangle
TETGENdir = $(HOME)/git/OpenSees/OTHER/tetgen1.4.3
AMDdir = $(HOME)/git/OpenSees/OTHER/AMD
BLASdir = $(HOME)/git/OpenSees/OTHER/BLAS
CBLASdir = $(HOME)/git/OpenSees/OTHER/CBLAS
LAPACKdir = $(HOME)/git/OpenSees/OTHER/LAPACK
SUPERLUdir = $(HOME)/git/OpenSees/OTHER/SuperLU_5.1.1/SRC
ARPACKdir = $(HOME)/git/OpenSees/OTHER/ARPACK
UMFPACKdir = $(HOME)/git/OpenSees/OTHER/UMFPACK
METISdir = $(HOME)/git/OpenSees/OTHER/METIS
CSPARSEdir = $(HOME)/git/OpenSees/OTHER/CSPARSE
SRCdir = $(HOME)/git/OpenSees/SRC
DIRS = $(SUPERLUdir) \
$(SUPERLU_DISTdir) \
$(ARPACKdir) \
$(CBLASdir) \
$(UMFPACKdir) \
$(AMDdir) \
$(METISdir) \
$(CSPARSEdir) \
$(TRIANGLEdir) \
$(TETGENdir) \
$(SRCdir)
ifeq ($(PROGRAMMING_MODE), SEQUENTIAL)
DIRS = $(BLASdir) \
$(CBLASdir) \
$(LAPACKdir) \
$(AMDdir) \
$(CSPARSEdir) \
$(SUPERLUdir) \
$(ARPACKdir) \
$(UMFPACKdir) \
$(SRCdir) \
$(METISdir) \
$(TRIANGLEdir) \
$(TETGENdir)
endif
# %-------------------------------------------------------%
# | 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
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
AMD_LIBRARY = $(HOME)/lib/libAMD.a
UMFPACK_LIBRARY = $(HOME)/lib/libUmfpack.a
METIS_LIBRARY = $(HOME)/lib/libMetis.a
TCL_LIBRARY = -ltcl8.6
BLITZ_LIBRARY = $(HOME)/blitz/lib/libblitz.a
GRAPHIC_LIBRARY =
CSPARSE_LIBRARY = $(HOME)/lib/libCSparse.a
# WATCH OUT .. These libraries are removed when 'make wipe' is invoked.
WIPE_LIBS = $(FE_LIBRARY) \
$(LAPACK_LIBRARY) \
$(BLAS_LIBRARY) \
$(CBLAS_LIBRARY) \
$(SUPERLU_LIBRARY) \
$(CSPARSE_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++-4.7
# CC = /usr/bin/gcc-4.7
# FC = /usr/bin/gfortran-4.7
CC++ = /usr/bin/g++
CC = /usr/bin/gcc
FC = /usr/bin/gfortran
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
#
# modified as optimizaton currently causing problems with Steeln01 code
C++FLAGS = -Wall -D_LINUX -D_UNIX -D_TCL85 \
$(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) \
$(PROGRAMMING_FLAG) $(OPT_FLAG) -fbuiltin -ffloat-store -fPIC
CFLAGS = ${C++FLAGS}
FFLAGS = -Wall $(OPT_FLAG) -fPIC -fallow-argument-mismatch
# Linker
LINKER = $(CC++)
LINKFLAGS = -rdynamic -Wl,-v
# 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 = $(OPTIMIZATION_LIBRARY) \
$(RELIABILITY_LIBRARY) -lm \
$(ARPACK_LIBRARY) \
$(SUPERLU_LIBRARY) \
$(UMFPACK_LIBRARY) \
$(CSPARSE_LIBRARY) \
$(LAPACK_LIBRARY) $(BLAS_LIBRARY) $(CBLAS_LIBRARY) \
$(AMD_LIBRARY) $(GRAPHIC_LIBRARY)\
$(TRIANGLE_LIBRARY) $(TETGEN_LIBRARY) \
-ldl -lgfortran
MACHINE_SPECIFIC_LIBS =
# %---------------------------------------------------------%
# | SECTION 7: INCLUDE FILES |
# | |
# | The following macros specify include files needed for |
# | compilation. |
# %---------------------------------------------------------%
MACHINE_INCLUDES = -I/usr/include -I$(BASE)/include
# this file contains all the OpenSees/SRC includes
include $(FE)/Makefile.incl
TCL_INCLUDES = -I/usr/include/tcl8.6
PY_INCLUDES = -I/usr/include/python3.9
INCLUDES = $(PY_INCLUDES) $(TCL_INCLUDES) $(FE_INCLUDES) $(MACHINE_INCLUDES)
from openseespy.
@sewkokot Thanks so much for sharing this - it gave me a lot to try but I'm still getting this undefined symbol.
At this point I think there is a bug in the python interpreter make system, at least for the version of the toolchain I am running, so I'll take it over to the OpenSees repo where there is an older issue on this I just found OpenSees/OpenSees#203.
In any case, it might help solving it if you could let me know the following:
What version is your ld --version
? (mine is 2.36.1)
Would you kindly also let me know what dependencies your compilation has by running:
ldd ~/path/to/OpenSees/SRC/interpreter/opensees.so
And would you mind letting me know if the same symbol appears in your library by checking:
readelf -Ws ~/path/to/OpenSees/SRC/interpreter/opensees.so | grep _ZN11LognormalRVC1EiRK6Vector
You use linker flag -rdynamic
but it seems this is only relevant for executables? It doesn't seem to matter though.
Thanks!
from openseespy.
@ccaprani Below are the data you requested :) Indeed it could the Ubuntu toolchain because on Debian Unstable I don't have any issues.
ldd ./opensees_pylib/opensees.so
linux-vdso.so.1 (0x00007ffdcbdf5000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2950469000)
libgfortran.so.5 => /usr/lib/x86_64-linux-gnu/libgfortran.so.5 (0x00007f29501bf000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f294ffb3000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f294fe6e000)
libmvec.so.1 => /lib/x86_64-linux-gnu/libmvec.so.1 (0x00007f294fe42000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f294fe28000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f294fc61000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2952563000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f294fc18000)
ld --version
GNU ld (GNU Binutils for Debian) 2.37
readelf -Ws ./opensees_pylib/opensees.so | grep _ZN11LognormalRVC1EiRK6Vector
28849: 0000000001207240 254 FUNC GLOBAL DEFAULT 12 _ZN11LognormalRVC1EiRK6Vector
19076: 0000000001207240 254 FUNC GLOBAL DEFAULT 12 _ZN11LognormalRVC1EiRK6Vector
Thanks for the remark on -rdynamic
. It a remainder when I was converting tcl Makefile (executable) to python, at least it doesn't harm ;)
from openseespy.
Thanks so much @sewkokot ; our toolchains are very similar:
ldd ./OpenSees/SRC/interpreter/opensees.so
linux-vdso.so.1 (0x00007ffd3c5b4000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fd59653b000)
libgfortran.so.5 => /lib/x86_64-linux-gnu/libgfortran.so.5 (0x00007fd59627f000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fd596066000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd595f18000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd595efd000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd595d0f000)
/lib64/ld-linux-x86-64.so.2 (0x00007fd598bca000)
libquadmath.so.0 => /lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007fd595cc5000)
Interesting that mine isn't using libmvec.so.1
- I'll dig further.
ld --version
GNU ld (GNU Binutils) 2.35.1
readelf -Ws ./OpenSees/SRC/interpreter/opensees.so | grep _ZN11LognormalRVC1EiRK6Vector
4: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _ZN11LognormalRVC1EiRK6Vector
14820: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _ZN11LognormalRVC1EiRK6Vector
Thanks again!
from openseespy.
I still need to figure out the method to do the proper scaling of arrows for beams.
@sewkokot you might get some ideas from anastruct?
from openseespy.
Related Issues (20)
- failed to import opensses py on Windows, using Pyzo HOT 2
- EnvelopeElement recorder cannot omit to record time HOT 1
- RuntimeError: Python version 3.8 is needed for Windows HOT 1
- OpenSeespy-3.4.0.8 not supported Python 3.11.3 and Anaconda3-2023.03-1-Windows-x86_64
- OpenSeesPy Reliability Analysis and Parameter problem. HOT 10
- module 'openseespy.opensees' has no attribute 'getEleClassTags'
- Error on ARM architecture Macs while importing HOT 4
- Updated Opensees not compatible with old script HOT 11
- limitCurve('Axial') not available
- limitCurve('ThreePoint') HOT 6
- Linux: opensees.so: cannot open shared object file: No such file or directory HOT 3
- recorder PVD for element stress and strain HOT 4
- RuntimeError: Failed to import openseespy on Windows HOT 2
- The MPCO recorder can't work in OpenSeespy HOT 1
- Error importing compiled openseespy on Mac M2 HOT 4
- The same problem still exists in the Openseespymac version. Is it possible to solve the issue in macs? HOT 9
- libquadmath - missing dependency? HOT 2
- printModel command produces invalid json file when there's no elements in the model HOT 1
- openseespy.save command doesn't save uniaxial materials HOT 1
- Recorder command problem HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openseespy.