uiuc-hpc / lci

Implementation of a cool communication layer
Other
15 stars 5 forks source link

Compilation error #25

Closed diehlpk closed 1 year ago

diehlpk commented 2 years ago

Hi,

I tried to follow the compilation instruction and got the following error:

gcc -g3 -ggdb -O3 -Wall -Wextra  -fPIC -fvisibility=hidden -std=gnu99 -I./include -I./src/include -I./  -I./src/ -DAFF_DEBUG -DUSE_AFFI  -D_GNU_SOURCE -pthread  -DLC_SERVER_HAS_EXP -DLC_SERVER_HAS_DYN  -DLC_MAX_EP=8 -DLC_MAX_DEV=1 -DLC_SERVER_HAS_SYNC -DLC_SERVER_HAS_CQ -DLC_USE_SERVER_PSM -DAFF_DEBUG -I/global/homes/d/diehlpk/libpsm2/usr//include -DUSE_DREG -c src/lc.c -o obj/lc.o
In file included from ./src/include/cq.h:4,
                 from ./src/include/lc_priv.h:9,
                 from src/lc.c:2:
./src/include/packet.h:25:1: warning: alignment 1 of 'struct packet_context' is less than 64 [-Wpacked-not-aligned]
   25 | };
      | ^
./src/include/packet.h:18:17: warning: 'req_s' offset 16 in 'struct packet_context' isn't aligned to 64 [-Wpacked-not-aligned]
   18 |   struct lc_req req_s;
      |                 ^~~~~
In file included from ./src/include/server/server.h:39,
                 from ./src/include/proto.h:18,
                 from ./src/include/lc_priv.h:59,
                 from src/lc.c:2:
./src/include/server/server_psm2.h:4:10: fatal error: psm2.h: No such file or directory
    4 | #include <psm2.h>    /* required for core PSM2 functions */
      |          ^~~~~~~~
compilation terminated.
make: *** [Makefile:131: obj/lc.o] Error 1

Do I need to install some library?

hkaiser commented 2 years ago

@JiakunYan we ran into this issue while compiling https://github.com/STEllAR-GROUP/hpx/pull/5715 on perlmutter. Do we have to add some cmake flags?

omor1 commented 2 years ago

A couple things to note:

  1. I suspect that you're using the default branch for LCI, which is currently v2; this is an ancient branch and not the work @JiakunYan is working with for the new parcelport. That said, I'm not sure which branch is the correct one—it's probably one of jiakun-dev-v1.7 or v1.7-fetchcontent.
  2. More recent LCI has switched to a CMake build system.
  3. LCI has several backends, namely InfiniBand Verbs (ibv), Libfabric (ofi), and Omni-Path/PSM2 (psm). The default with the v2 branch was PSM2, since we were running on Stampede2 at the time, hence LCI was looking for the psm2 library—and failing to find it. I think that Perlmutter uses HPE/Cray Slingshot—if I recall correctly, their preferred interface is via Libfabric, so make sure you select the correct backend when configuring, -DLCI_SERVER=ofi. The parcelport might also need specific addressing modes or completion mechanisms; double-check that via @JiakunYan.
diehlpk commented 2 years ago

Hi @omor1, I used -DHPX_WITH_FETCH_LCI=ON and I could compile the parcelport within HPX. Before, I tried to compile the GitHub repo and that failed.