System call from fortran . . .

More
7 years 4 months ago #83 by DrTSPC
I used Netgen successfully in 2013, using system calls from fortran code.

I am trying to use it again. I installed the package on ubuntu 16.04 using the installers. I verified the install by using the GUI to mesh a few of the supplied geo files. (I have since since upgraded to ubuntu 17.04).

My old codes/scripts don't work for command line execution (system calls). I can get netgen to read files and create output files - at least .vol and .mesh (neutral) files. But no meshing occurs.

For example, one of the commands I tried is (with out.vol being a .vol file generated by netgen):
netgen -batchmode -inputmeshfile=out.vol -meshfile=new_out.mesh -meshfiletype="Neutral Format"

No luck.

This (no meshing) also occurs when trying use the GUI to mesh the .vol file. Nothing happens. The input object appears, but attempts to mesh (by pressing Generate Mesh) doesn't do anything.

Any pointers?

Side note: I got a note saying that I should make sure ng.tcl is in NETGENDIR: Should that be ngsolve.tcl? I don't have a ng.tcl on my system.

Thanks in advance,
Tim
More
7 years 4 months ago #84 by joachim
exporting mesh files from command line is working again, it will be available in the nightly build and source tree.

thanks for the report.

best, Joachim
More
7 years 3 months ago - 7 years 3 months ago #86 by DrTSPC
Thank you for the quick response.

Unfortunately, I used the "Installer" approach described on "ngsolve.org" to install ngsolve, and the "hint" about how to get to nightly builds didn't lead me anywhere.

Fortunately, I noticed (in a sidebar on SourceForge) that Matthias Hochsteger (?) posted a "how-to" wrt getting nightly builds.

I followed his instructions in an attempt to get the nightly build: The version I am using is 6.2.1707, and I don't know if that is a nightly build.

In any case; the command:
netgen -batchmode /usr/share/netgen/cube.geo -meshfile=cube.mesh -meshfiletype="Neutral Format"

results in a meshed cube. Though when I try to import cube.mesh into netgen (gui), it crashes.

The command:
netgen -batchmode /usr/share/netgen/cube.geo -meshfile=cube.vol

results in a file that can be read into netgen (gui). (Though it has a couple of suspicious-looking entries - huge negative integers.)

The command:
netgen -batchmode -inputmeshfile=example.mesh -meshfile=output.vol

passes through the info, but no meshing occurs.

The command:
netgen -batchmode -inputmeshfile=example.mesh -meshfile=output.mesh -meshfiletype="Neutral Format"

crashes as it reports:
NETGEN-6.2-dev
Developed by Joachim Schoeberl at
2010-xxxx Vienna University of Technology
2006-2010 RWTH Aachen University
1996-2006 Johannes Kepler University Linz
Including OpenCascade geometry kernel
optfile ./ng.opt does not exist - using default values
togl-version : 2
no OpenGL
OCC module loaded
import mesh from example.mesh
Read User File
Reading Neutral Format
8 Points, 0 Elements.
Export mesh to file output.mesh.... Please Wait!
Segmentation fault (core dumped)

Note that example.mesh is:
8
0.0 0.0 0.0
1.0 0.0 0.0
1.0 1.0 0.0
0.0 1.0 0.0
0.0 0.0 1.0
1.0 0.0 1.0
1.0 1.0 1.0
0.0 1.0 1.0
0
12
1 1 2 5
1 5 2 6
1 2 3 6
1 6 3 7
1 3 4 7
1 7 4 8
1 4 1 8
1 8 1 5
1 5 6 8
1 6 7 8
1 1 4 3
1 3 2 1

So, I am still not able to have netgen read a .mesh or .vol file and mesh it.

Thank you for any further guidance:
Tim
Last edit: 7 years 3 months ago by DrTSPC.
More
7 years 3 months ago #87 by ddrake
I wonder if something could have recently broken with the upstream process for the source tree. The last commit shown at the sourceforge git repository is from 7/18. That seems unusual...
More
7 years 3 months ago #88 by DrTSPC
ddrake:

Sorry, I don't know what you mean . . . BUT:

I did notice that I omitted an (perhaps) important item in my last post:

After I determined that the info on ngsolver.org wrt getting nightly builds (after using a downloaded installer) wasn't going to help, I decided to install from source. On two ubuntu 17.04 vms.

So, I removed ('sudo apt-get purge ngsolve' and 'sudo apt-get purge netgen').
I followed the relevant guidelines on ngsolve.org, and both installs got far enough to create netgen, but blew up (in different ways) before creating ngsolve. As I really want to see if netgen will work for me, that is good.

I posted my experiences wrt the above installs on sourceforge.net:
/sourceforge.net/p/netgen-mesher/discussion/905307/thread/05581c49/?limit=25#6e5b

If you would like, I will try copy/paste that here as well. (I don't really know the protocols.)

One question I have: How would I know if I am getting a nightly build (as described by Matthias Hoctsteger on sourceforge.net)? I have never used nightly builds of a code, but it may be needed to get netgen working for me.

Thank you,
Tim
More
7 years 3 months ago #89 by ddrake
I have been building from source fairly often on my Linux Mint 18.1 (essentially Ubuntu 16.04) machine. The installation procedure here has been working very well for me. This procedure pulls the latest source code from the git repository at Sourceforge . I haven't tried installing the nightly builds, but I think the Ubuntu installation instructions here should work. It mentions:

Every time you upgrade your packages using sudo apt-get upgrade, NGSolve will be upgraded too.
You can also install the nightly build by installing the package ngsolve_nightly.

I believe the main code repository is a private GitLab site which is accessible only to the core developers. Normally, when a developer makes a commit to the master branch of the primary repository, it appears at the Sourceforge site within a few hours (that's what I meant by the upstream process).

But no new commits have appeared at the Sourceforge site in the past 11 days. In my experience, that is an unusually long time, since the application is actively being developed. I'm not sure whether the delay in pushing commits to Sourceforge is intentional on the part of the core team or if perhaps some automated process has broken, preventing that synchronization. I'm not sure if the nightly builds are based on the code at Sourceforge or at the primary repository.

I think it may be possible that the fix for exporting from the command line mentioned by joachim (Dr. Schoeberl) may not have made it to the Sourceforge repository, hence why it is still not working for you.

Best,
Dow Drake
Time to create page: 0.108 seconds