File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -201,7 +201,22 @@ void ABTD_env_init(ABTI_global *p_global)
201201 env = getenv ("ABT_MEM_LP_ALLOC" );
202202 if (env == NULL ) env = getenv ("ABT_ENV_MEM_LP_ALLOC" );
203203#if defined(HAVE_MAP_ANONYMOUS ) || defined(HAVE_MAP_ANON )
204+ #if defined(__x86_64__ )
204205 int lp_alloc = ABTI_MEM_LP_MMAP_HP_RP ;
206+ #else
207+ /*
208+ * If hugepage is used, mmap() needs a correct size of hugepage; otherwise,
209+ * error happens on munmap(). However, the default size is for typical
210+ * x86/64 machines, not for other architectures, so the error happens when
211+ * the hugepage size is different. To run Argobots with default settings
212+ * on these architectures, we disable hugepage allocation by default on
213+ * non-x86/64 architectures; on such a machine, hugepage settings should
214+ * be explicitly enabled via an environmental variable.
215+ *
216+ * TODO: fix this issue by detecting and setting a correct hugepage size.
217+ */
218+ int lp_alloc = ABTI_MEM_LP_MALLOC ;
219+ #endif
205220#else
206221 int lp_alloc = ABTI_MEM_LP_MALLOC ;
207222#endif
You can’t perform that action at this time.
0 commit comments