Ive been using a montecarlo simulation with a square well potencial, the simulation was working correctly but now I have to use a Yukawa potential. I only change the potential part of my code but now its not working. This is the square well potential which was working fine
if (rij2 .lt. 1.0) then
uij = 10000.0d0
elseif (rij2 .lt. xlam) then
uij = -1.0d0
else
uij = 0.0d0
endif
and this is the change I made
if (rij2 .lt. 1.0) then
uij = 10000.0d0
elseif (rij2 .lt. xlam) then
uij = -1.0d0
else
rij = dsqrt(rij2)
uij = 0.5d0dexp(-zk(rij - xlam1))/rij
endif
Im only using -fast while compiling, it does compile if I compile not using -fast but the result is completly wrong. Compiling using -fast gives me the next error messages
ifort: error #10105: /home/dan/intel/oneapi/compiler/2024.1/bin/ā¦/bin/fortcom: core dumped
ifort: warning #10102: unknown signal(-1258684640)
ifort: error #10106: Fatal error in /home/dan/intel/oneapi/compiler/2024.1/bin/ā¦/bin/fortcom, terminated by unknown
ifort: error #10014: problem during multi-file optimization compilation (code 1)
I tried using āulimit -s unlimitedā and after that I get
ifort: error #10106: Fatal error in /home/dan/intel/oneapi/compiler/2024.1/bin/ā¦/bin/fortcom, terminated by kill signal
ifort: error #10014: problem during multi-file optimization compilation (code 1)
Im new in fortran so I dont really know what to do. Any help is appreciated please
By the way, -fast might conceal some errors, such as āarray bounds exceededā. Therefore, the best approach is to use the options -check all -traceback -g to debug the code.
Try using the base intrinsics for dsqrt and desp. sqrt and exp will return the same type as itās arguments, so calling the double precision version is redundant. Also, eliminate the initial multiply by 0.5d0 and replace the divide by rij with ā/(2.0d0*rij)ā. this will alter the order of execution and may provide better diagnostics. also check that (rij-xlam1) is within the bounds of the array and check that zk(rij-xlam1) actually has a defined value in it and not a NaN or a value too big to exponentiate. Just add some print statements to check the values.
Perhaps turn off the multi-file optimization to begin with. It is possible that you other parts of code already has bugs but intel compiler did not report error, and your changes triggered something and intel compiler report the error.
If intel compiler cannot give you more info, you can use gfortran to compile and build and see what error messages gfortran give you, that can be helpful.
It is best if you could share a minimal working example which can replicate the issue.
BTW, are you missing a * between 0.5d0 and exp(ā¦), and a * after zk? uij = 0.5d0 * dexp(-zk*(rij - xlam1))/rij
PS.
For those potentials U(r) which is a 1D function of r, you can pre-calculate and store a table of U(r) vs. r.
Then in the code, for a given r, you can use Lagrange 4-point interpolation to get U(r) based on the nearest 4 points in the table that are around the given r, instead of calculating a possibly very complicated and time-consuming exact U(r).
To be honest, Iām surprised that you only get this error at -fast, given that zen3 is not in the supported list of options. What processor are you compiling for?
Iāll also mention that while ifort and ifx are ordinarily binary compatible, IPO between the two binaries types is not supported as the optimization backends are fundamentally different beasts, which may be relevant if youāve switched partway between ifx and ifort in the same repo.