i have a serial fortran code.when i run alone, it converged in 20 min and final answer is 17
but when i Simultaneous run it in more than one vs it converged in different time and different answer!
i work with vs2012 and intel xe.
Here's to say that with 4 Simultaneous run, about 50 percent of my cpu and ram remains free
whats the problem?
It would require a working piece of example code to discover why your results change. Please also supply the compiler command line or compile log from Visual Studio.
I guess your machine has 4 real cores plus 4 virtual cores (hyper-threads). The CPU monitor counts this as 8 available core so if you only use 4 that means only 50% are in use.
If you have a coding error that means that uninitialized variables are referenced, different values left over in memory can change the number of iterations to converge (and change answers.)
Are you running 4 copies of the same program at the same time?
Or, are you running 1 copy of the program, and using multiple threads within the same program to execute the same function or subroutine at the same time?
Does your convergence "done" condition depend on time?
IOW declare convergence until some value is less than x .OR. after nnn ms transpire?
@ steve,yes inputs are same
@jjmdempsey , yes i running 4 copies of the same program at the same time.my cov condition : arrive value 0.3.
of course number of iterations in all runs are same and difference is in final answer is in 6th digit after decimal point.
Either Steve's suspicion in #4 is the case, or you have some other indeterminate value being use in your program.
An example of coding error that can produce an indeterminate value is where a reference/pointer is used past the lifetime of that which it referenced (or pointed to). In this case, the stale data (otherwise known as undefined data), may have the correct values for a period of time up until either: a) the call stack/allocation ends up in altering the values, or b) the process gets preempted which causes an unexpected usage of the program's stack, and thus "corrupting" the otherwise undefined data. Condition a) often causes consistent errors, b) random errors. As to if this is the cause, I cannot say.