pnnl / socialsim_package

Other
17 stars 25 forks source link

Having trouble building socialsim_package #26

Open alw4ey opened 4 years ago

alw4ey commented 4 years ago

I followed the directions in the README to build the socialsim_package, and all the preliminary steps seemed to work okay, until the last step. I think this is related to iGraph, which I think my colleague also had issues with. This is a new conda environment, so I started from scratch.

When I run:

(pnnl_update) -bash-4.2$python setup.py install

I get ... (Some warnings -- as identified in README -- I treat all warnings as benign.)

Cannot find the C core of igraph on this system using pkg-config. We will now try to download and compile the C core from scratch. Version number of the C core: 0.7.1

Downloading igraph-0.7.1.tar.gz... 100.00% Extracting igraph-0.7.1.tar.gz... Configuring igraph... checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc3 checking how to run the C++ preprocessor... g++ -E checking for flex... flex checking lex output file root... lex.yy checking lex library... -lfl checking whether yytext is a pointer... yes checking for bison... bison -y checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking sys/times.h usability... yes checking sys/times.h presence... yes checking for sys/times.h... yes checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking how to print strings... printf checking for a sed that does not truncate output... /usr/bin/sed checking for fgrep... /usr/bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 3458764513820540925 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... dlltool checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for mt... no checking if : is a manifest tool... no checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking for shl_load... no checking for shl_load in -ldld... no checking for dlopen... no checking for dlopen in -ldl... yes checking whether a program can dlopen itself... yes checking whether a statically linked program can dlopen itself... no checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking how to run the C++ preprocessor... g++ -E checking for ld used by g++... /usr/bin/ld -m elf_x86_64 checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC -DPIC checking if g++ PIC flag -fPIC -DPIC works... yes checking if g++ static flag -static works... no checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking dynamic linker characteristics... (cached) GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking for ANSI C header files... (cached) yes checking stdarg.h usability... yes checking stdarg.h presence... yes checking for stdarg.h... yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking time.h usability... yes checking time.h presence... yes checking for time.h... yes checking for unistd.h... (cached) yes checking for stdint.h... (cached) yes checking sys/int_types.h usability... no checking sys/int_types.h presence... no checking for sys/int_types.h... no checking for expm1... yes checking for rint... yes checking for rintf... yes checking for finite... yes checking for log2... yes checking for snprintf... yes checking for log1p... yes checking for round... yes checking for fabsl... yes checking for fmin... yes checking for strcasecmp... yes checking for isnan... yes checking for strdup... yes checking for _strdup... no checking for ftruncate... yes checking for stpcpy... yes checking whether stpcpy is declared... yes checking whether compiler supports -ffloat-store... yes checking whether compiler supports -fstore... no checking whether compiler accepts -Wall... yes checking for xml2-config... /home/alw4ey/miniconda3/envs/pnnl_update/bin/xml2-config checking for xmlSAXUserParseFile in -lxml2... yes checking libxml/parser.h usability... yes checking libxml/parser.h presence... yes checking for libxml/parser.h... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating tests/Makefile config.status: creating tests/atlocal config.status: creating Makefile config.status: creating src/Makefile config.status: creating igraph.pc config.status: creating igraph_Info.plist config.status: creating doc/Makefile config.status: creating include/igraph_version.h config.status: creating include/igraph_threading.h config.status: creating config.h config.status: executing tests/atconfig commands config.status: executing depfiles commands config.status: executing libtool commands igraph successfully configured. GraphML format support -- yes GMP library support -- no GLPK library support -- yes Thread-local storage -- no Use internal ARPACK -- yes Use internal LAPACK -- yes Use internal BLAS -- yes Use internal F2C -- yes Use internal GLPK -- yes Debug build -- no Profiling -- no

(lots of output)

In file included from ../optional/glpk/glpenv01.c:31:0: ../optional/glpk/glpenv01.c: In function '_glp_get_env_ptr': ../include/igraph_error.h:425:8: warning: return makes pointer from integer without a cast [enabled by default] return igraph_errno ; \ ^ ../optional/glpk/glpenv01.c:135:5: note: in expansion of macro 'IGRAPH_ERROR' IGRAPH_ERROR("GLPK initialization failed", IGRAPH_EGLP); ^ ../include/igraph_error.h:425:8: warning: return makes pointer from integer without a cast [enabled by default] return igraph_errno ; \ ^ ../optional/glpk/glpenv01.c:143:2: note: in expansion of macro 'IGRAPH_ERROR' IGRAPH_ERROR("Invalid GLPK environment", IGRAPH_EGLP); ^

(more benign-looking output)

collect2: error: ld returned 1 exit status error: Setup script exited with error: command 'g++' failed with exit status 1

(Mandy again): Any insight on this would be helpful. Thanks!

Maria-G commented 4 years ago

Hi Mandy,

Did you follow all of the following install instructions from the README?

# Snap installation
tar -xvzf snap_distribution.tar.gz
cd snap_distribution.tar.gz
python setup.py install

# iGraph installation
# Note: The iGraph installation process may vary from system to system
conda install -c conda-forge/label/gcc7 python-igraph 

# rtree installation
conda install rtree

# pysal installation
conda install pysal

# For Mac OSX, you may to need install matplotlib with conda rather than 
# relying on the pip install below
conda install matplotlib

If so, have you tried the alternative installation process of building from the source for igraph?

Download the github repo for this code (git@github.com:vtraag/louvain-igraph.git) then install from source: "python setup.py install" (so that you build igraph from source)

We have generally found that igraph requires different install processes on different systems or even different machines using the same OS etc.

alw4ey commented 4 years ago

I was able to run the extraction script for twitter without installing the package, so while I don't might trouble-shooting this after the challenge, I may hold off now.

Unless ....

I am having trouble running the extraction script for YouTube. I call it as displayed below:

_data = pd.DataFrame(egt.extract_youtube_data(fn=ifile,info_id_fields=['urls_linked'],anonymized=True,usernamemap={}))

(I call it three times -- once for each file.)

And I get the following error messages: Deduplicating... Extracting fields... extracting urls... Traceback (most recent call last): File "mandys_extract_ground_truth_twitter.py", line 16, in data = pd.DataFrame(egt.extract_youtube_data(fn=ifile,info_id_fields=['urls_linked'],anonymized=True,username_map={})) File "/sfs/qumulo/qhome/alw4ey/projects/socialsim_package/socialsim/extract_ground_truth.py", line 360, in extract_youtube_data comments.loc[:,'actionType']='comment' File "/home/alw4ey/miniconda3/envs/pnnl_update/lib/python3.7/site-packages/pandas/core/indexing.py", line 205, in setitem self._setitem_with_indexer(indexer, value) File "/home/alw4ey/miniconda3/envs/pnnl_update/lib/python3.7/site-packages/pandas/core/indexing.py", line 369, in _setitem_with_indexer "cannot set a frame with no " ValueError: cannot set a frame with no defined index and a scalar Deduplicating... Extracting fields... extracting urls... Traceback (most recent call last): File "mandys_extract_ground_truth_twitter.py", line 16, in data = pd.DataFrame(egt.extract_youtube_data(fn=ifile,info_id_fields=['urls_linked'],anonymized=True,username_map={})) File "/sfs/qumulo/qhome/alw4ey/projects/socialsim_package/socialsim/extract_ground_truth.py", line 337, in extract_youtube_data videos.loc[:,'actionType']='video' File "/home/alw4ey/miniconda3/envs/pnnl_update/lib/python3.7/site-packages/pandas/core/indexing.py", line 205, in setitem self._setitem_with_indexer(indexer, value) File "/home/alw4ey/miniconda3/envs/pnnl_update/lib/python3.7/site-packages/pandas/core/indexing.py", line 369, in _setitem_with_indexer "cannot set a frame with no " ValueError: cannot set a frame with no defined index and a scalar Deduplicating... Extracting fields... extracting urls... Traceback (most recent call last): File "mandys_extract_ground_truth_twitter.py", line 16, in data = pd.DataFrame(egt.extract_youtube_data(fn=ifile,info_id_fields=['urls_linked'],anonymized=True,username_map={})) File "/sfs/qumulo/qhome/alw4ey/projects/socialsim_package/socialsim/extract_ground_truth.py", line 337, in extract_youtube_data videos.loc[:,'actionType']='video' File "/home/alw4ey/miniconda3/envs/pnnl_update/lib/python3.7/site-packages/pandas/core/indexing.py", line 205, in setitem self._setitem_with_indexer(indexer, value) File "/home/alw4ey/miniconda3/envs/pnnl_update/lib/python3.7/site-packages/pandas/core/indexing.py", line 369, in _setitem_with_indexer "cannot set a frame with no " ValueError: cannot set a frame with no defined index and a scalar

The only change I have made to the extract_ground_truth.py is to update the import statement as indicated by Emily. Any ideas?

alw4ey commented 4 years ago

(Oh, and I know the file I am calling from is named mandys_extract_ground_truth_twitter.py -- I was lazy and recycled the twitter extraction.)