Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-finline-limit=50000 causing issues in parscalarvec branch with gcc-4.6.3 #1

Open
bjoo opened this issue Sep 9, 2013 · 0 comments
Open

Comments

@bjoo
Copy link
Contributor

bjoo commented Sep 9, 2013

I've compiled parscalarvec with -finline-limit=50000 and I get an odd result
for a test of

SpinMatrix g_one = 1;

LatticeFermion chi = zero;
LatticeFermion chi2 = zero;
LatticeFermion tmp2 = zero;
gaussian(tmp2);
LatticeFermion tmp3 = g_one*tmp2;

chi = shift(g_one*tmp2 , BACKWARD, j_decay);
chi2 =shift( tmp3, BACKWARD, j_decay);

QDPIO::cout << "Test 29: norm2 ( chi2 - chi )=" << norm2( chi2 -chi ) << endl;

The remaining C++ flags apart from -finline-limit are:

-fopenmp -g -O3 -std=c++0x -fargument-noalias-global 

and the compiler used is

/dist/gcc-4.6.3/bin/g++

The answer ought to be zero.

With -finline-limit=50000 in the parscalarvec branch I get:

Test 29: norm2 ( chi2 - chi )=874836.987165243

Without the -finline-limit option I get:

Test 29: norm2 ( chi2 - chi )=0

as I should, Please beware in your own builds.

PS: I also tried a variety of options here, using for example -O2 -O0, and leaving off the -fargument-noalias-global option. The -finline-limit is the smoking gun.
With the -finline-limit option I also replaced g_one with other types

OLattice<PScalar<PColorMatrix< RComplex< ILattice< REAL64, INNER_LEN> >, 3> > > g_one;
gaussian(g_one);

and

OScalar<PScalar<PColorMatrix< RComplex< IScalar< REAL64 > >, 3> > > g_one = 1;

etc, and all seem to work ok without the -finline-limit=50000 option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant