Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: invalid memory reference

invalid memory reference 10 years 1 day ago #14908

  • zqzuoan
  • zqzuoan's Avatar
hi everybody,
I modified my program,and it showed the error:Program received signal SIGSEGU: Segmentation fault - invalid memory reference. I do not know why,can anyone help me?
The administrator has disabled public write access.

invalid memory reference 10 years 1 day ago #14911

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
Could you post your program here ?
This is most of the time linked to an array you did not allocate or for which you are exceeding the boundaries.

Hope it helps.
There are 10 types of people in the world: those who understand binary, and those who don't.
The administrator has disabled public write access.

invalid memory reference 10 years 1 day ago #14913

  • zqzuoan
  • zqzuoan's Avatar
I want to give a source to every point in my mesh,but I do not know how to do it.Thank you for helping me.
Attachments:
The administrator has disabled public write access.

invalid memory reference 10 years 1 day ago #14919

  • jmhervouet
  • jmhervouet's Avatar
Hello,

If you still want to define as many point sources as points in the mesh, there is nothing to change in difsou.f, as this is already done, so your lines :

do N=1,NPOIN !2014-11-24
TSCEXP%ADR(ITRAC)%P%R(N)=TSCEXP%ADR(ITRAC)%P%R(N)+1 !2014-11-24
enddo !2014-11-24

should be removed, TSCEXP is built just after. However there should be no segmentation fault for this which looks correct in Fortran, except that 1 should be 1.D0. The problem would be rather how you managed to define as many point sources as points. For example there is in declarations_telemac2d a maximum of sources set to 100, called MAXTRA, that triggers the size of a number of arrays. So telemac-2d should be recompiled with a new maximum corresponding to your number of points. This could be a reason for a segmentation fault.

Regards,

JMH
The administrator has disabled public write access.

invalid memory reference 10 years 23 hours ago #14921

  • zqzuoan
  • zqzuoan's Avatar
The MAXTRA is MAXIMUM NUMBER OF TRACERS,and I have only one tracer,in addition,the MAXSCE is MAXIMUM NUMBER OF SOURCES, it's default is 100, and I have changed it to 100000.and compileTELEMAC again.You mean I should not modify in difsou.f ?
The administrator has disabled public write access.

invalid memory reference 10 years 15 hours ago #14923

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Yes, I mixed MAXTRA and MAXSCE. If they are correctly dimensioned the problem must be where you fill the arrays DSCE, XSCE, YSCE, etc., that are normally given as keywords. For example they must be filled when the subroutine proxim is called. In your case this subroutine must give back an array ISCE that has only for every point ISCE(I)=I. This is why this approach is heavy and it would have been better to try with rain.

Regards,

JMH
The administrator has disabled public write access.

invalid memory reference 10 years 15 hours ago #14925

  • zqzuoan
  • zqzuoan's Avatar
But if give it as rain,there are water as ource term in the continuity equation,but my tracer is a kind of pollutant,I just want to add source term in the tracer equation. Have I understood correctly?
The administrator has disabled public write access.

invalid memory reference 10 years 12 hours ago #14927

  • jmhervouet
  • jmhervouet's Avatar
Hello,

OK, so if you just want to add a source term in the tracer equation it is much simpler, and instead of changing TSCEXP it is the array TEXP that you have to change in difsou.f, then there is nothing to change in the sources, MAXSCE can stay at 100, etc.
TEXP is an explicit term added in the tracer equation.

Regards,

JMH
The administrator has disabled public write access.

invalid memory reference 10 years 12 hours ago #14928

  • zqzuoan
  • zqzuoan's Avatar
I have modified the program,but it showed the error:Program received signal SIGSEGU: Segmentation fault - invalid memory reference

Attached my program
Attachments:
The administrator has disabled public write access.

invalid memory reference 10 years 12 hours ago #14929

  • zqzuoan
  • zqzuoan's Avatar
First, I want to set the value of all the tracer source to 1.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: pham

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