SUREL icon indicating copy to clipboard operation
SUREL copied to clipboard

Stucked at Compiling `surel_gacc` on Macbook M1 chip

Open fs302 opened this issue 3 years ago • 3 comments

Hi there, when trying to run this repo at MacBook Pro (13-inch, M1, 2020), I found some obstacles:

  1. failed at recover conda environment using conda env create -f environment.yml image
  2. failed at compiling surel_gacc image Hope to get help with these issues. Can we run SUREL without c acceleration?

fs302 avatar Dec 26 '22 10:12 fs302

Hello, thank you for your interest in our work. Note that SUREL has not been tested on MacOS.

  1. environment.yml is exported from Ubuntu 20.04, some packages may not work on Mac.
  2. SUREL depends on C extensions. From the error trace, it looks like your environment doesn't have openmp properly configured.

VeritasYin avatar Dec 26 '22 16:12 VeritasYin

Hi,

Sorry for inserting myself into the conversation 😅

I saw the issue and had remembered facing the same problem on my M1 as well. The fix that worked for me: You need to update the clang compiler to one that comes with Homebrew. Prerequisite: Make sure homebrew is installed (https://docs.brew.sh/Installation) on your macbook. Steps after making sure homebrew is installed:

  1. Install llvm on your homebrew: brew install llvm
  2. Point to the brew clang compiler (could be different version for you): export CC=/opt/homebrew/Cellar/llvm/13.0.1_1/bin/clang

This should ideally work. Please double-check if you have the clang compiler in this path export CC=/opt/homebrew/Cellar/llvm/13.0.1_1/bin/clang. It could be a different version for you.

venomouscyanide avatar Dec 26 '22 20:12 venomouscyanide

@venomouscyanide many thanks! It works.

But another Error raised after run the script python main.py --dataset ogbl-collab --metric hit --num_step 4 --num_walk 200 --use_val

image

from surel_gacc import run_sample ImportError: dynamic module does not define module export function (PyInit_surel_gacc)

fs302 avatar Dec 27 '22 02:12 fs302