Skip to content

Commit fd4ca39

Browse files
committed
Make the smcuda BTL great again.
It has been broken for months because of the lack of initialization of the HWLOC library. The smcuda process creating the backing file (local rank 0) uses opal_cache_line_size to align the objects in the backing file, and the opal_cache_line_size is initialized by default to 128. Later on, when the rest of the processes attach the same backing file, HWLOC has been called and the cache size has now been updated to the correct value. If this value is different than the default one (and they are as most cache sizes are 64 bytes right now) the objects in the backing file will be misaligned. Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
1 parent 96e8cbe commit fd4ca39

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

opal/mca/btl/smcuda/btl_smcuda_component.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include <sys/stat.h> /* for mkfifo */
4343
#endif /* HAVE_SYS_STAT_H */
4444

45+
#include "opal/mca/hwloc/base/base.h"
4546
#include "opal/mca/shmem/base/base.h"
4647
#include "opal/mca/shmem/shmem.h"
4748
#include "opal/util/bit_ops.h"
@@ -866,6 +867,13 @@ mca_btl_smcuda_component_init(int *num_btls,
866867
* shared-memory segment. this routine sets component sm_max_procs. */
867868
calc_sm_max_procs(num_local_procs);
868869

870+
/* Before we can safely create the backend file we need to know minimal
871+
* information about the local node. We need at least a size of a cache line
872+
* as we align the data in the backing file to it. The simplest way for now is
873+
* to force the HWLOC initialization.
874+
*/
875+
opal_hwloc_base_get_topology();
876+
869877
/* This is where the modex will live some day. For now, just have local rank
870878
* 0 create a rendezvous file containing the backing store info, so the
871879
* other local procs can read from it during add_procs. The rest will just

0 commit comments

Comments
 (0)