Welcome, Guest
Username: Password: Remember me

TOPIC: Prescribing wave conditions comes with Segmentation fault

Prescribing wave conditions comes with Segmentation fault 1 month 2 weeks ago #45700

  • mourad
  • mourad's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 155
  • Thank you received: 6
I need to prescribe the wave condition (HM0, TP, DIR) at the open boundary nodes (LIFBOR = 5) using a modified LIMWAC (newmeanWAVE.f) subroutine and an ascii file containing the datat at a hourly timestep (boundaryWaves_meanPeakDirection.dat). This triplet is then replicated to the liquid nodes, and a call to SPEINI is made to compute the directional variance spectrum.

However, an inevitable "Segmentation fault - invalid memory reference" occurs...
Please see attached file (out).

Could anyone provide a tip on how to resolve this issue?

Kind regards,
Mourad
Attachments:
The administrator has disabled public write access.

Prescribing wave conditions comes with Segmentation fault 1 month 2 weeks ago #45701

  • tfouquet
  • tfouquet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 295
  • Thank you received: 115
Hello

It is difficult to see the error without running the full case
but I think you should add a save, so that you keep the value of your array from a call to another.

regards
The administrator has disabled public write access.
The following user(s) said Thank You: mourad

Prescribing wave conditions comes with Segmentation fault 1 month 2 weeks ago #45702

  • mourad
  • mourad's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 155
  • Thank you received: 6
Dear Mr. Fouquet
I am attaching the various files needed to run my TOMAWAC case.
Thank you in advance for your time and assistance.
Mourad
Attachments:
The administrator has disabled public write access.

Prescribing wave conditions comes with Segmentation fault 1 month 2 weeks ago #45703

  • mourad
  • mourad's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 155
  • Thank you received: 6
Does TOMAWAC interpolate the different parameters (Hm0, Tp, Dir) between time steps to match the specified timestep in the cas file?
The administrator has disabled public write access.

Prescribing wave conditions comes with Segmentation fault 1 month 2 weeks ago #45704

  • tfouquet
  • tfouquet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 295
  • Thank you received: 115
hello

you will find your fortran so that it works. I have some comments :
- it is better to use user_limwac instead of modifying limwac see examples/tomawac/calais_test/tom_variable.cas for an example
- I delete one useless call to speinit, this useless call was the reason of the segmentation fault since there was not the good number of arguments in the call
- I added the save so that you keep your values a time step to another.
- I deleted the 2nd loop on HOURLY_TIMESTEPS that you were doing at each timestep, since you know you go forward in time.

regards
Attachments:
The administrator has disabled public write access.
The following user(s) said Thank You: mourad

Prescribing wave conditions comes with Segmentation fault 1 month 2 weeks ago #45705

  • tfouquet
  • tfouquet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 295
  • Thank you received: 115
Tomawac does not do anything, it is up to you to interpolate,
instead of
HM0L = HM0L_MB(TT)
you can write something like
HM0L = coef * HM0L_MB(TT) +(1-coeff)* HM0L_MB(TT+1)
The administrator has disabled public write access.
The following user(s) said Thank You: mourad

Prescribing wave conditions comes with Segmentation fault 1 month 2 weeks ago #45706

  • mourad
  • mourad's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 155
  • Thank you received: 6
Dear Thierry,

Thank you very much for your help. Your guidance was clear and extremely helpful, and I truly appreciate the time you took to assist me. It made a real difference.

Thanks again for your support and for making the forum such a great resource.

Best regards,
Mourad
The administrator has disabled public write access.
Moderators: tfouquet

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