AnacletoLAB / grape

🍇 GRAPE is a Rust/Python Graph Representation Learning library for Predictions and Evaluations
MIT License
502 stars 38 forks source link

`Illegal instruction (core dumped)` on importing grape #27

Closed caufieldjh closed 1 year ago

caufieldjh commented 1 year ago

In another issue that may have something to do with our aging build server: When we import grape in this environment (see info below), we get only Illegal instruction (core dumped).

cpuinfo output:

processor       : 23
vendor_id       : GenuineIntel
cpu family      : 6
model           : 44
model name      : Intel(R) Xeon(R) CPU           X5675  @ 3.07GHz
stepping        : 2
microcode       : 0x1f
cpu MHz         : 1599.987
cache size      : 12288 KB
physical id     : 1
siblings        : 12
core id         : 10
cpu cores       : 6
apicid          : 53
initial apicid  : 53
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 popcnt lahf_lm epb pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid dtherm ida arat flush_l1d
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips        : 6133.21
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:
zommiommy commented 1 year ago

That processor should have a Westmere microarchitecture, which is 2 generations before Haswell, so I suppose that the error is either in the detection of the CPU features or in the compatibility version we ship.

I'm looking into this

zommiommy commented 1 year ago

Found it! It was a stupid typo on the check. https://github.com/AnacletoLAB/ensmallen/blob/2cbccc224e2e366c6ab8a897be93ef808accaa72/bindings/python/ensmallen/__init__.py#L14

Here I forgot to put the HASWELL_FLAGS in the set check.

I'm compiling the fixed version, it will be uploaded soon.

caufieldjh commented 1 year ago

Aha! Thanks!

LucaCappelletti94 commented 1 year ago

It should be fixed in the new version of ensmallen, do run a pip install -U grape