Hi,
I have trouble when I use different versions of Lapack to calculate the same issue. I compared the results of the programs, compiling with Lapack 3.0, 3.1.1, and 3.2.1. Furthermore, I performed the same test with Intel MKL.
After compared these different versions, Lapack 3.0 seems more stable than the other versions, and I think it is possible that I encountered some bug in Lapack 3.1.1 and 3.2.1.
The compiling info and output results are below (they all have the same input data):
ifort -O3 -xSSSE3 -static-intel -mssse3 -o scat PublicDataType.o InitialPubicData.o TrapInFirstBZ.o SomeInitialFunction.o DielectricFunction.o MainSubroutine.o MatrixINVandEIG.o BuildAndSloveMatrix.o ImportantMatrixs.o CalculateEnergyFlux.o Emission.o ReflectAndTrans.o TotalEmission.o Main.o -lmkl_intel_lp64 -lmkl_core -lpthread -lmkl_sequential
now up2dated!
[wangxh6@c0124 del]$ ./scat
Data from sides(upper/lower):BOTH;
And incident from: UPPER;
Calculate with: "REAL"
-11.6188765665993 -10.6188765768530
0.999999989746327
ifort -O3 -xSSSE3 -static-intel -mssse3 -o scat PublicDataType.o InitialPubicData.o TrapInFirstBZ.o SomeInitialFunction.o DielectricFunction.o MainSubroutine.o MatrixINVandEIG.o BuildAndSloveMatrix.o ImportantMatrixs.o CalculateEnergyFlux.o Emission.o ReflectAndTrans.o TotalEmission.o Main.o -L/export/home/wangxh6/lapack/3.0/O1 -llapack -lblas
now up2dated!
[wangxh6@c0124 del]$ ./scat
Data from sides(upper/lower):BOTH;
And incident from: UPPER;
Calculate with: "REAL"
-0.141758274548027 0.858241725451776
0.999999999999803
ifort -O3 -xSSSE3 -static-intel -mssse3 -o scat PublicDataType.o InitialPubicData.o TrapInFirstBZ.o SomeInitialFunction.o DielectricFunction.o MainSubroutine.o MatrixINVandEIG.o BuildAndSloveMatrix.o ImportantMatrixs.o CalculateEnergyFlux.o Emission.o ReflectAndTrans.o TotalEmission.o Main.o -L/export/home/wangxh6/lapack/3.2.1 -llapack -lblas
now up2dated!
[wangxh6@c0124 del]$ ./scat
Data from sides(upper/lower):BOTH;
And incident from: UPPER;
Calculate with: "REAL"
-11.6188761788806 -10.6188761520427
1.00000002683791
ifort -O3 -xSSSE3 -static-intel -mssse3 -o scat PublicDataType.o InitialPubicData.o TrapInFirstBZ.o SomeInitialFunction.o DielectricFunction.o MainSubroutine.o MatrixINVandEIG.o BuildAndSloveMatrix.o ImportantMatrixs.o CalculateEnergyFlux.o Emission.o ReflectAndTrans.o TotalEmission.o Main.o -L/export/home/wangxh6/lapack/3.1.1 -llapack -lblas
now up2dated!
[wangxh6@c0124 del]$ ./scat
Data from sides(upper/lower):BOTH;
And incident from: UPPER;
Calculate with: "REAL"
-11.6188764610851 -10.6188764766732
0.999999984411938
For some reason, the first two numbers of each group must be between -1 and 1. Only the second group is rational.
Using these compiled programs to compute other input data, some results end up the same but some do not. I do not have the experience to track down the cause (perhaps it is a bug). I could provide my code if anyone could give me a help. Thanks in advance.

