for (int i=0;i<N;i++)
{
#pragma oss task firstprivate(i)
{
Params params;
function(..., i, params, ...);
}
}
#pragma oss taskwait
Stack trace (most recent call last) in thread 21375:
#16 Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in
#15 Object "/lib64/libc.so.6", at 0x2ac48370a96c, in clone
#14 Object "/lib64/libpthread.so.0", at 0x2ac48200cea4, in
#13 Object "/gpfs/users/massimof/nanos6/install/lib/libnanos6-optimized-discrete.so.0.0.0", at 0x2ac48597605f, in
#12 Object "/gpfs/users/massimof/nanos6/install/lib/libnanos6-optimized-discrete.so.0.0.0", at 0x2ac485982e8a, in
#11 Object "/gpfs/users/massimof/nanos6/install/lib/libnanos6-optimized-discrete.so.0.0.0", at 0x2ac48597cffb, in
#10 Object "/gpfs/users/massimof/nanos6/install/lib/libnanos6-optimized-discrete.so.0.0.0", at 0x2ac48597cb65, in
#9 Object "/gpfs/workdir/massimof/test_OmpSs-2/./smilei", at 0x7302f8, in
#8 Object "/gpfs/workdir/massimof/test_OmpSs-2/./smilei", at 0x6f6abe, in main
#7 Object "/gpfs/workdir/massimof/test_OmpSs-2/./smilei", at 0x646744, in VectorPatch::dynamics(Params&, SmileiMPI*, SimWindow*, RadiationTables&, MultiphotonBreitWheelerTables&, double, Timers&, int)
#6 Object "/gpfs/users/massimof/nanos6/install/lib/libnanos6-optimized-discrete.so.0.0.0", at 0x2ac485957cd8, in AddTask::submitTask(Task*, Task*, bool)
#5 Object "/gpfs/users/massimof/nanos6/install/lib/libnanos6-optimized-discrete.so.0.0.0", at 0x2ac48597fbde, in
#4 Object "/gpfs/workdir/massimof/test_OmpSs-2/./smilei", at 0x5d6d7c, in Params::~Params()
#3 Object "/lib64/libc.so.6", at 0x2ac48368d298, in
#2 Object "/lib64/libc.so.6", at 0x2ac483684ed6, in
#1 Object "/lib64/libc.so.6", at 0x2ac483643a77, in abort
#0 Object "/lib64/libc.so.6", at 0x2ac483642387, in gsignal
A workaround was to define auxiliary variables, copies of those variables contained in the object params
that were necessary to function
, i.e. passing those variables to function
without using params
in its inputs. In some cases this can be an easy fix, but in other cases I should pass a lot a variables contained in params
, restructuring functions in the code. So, are there any limitations / solutions when passing object to functions inside tasks? Or maybe there is something off in my build of Nanos6?