Welcome, Guest
Username: Password: Remember me

TOPIC: invalid memory reference / Fortran runtime error

invalid memory reference / Fortran runtime error 8 years 2 months ago #23610

  • sbecuwe
  • sbecuwe's Avatar
Hello,

We're using v6p3r2 (gcc/gfortran 4.9.2, OpenMPI 1.8.4, ...) and encountered a problem when using SISYPHE.

Running TELEMAC in debug version (including -fcheck=all) shows (see attached file debug-log.txt)
At line 130 of file /usr/local/sl6/TELEMAC/v6p3r2-foss-2015a/sources/utils/partel/partitioner.F
Fortran runtime error: Pointer actual argument 'nulltable' is not associated

Without debug mode (see attached file nodebug-log.txt), the computation starts but crashes
   |Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
   |
   |Backtrace for this error:
   |#0  0x2B76A90BF357
   |#1  0x2B76A90BF96E
   |#2  0x2B76AA69969F
   |#3  0x5BB57C in __streamline_MOD_scaract
   |#4  0x5DEBA7 in charac_
   |#5  0x561BD9 in suspension_computation_
   |#6  0x548776 in suspension_main_
   |#7  0x53752F in sisyphe_
   |#8  0x422214 in telemac2d_
   |#9  0x4036CB in MAIN__ at homere_telemac2d.f:0

Does there exist a fix for this in v6p3r2? Because of KNOLG and KNOGL variables in our additional Fortran files, although not being used for this specific example, we're still using that version.

Thanks in advance!

Regards,
Stefan
Attachments:
The administrator has disabled public write access.

invalid memory reference / Fortran runtime error 8 years 2 months ago #23640

  • jmhervouet
  • jmhervouet's Avatar
Hello,

This is a well known problem of Metis, that I have with Intel compiler. The work around I use is to compile all the system with the debug and checkall options, then recompile only the library partel without checkall (I do this in Perl with two commands in the sources, after modifying the file systel.ini and the command cfgmak : "maktel menage", and then "maktel all install", it is certainly possible also in Python).


The crash in the module Streamline is something else, possibly a bug now corrected, since nobody reported this in recent versions.

With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

invalid memory reference / Fortran runtime error 8 years 2 months ago #23666

  • sbecuwe
  • sbecuwe's Avatar
Hello,

I just tried using following setup: TELEMAC v7p1r1, GCC/gfortran 5.4.0, OpenMPI/1.10.3
I get (apart from the addresses) exactly the same backtrace, so is there something wrong with streamline, which only pops up in particular cases? Any ideas? Thanks!

Regards,
Stefan
The administrator has disabled public write access.

invalid memory reference / Fortran runtime error 8 years 2 months ago #23667

  • sbecuwe
  • sbecuwe's Avatar
Update (running the debug version)

|At line 749 of file /opt/TELEMAC/v7p1r1-foss-2016b/sources/utils/bief/streamline.f
|Fortran runtime error: Index '1051' of dimension 1 of array 'heapchar' above upper bound of 1050
The administrator has disabled public write access.

invalid memory reference / Fortran runtime error 8 years 2 months ago #23719

  • jmhervouet
  • jmhervouet's Avatar
Hello,

I can try to reproduce the problem but I cannot download the case, it says:

You don't have permission to access /media/kunena/attachments/8640/example.tgz on this server.

I tried on 2 different machines and always get this. Maybe you post it again or put it at a different adress.

With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

invalid memory reference / Fortran runtime error 8 years 2 months ago #23728

  • sbecuwe
  • sbecuwe's Avatar
Let's try again!
Attachments:
The administrator has disabled public write access.

invalid memory reference / Fortran runtime error 8 years 2 months ago #23733

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Thank you but... definitely not... I'll see if I can get it from my colleagues and will report.

With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

invalid memory reference / Fortran runtime error 8 years 2 months ago #23740

  • jmhervouet
  • jmhervouet's Avatar
Hello,

I now looked at your case. What happens in streamline is that we cannot predict the number of characteristics going to a sub-domain, we just try to overestimate it, and in your case this estimation is too low. In the next version 7.2. I have added an error message and possible solutions when this happens. Anyway forget streamline, this is not your main problem and I do not recommend to use the method of characteristics for advection of suspended sediment.

In fact I had to clip the depth in your subroutine dragfo.f, otherwise there is immediately a division by zero, due to dry zones.

Then I would suggest at least the following changes :

On Telemac-2D side, add:

MASS-LUMPING ON H : 1.
TIDAL FLATS : YES
OPTION FOR THE TREATMENT OF TIDAL FLATS : 1
TREATMENT OF NEGATIVE DEPTHS : 2
TYPE OF ADVECTION : 14;5
SUPG OPTION : 0;0
CONTINUITY CORRECTION : YES

in the steering file. This is to enable a correct use of the NERD advection scheme in Sisyphe, by just adding in its steering file:

TYPE OF ADVECTION : 14

Your case will go to the end. However I find in the listing large C.F.L. numbers for the suspended sediment, maybe reducing the time step would be a good thing.

With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

invalid memory reference / Fortran runtime error 8 years 2 months ago #23755

  • o.gourgue
  • o.gourgue's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 155
  • Thank you received: 11
Hi Jean-Michel, thank you for your response. I'm taking over since this seems to be related to the application. Stefan is responsible for the HPC infrastructure of our university.

Your suggestions seem to have solved the problem, even though I'm still doing further tests to understand.

What I am still surprised is that the problem does not arise with the original setup and 2 or 4 cores. Only when doing the simulation on 20 cores. If I understand your answer correctly, it's related to the streamline functionality that is not really suited for our application, am I right?

You're right for the clipping of the water depth in dragfo. How small can be the threshold in your opinion?

Regarding the CFL condition, how do you express it for transport of sediments? Is it also Co = v dt / dx < 1?
The administrator has disabled public write access.

invalid memory reference / Fortran runtime error 8 years 2 months ago #23771

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Yes it is normal statistically that there are more problems with more cores, the problem arises when a sub-domain receives more characteristics pathlines than the maximum number of points in a sub-domain. With a well decomposed mesh this is about the number of points in every sub-domain. The mesh may be built with a refined zone (your case) where all characteristics go in another domain, and we are already at the limit. The only secure implementation would consist in allocating arrays with the size of the initial mesh, which would ruin the advantage of parallelism. Anyway such situations always mean that the CFL number is very large and it is not recommended.

Yes for sediment the CFL number is also Co = v dt / dx. It seems that there is a high value somewhere in your mesh, maybe on the refined zone.

For clipping the depth in dragfo, you can use 1.D-3, or a limit corresponding to the grain size of the sediment.

With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.
Moderators: Pablo, pavans

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.