- status: open --> closed
After building CPSeis with gcc version 9.3.1, icps does not function correctly.
Fedora 31 and Ubuntu 20.04 have this version of compiler.
Most jobs are split into 2 or 3 loops. The job report begins with the looping
information. However, when executing it will have an error saying that a
process must be a trace supplying process. That process is at the start of
loop 2.
All of these jobs ran successfully with when built with older versions of gcc.
That is with only 1 loop.
The problem occurs in engine.f90, which creates a new loop when it sees a
trace supply process. That is defined by
need_label =true
need_request=false
setup_only =false
These keywords are checked by subroutine cardset_get_scalar.
The processes that are wrongly labelled as "trace supplying" are those that do
not define need_label and need_request. With the older builds of CPSeis, the
undefined keywords are returned as false. However with cgg 9.3.1, need_request
is still false, but need_label arises as true. So the process appears to be
trace supplying.
But later, when trying to start loop 2, the process is correctly identified as
not trace supplying, so the job aborts.
I have not found why this goes wrong with this compiler, but there is a way to
avoid it. Subroutine cardset_get_scalar returns an error message, which is
blank if successful.
At line 430 in engine.f90, need_label is tested by cardset_get_scaler.
So after this, add a safety net like this:
if (errmsg(1:1).eq.'k') need_label = .false.
errmsg will say keyword not found, when it was not defined by pc_put_control
in the process.
I have tried this patch with older versions of gcc, and it does no harm.