Compilation failure

Compilation failure

In beta 3, the followingworks as expected:

dense tmp = add_reduce( nested::parse("{{1, 2}, {3, 4, 5}}") * nested::parse("{{1, 1}, {1, 1, 1}}") );

...but this fails:

void test(dense &out, nested &arg1, nested &arg2)
{
out = add_reduce(arg1 * arg2);
};

dense tmp;
call(test)(tmp, nested::parse("{{1, 2}, {3, 4, 5}}"), nested::parse("{{1, 1}, {1, 1, 1}}"));

...producing these errors:
"ArBB GC: Memory leak when destructing object wrapper"
"Internal error: CTE_COMPILER_ERROR COMP_ERROR: Dynamic Compiler Internal Error"

This seems to happen only when there is a math operationbefore add_reduce, andcoding an intermediatetemporary e.g. "foo = arg1 * arg2;" in test() does not prevent the problem.

Please advise,
- paul

7 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

The issue seems to be with the intermediate value presented to add_reduce. I can postpone the symptom by passing a reference to a global temporary; it destructs towards the end of execution,issuing the memory leak error and the program halts ... but now it doesn't stop my work.

Revised code example:

nested Tmp_n;
void test(dense &out, nested &tmp, nested &arg1, nested &arg2)
{
tmp = arg1 * arg2;
out = add_reduce(tmp);
};

dense tmp;
call(test)(tmp, Tmp_n, nested::parse("{{1, 2}, {3, 4, 5}}"), nested::parse("{{1, 1}, {1, 1, 1}}"));

Best regards,
- paul

Portrait de AmandaS (Intel)

Hi Paul,Thanks for providing the excellent code snippet - I was able to reduce your test case. I suspect this has something to do with our continued work on implementing full operator support for nested types. I am waiting for confirmation on this and will provide an update soon.Thanks,--Amanda

Portrait de AmandaS (Intel)

Paul,I think this also has to do with a confirmed issue in nested::parse that is targeted to be fixed after our 1.0 release.--Amanda

I only presented the problem using parse() to make as brief an example as possible. The problem also happens with nested containers created otherwise e.g. calculations. It forces me to create and pass in global temporaries for every use of add_reduce(), etc., just to keep ArBB from crashing.
- paul

Portrait de Zhang Z (Intel)

Paul,

It has been confirmed the problem is not just limited to nested::parse(). In Beta 3 (the current version), some nested container operations, such as repeat, reductions and scans, are not working properly. Also, empty nested containers are not handled correctly. These issues are now being escalated. We will keep you updated about the progress.

Again, thanks for providing test cases that helped us to identify the problems.

Best,
Zhang

Connectez-vous pour laisser un commentaire.