Comments (14)
with the source code the same issue happens at the end of the installation phase:
-- Installing: /blahblah/netgen/lib/python3.7/site-packages/netgen/read_gmsh.py
terminate called after throwing an instance of 'std::invalid_argument'
what(): stoi
CMake Error at python/cmake_install.cmake:59 (file):
...
I can also confirm that this happens with gcc 8.3.0
and gcc 7.4.0
, thus unlikely to be related to the compiler version.
from netgen.
hi @davydden 我遇到相同的问题,问题出现在 cmake/generate_version_file.cmake,他期望的输入是这样的格式
v6.2.2004-25-gefbd71c8 但是我的git describe --tag --long 返回的 v6.2-dev-xx-xxx,
问题出现在
string(REGEX REPLACE "^v([0-9]+)\.." "\1" NETGEN_VERSION_MAJOR "${git_version_string}")
string(REGEX REPLACE "^v[0-9]+\.([0-9]+)." "\1" NETGEN_VERSION_MINOR "${git_version_string}")
string(REGEX REPLACE "^v[0-9]+\.[0-9]+\.([0-9]+)." "\1" NETGEN_VERSION_PATCH "${git_version_string}")
string(REGEX REPLACE "^v[0-9]+\.[0-9]+\.[0-9]+\-([0-9]+)." "\1" NETGEN_VERSION_TWEAK "${git_version_string}")
string(REGEX REPLACE "^v[0-9]+\.[0-9]+\.[0-9]+\-[0-9]+\-([0-9a-z]+).*" "\1" NETGEN_VERSION_HASH "${git_version_string}")
正则匹配执行 仅仅匹配
v6.2.2004-25-gefbd71c8
但是不能
v6.2-dev-xx-xxx
也需可以这样解决问题
set(git_version_string "v6.2.2007-25-gefbd71c8")
from netgen.
thanks fanyi.baidu.com
I have the same problem with cmake / generate_ version_ file.cmake He expects the input to be in this format
V6.2.2004-25-gefbd71c8, but my git describe -- tag -- long returns v6.2-dev-xx-xxx,
The problem is
string(REGEX REPLACE "^v([0-9]+).." "\1" NETGEN_ VERSION_ MAJOR "${git_ version_ string}")
string(REGEX REPLACE "^v[0-9]+.([0-9]+)." "\1" NETGEN_ VERSION_ MINOR "${git_ version_ string}")
string(REGEX REPLACE "^v[0-9]+.[0-9]+.([0-9]+)." "\1" NETGEN_ VERSION_ PATCH "${git_ version_ string}")
string(REGEX REPLACE "^v[0-9]+.[0-9]+.[0-9]+-([0-9]+)." "\1" NETGEN_ VERSION_ TWEAK "${git_ version_ string}")
string(REGEX REPLACE "^v[0-9]+.[0-9]+.[0-9]+-[0-9]+-([0-9a-z]+).*" "\1" NETGEN_ VERSION_ HASH "${git_ version_ string}")
Regular matching performs only matching
v6.2.2004-25-gefbd71c8
But it can't
v6.2-dev-xx-xxx
It also needs to be able to solve the problem in this way
set(git_ version_ string "v6.2.2007-25-gefbd71c8")
from netgen.
You may also need to remove your_build_dir/netgen/netgen_version.hpp then rebuild!
from netgen.
Hi both,
How did you obtain the source code? Please post the output of
git remote -v
and
git tag
Best,
Matthias
from netgen.
hi @mhochsteger 这是我的输出
dbn@debian:~/Desktop/FET/netgen-mesher-git$ git remote -v
origin https://git.code.sf.net/p/netgen-mesher/git (fetch)
origin https://git.code.sf.net/p/netgen-mesher/git (push)
dbn@debian:~/Desktop/FET/netgen-mesher-git$ git tag
v6.2-dev
from netgen.
Hi @mhochsteger ,
I check out tag 6.2.2007
(commit 6eaeccc
) from github https://github.com/NGSolve/ngsolve.git .
from netgen.
@iwetuan
Ah, I see that tags were not pushed to sourceforge. That's fixed now, a 'git pull' followed by a rebuild should solve your issue.
@davydden
Your issue is different, since your netgen source are fetched from github.
Did you run 'git submodule update --recursive' after checking out 6.2.2007 in NGSolve?
What's your output of
git remote -v
git tag
git show
in your_ngsolve_source/external_dependencies/netgen ?
from netgen.
@mhochsteger thanks! it works.
from netgen.
@mhochsteger Apologies, I confused the repos, I actually checkout it from the netgen https://github.com/NGSolve/netgen . But still, the same tag. Importantly, the issue is not there for 6.2.2006
, as I mentioned in the OP.
from netgen.
@mhochsteger 6.2.2008 does show this issue anymore.
from netgen.
@mhochsteger @JSchoeberl interestingly enough, this is NOT an netgen issue, but NGSolve. When I install the 6.2.2008 stack and set environment for netgen
only, then netgen --version
is ok:
netgen --version
NETGEN-6.2.2008
Developed by Joachim Schoeberl at
2010-xxxx Vienna University of Technology
2006-2010 RWTH Aachen University
1996-2006 Johannes Kepler University Linz
Including MPI version 3.1
Problem in Tk_Init:
result = no display name and no $DISPLAY environment variable
optfile ./ng.opt does not exist - using default values
togl-version : 2
no OpenGL
When I set environment for ngsolve 6.2.2008
(and netgen), then everything works as expected as well:
netgen --version
NETGEN-6.2.2008
Developed by Joachim Schoeberl at
2010-xxxx Vienna University of Technology
2006-2010 RWTH Aachen University
1996-2006 Johannes Kepler University Linz
Including MPI version 3.1
Problem in Tk_Init:
result = no display name and no $DISPLAY environment variable
optfile ./ng.opt does not exist - using default values
togl-version : 2
no OpenGL
loading ngsolve library
NGSolve-6.2.2008
Using Lapack
Including sparse direct solver UMFPACK
Running parallel using 64 thread(s)
Finally when I set environment to the ngsolve
6.2.2008` patched with NGSolve/ngsolve@3f0092a , then we get an error:
netgen --version
NETGEN-6.2.2008
Developed by Joachim Schoeberl at
2010-xxxx Vienna University of Technology
2006-2010 RWTH Aachen University
1996-2006 Johannes Kepler University Linz
Including MPI version 3.1
Problem in Tk_Init:
result = no display name and no $DISPLAY environment variable
optfile ./ng.opt does not exist - using default values
togl-version : 2
no OpenGL
loading ngsolve library
terminate called after throwing an instance of 'std::invalid_argument'
what(): stoi
By diffing build logs I noticed the following difference:
NGSolve 6.2.2008: Automatic configuration OK.
vs
NGSolve ........-..-..: Automatic configuration OK.
Which brings me to the conclusion that at some point you are trying to output a version from an empty string. A catch of std::invalid_argument
is missing somewhere. Would you be so kind to have a closer look. It must be a one-liner fix.
from netgen.
@mhochsteger @JSchoeberl I looked closer into generate_version_file
to see that ngsolve
relies on the presence of .git
to determine the version if it's not build from a tag. I have been using a package manager to check-out the sources with a shallow copy --depth 1
and thus .git
was absent. As soon as I let the .git
be around, the version is picked-up as intended. Thus it's not a ngsolve
issue.
I would still suggest to either catch std::invalid_argument
or throw an error at the cmake
stage if the version was not picked up correctly for some reason.
from netgen.
@davydden ,Hello,this bug has never been fixed,and I have to add this line to netgen/cmake/generate_version_file.cmake always
set(NETGEN_VERSION 6.2.0-6.2.0.0-6.2.0.0)
set(NETGEN_VERSION_LONG 6.2.0-6.2.0.0-6.2.0.0})
set(NETGEN_VERSION_GIT 6.2.0-6.2.0.0-6.2.0.0)
set(NETGEN_VERSION_TWEAK 6.2.0.0)
By deleting the 'v' charactor from 6.2.0-v6.2.0.0-v6.2.0.0
from netgen.
Related Issues (20)
- Icon for Unix systems HOT 1
- 2D geometry meshing fails for difficult geometries
- Multiple periodic constraints cause meshing failed HOT 2
- Support scoped CGNS enum stuff
- Support static builds on windows.
- 3d mesh : restrict H on volumes & surface ?
- Fine volume mesh makes NetGen.exe closing
- `FindPythonInterp` and `FindPythonLibs` were deprecated since CMake 3.12, use `FindPython` instead
- Parallelize edge/face mesh generation?
- libnggui.so: undefined reference to ffmpeg functions HOT 1
- How to use writeuser class ?
- Memory Leak in netgen.csg Module
- Meshing job never reports finishing
- error: cannot convert 'const ngcore::SIMD<double, 1>' to 'double' in initialization
- load binary stl format error
- inconsistent nggui/netgen_gui (USE_GUI) configuration triggers tcl.h error
- some test_geo tests fail on non-Intel architectures HOT 1
- table.hpp:106 error: redefinition of ‘size_t* TablePrefixSum on 32-bit architectures HOT 4
- some 32 bit systems (armel, m68k, powerpc, sh4) don't link to atomic symbols HOT 3
- compatibility with OCCT 7.8.0 HOT 5
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 netgen.