Skip to content
Snippets Groups Projects
Commit a76546a6 authored by Dmitriy Morozov's avatar Dmitriy Morozov
Browse files

Merge branch 'icc-fix'

parents 14adaa1e 4ec6598a
No related branches found
No related tags found
No related merge requests found
......@@ -37,11 +37,14 @@ class Factory
};
return true;
}
static bool registered;
static volatile bool registered;
std::string id() const override { return typeid(T).name(); }
private:
#if defined(__INTEL_COMPILER)
__attribute__ ((used))
#endif
Registrar(): Base(Key{}) { (void)registered; }
};
......@@ -67,7 +70,7 @@ class Factory
template <class Base, class... Args>
template <class T>
bool Factory<Base, Args...>::Registrar<T>::registered = Factory<Base, Args...>::Registrar<T>::registerT();
volatile bool Factory<Base, Args...>::Registrar<T>::registered = Factory<Base, Args...>::Registrar<T>::registerT();
}
......
......@@ -42,7 +42,7 @@ diy::mpi::environment::
environment(int threading)
{
#ifndef DIY_NO_MPI
int argc = 0; char** argv;
int argc = 0; char** argv = { NULL };
MPI_Init_thread(&argc, &argv, threading, &provided_threading);
#else
provided_threading = threading;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment