HazyResearch / EmptyHeaded

Your worst case is our best case.
139 stars 29 forks source link

Error: operand type mismatch for `vxorps' at getting started stage #111

Open daichou03 opened 4 years ago

daichou03 commented 4 years ago

I am trying to setup in a docker environment as: https://hub.docker.com/r/craberger/emptyheaded/

Then follow all the steps as in overview:

source env.sh
./compile.sh

And "getting started" in docs/notebooks/, until:

from emptyheaded import *
start()
c = Config(num_threads=128) # 128 threads
eh = os.path.expandvars("$EMPTYHEADED_HOME")
df_graph = pd.read_csv(eh+'/test/graph/data/facebook_duplicated.tsv',\
  sep='\t',\
  names=["0","1"],\
  dtype={"0":np.uint32,"1":np.uint32})

edge = Relation(
  name="Edge",
  dataframe=df_graph)
#add one more relation we need for other tutorials
deg = pd.read_csv(eh+"/test/graph/data/inv_degree.tsv",\
  sep='\t',\
  names=["0","a_0"],\
  dtype={"0":np.uint32,"a_0":np.float32})
inv_degree = Relation(
    name="InvDegree",
    dataframe=deg)
db = Database.create(
  c,
  eh+"/docs/notebooks/graph/db",
  [edge,inv_degree])
db.build()

Then, it failed at a point as these errors:

[ 63%] Building CXX object src/CMakeFiles/emptyheaded.dir/Encoding.cpp.o
/tmp/ccUhAlu9.s: Assembler messages:
/tmp/ccUhAlu9.s:729: Error: operand type mismatch for `vxorps'
/tmp/ccUhAlu9.s:10350: Error: operand type mismatch for `vxorps'
/tmp/ccUhAlu9.s:10722: Error: operand type mismatch for `vxorps'
make[2]: *** [src/CMakeFiles/emptyheaded.dir/Encoding.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/emptyheaded.dir/all] Error 2
make: *** [all] Error 2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/EmptyHeaded/python/database.py", line 90, in build
    self.backend.create(self.relations,str(self.dbhash))
  File "DB.pyx", line 59, in DB.DB.create (DB.cpp:2813)
ImportError: /EmptyHeaded/docs/notebooks/graph/db/libs/createDB/DFMap_0.so: cannot open shared object file: No such file or directory

I suspect it's something wrong with CMake, but as the date I am posting this, the CMake version on the docker is 2.8.12.2-0ubuntu3, which is up to date. Does the same thing happens for others?

Hanchen-Wang commented 2 years ago

Hi,

I have met the same problem. Do you find the solution? Thanks!

tonyyxliu commented 2 years ago

Hey guys,

I just succeeded compiling the program by modifying CMAKE_CXX_FLAGS from -march=native to -march=haswell in the /storage_engine/CMakeLists.txt file in the following way:

The original version:

set (CMAKE_CXX_FLAGS "-mavx2 -fPIC -std=c++0x -pedantic -O3 -Wall -Wno-unused-function -Wextra -march=native -mtune=native -DNUM_THREADS_IN=${NUM_THREADS}")

Modified Version

set (CMAKE_CXX_FLAGS "-mavx2 -fPIC -std=c++0x -pedantic -O3 -Wall -Wno-unused-function -Wextra -march=haswell -mtune=native -DNUM_THREADS_IN=${NUM_THREADS}")

I haven't figured out why it works, and hope someone could let me know. As far as I know, vxorps is an instruction of the AVX, which is critical about computer architecture.

Hope my solution helps.