FLUSH ERROR when running the test-suite

Submitted by yunhailiseu on Mon, 01/16/2017 - 18:46

Forums 

Installation

Dear Developers,

Recently I tried to install BGW-1.2.0. The build was successful,, but I but ran into such errors when running the test-suite.

------------------------------------------------------ERRORS----------------------------------------------------------------------
Starting test run ...
Executing: cd /tmp/BGW.w2Z6PM; /vol-th/home/jlwang/workspace/yhli/soft/BerkeleyGW-1.2.0/testsuite/../bin/epsilon.cplx.x > eps_static_skip_epsilon_restart_1.out
forrtl: severe (707): FLUSH: Unit 0 is not connected
Image PC Routine Line Source
epsilon.cplx.x 000000000175B2BD Unknown Unknown Unknown
epsilon.cplx.x 0000000001759DC5 Unknown Unknown Unknown
epsilon.cplx.x 00000000016B30B9 Unknown Unknown Unknown
epsilon.cplx.x 000000000166487A Unknown Unknown Unknown
epsilon.cplx.x 0000000001664070 Unknown Unknown Unknown
epsilon.cplx.x 00000000016687AF Unknown Unknown Unknown
epsilon.cplx.x 000000000054450D Unknown Unknown Unknown
epsilon.cplx.x 0000000000426C1C Unknown Unknown Unknown
libc.so.6 0000003DFDC1ECDD Unknown Unknown Unknown
epsilon.cplx.x 0000000000426B49 Unknown Unknown Unknown
Elapsed time: 1.0 s
------------------------------------------------------ERRORS----------------------------------------------------------------------

Only epsilon and sigma arose such errors. Kernel and absorption were OKay. I looked into the source code and found these lines in Common/message.f90.

---------------------------------------------------------SRC----------------------------------------------------------------------------
! There is no good reason why unit 6 would not be open, but ifort 11 -O3 will crash on FLUSH(6)
! with the message "forrtl: severe (707): FLUSH: Unit 6 is not connected", but inclusion of just
! the inquire line is sufficient to avoid the incorrect optimization of this routine. And if we
! are going to inquire, we may as well use the result to decide whether to flush.
inquire(unit = 6, opened = is_open)
if(is_open) then
FLUSH(6)
endif
---------------------------------------------------------------------------------------------------------------------------------------------

As it mentioned, Intel compilers with special optimization flags would cause such errors, and there was a workaround in message.f90. However, in epsilon_main.f90 and sigma_main.f90 the macro FLUSH was called directly without calling inquire, while kernel and absorption did not contain any FLUSH. So it might be the reason.

How to solve this problem? Do I have to reduce the optimization level, using a latest version of Intel compiler, or modifying the source code?

Best,
Yunhai