gnikit / gmsh-fpm Goto Github PK
View Code? Open in Web Editor NEWGmsh API using the Fortran Package Manager (fpm)
Home Page: https://gmsh.info/
License: Other
Gmsh API using the Fortran Package Manager (fpm)
Home Page: https://gmsh.info/
License: Other
Write a python script to parse and update the fpm.toml version from the remote of gitlab. Return exit code if current version is not the same as remote and add action to trigger and issue a release.
I suggest adding topics such as mesh
, mesh-generation
, gmsh
, fortran-package-manager
to the About section. I added the project to my list.
Since Gmsh itself does not validate the Fortran API we should take care of this ourselves.
We should ensure that the examples compile and run with runtime checks enabled.
This is my initial attempt at using gmsh-fpm
.
I downloaded the gmsh SDK, and separately cloned the gmsh-fpm
source code.
I then compile by running the following from within the gmsh-fpm directory:
export GMSH_SDK_LIB=/home/gareth/LocalInstalls/gmesh/gmesh_sdk/gmsh-git-Linux64-sdk/lib
export LD_LIBRARY_PATH=$GMSH_SDK_LIB:$LD_LIBRARY_PATH
fpm build --link-flag "-L$GMSH_SDK_LIB"
where $GMSH_SDK_LIB
is the location of the SDK files.
gareth@gareth-P410:~/Code_Experiments/fortran/gmsh-fpm/gmsh-fpm$ ls $GMSH_SDK_LIB
gmsh-4.11.0.dev1.dist-info gmsh.jl gmsh.py libgmsh.so libgmsh.so.4.11 libgmsh.so.4.11.0
These steps seem to work fine (output below).
+ mkdir -p build/dependencies
gmsh.f90 done.
libgmsh.a done.
t13.f90 done.
t15.f90 done.
t10.f90 done.
t9.f90 done.
t12.f90 done.
t18.f90 done.
t1.f90 done.
t16.f90 done.
t2.f90 done.
t5.f90 done.
t17.f90 done.
t20.f90 done.
t11.f90 done.
t8.f90 done.
t6.f90 done.
t7.f90 done.
t19.f90 done.
t14.f90 done.
t21.f90 done.
t4.f90 done.
t3.f90 done.
main.f90 done.
t13 done.
t15 done.
t10 done.
t9 done.
t12 done.
t18 done.
t1 done.
t16 done.
t2 done.
t5 done.
t17 done.
t20 done.
t11 done.
t8 done.
t6 done.
t7 done.
t19 done.
t14 done.
t21 done.
t4 done.
t3 done.
gmsh done.
[100%] Project compiled successfully.
But then it fails when I try to run an example:
fpm run --example t13 --runner cp -- example/fortran/ && pushd example/fortran/ && ./t13 && rm t13 && popd
with output:
t13 failed.
[ 4%] Compiling...
/usr/bin/ld: cannot find -lgmsh
collect2: error: ld returned 1 exit status
<ERROR> Compilation failed for object " t13 "
<ERROR>stopping due to failed compilation
STOP 1
I also tried a workaround by adding --link_flag
to the command.
fpm run --link-flag "-L$GMSH_SDK_LIB" --example t13 --runner cp -- example/fortran/ && pushd example/fortran/ && ./t13 && rm t13 && popd
This also failed, but in a different way.
Project is up to date
~/Code_Experiments/fortran/gmsh-fpm/gmsh-fpm/example/fortran ~/Code_Experiments/fortran/gmsh-fpm/gmsh-fpm
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x7fc84d14617d in ???
#1 0x7fc84d14573d in ???
#2 0x7fc8499b108f in ???
#3 0x7fc849af974f in ???
#4 0x55ac20d233ff in istring_
at ./src/gmsh.f90:14895
#5 0x55ac20d223c7 in ivectorstring_
at ./src/gmsh.f90:14924
#6 0x55ac20d7fc0e in __gmsh_MOD_gmshinitialize
at ./src/gmsh.f90:898
#7 0x55ac20d17bbd in t13
at example/fortran/t13.f90:20
#8 0x55ac20d18580 in main
at example/fortran/t13.f90:12
Segmentation fault (core dumped)
Any suggestions as to what I'm doing wrong? Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.