Can't create the solution for waveguide.edp

Thank you for your response. I have version 4.15. I also tried uninstalling and reinstalling version 4.15, and re-launching the waveguide.edp file, but the results are the same. I really don’t know why.

May I ask which version of FreeFem++ you are currently using?

Or could the problem be that I don’t have sufficient RAM to handle this task? I’m using an Intel Core i7-13620H, but there’s no indication of an “out of memory” error..

Thank you once again

I have tried version 4.14 on one computer, and 4.15 on another one (linux ubuntu and linux debian).
Both work normally, even if I replace “solver=sparsesolver” by “solver=umfpack”.
This is probably due to your computer or your installation (in particular umfpack) (?)

ok, I tried with “solver=umfpack” and this was the result:

   71 : problem waveguide([Ex,Ey,Ez], [vx,vy,vz], solver=umfpack The Identifier umfpack does not exist

 Error line number 71, in file C:\Users\giorg\Desktop\waveguide.edp, before  token umfpack

  current line = 71
Compile error :
        line number :71, umfpack
error Compile error :
        line number :71, umfpack
 code = 1 mpirank: 0
 try getConsole C:\Users\giorg\Desktop\waveguide.edp
 save log in :  'C:\Users\giorg\Desktop\waveguide.log'
wait enter ?

I think I’m missing something. I tried this program on three different PCs, all running Windows 11. I tested both version 4.15 Win64 and version 4.15-b Win64. Have you installed any plugins?

SOLVED: the problem was here:

real f = 94*10^9;

which I changed to:

real f = 94e9; 

Now the result is correct and is exatly the same as yours. I also tried adding:

cout<<94*10^9<<endl;

and it shows a misterious “489280512”. I really can’t figure out where this number comes from. But I think it will remain a mistery..

I was not precise enough, you have to put solver="UMFPACK"
You have the UMFPACK, since you had the error message
“UMFPACK WARNING singular matrix”. This is the mysterious point: the matrix should not be singular.

Great that you solved it. It seems that the right-hand side was exceeding the capacity of your computer in terms of integers.
Then converting this integer to real gives a wrong value. Maybe your computer installation is 32bit ?

You bypass the problem by defining it directly as a real number.

Ah, I understand :). Regarding the installation, I really don’t know. I checked out both my windows version and FreeFem++ version, they’re both in 64 bit.

Thank you so much for your help. Have a good night and a great start to the week! :slight_smile:

Hi. Your FreeFem version is fine. This is a difference between the Windows and Linux data models, LLP64 and LP64. “long int” are 32 bits under Windows and 64 under Linux (more info at https://en.wikipedia.org/wiki/64-bit_computing#64-bit_data_models and https://www.ljll.fr/lehyaric/ffcs/src/ffref/Basic/precision.m4.htm). Your solution with real numbers is good.

Thank you so much for the response and the interesting informations :slight_smile: