veg / hyphy

HyPhy: Hypothesis testing using Phylogenies
http://www.hyphy.org
Other
201 stars 68 forks source link

Issues with install #1588

Closed wbender1 closed 1 year ago

wbender1 commented 1 year ago

I have tried two methods of installing hyphy but cannot get the program to open or run. I have used conda to install hyphy, but when I try and open an interactive session it gives an error. I have also tried to build from the source but I believe the compiler is failing to build properly.

Command line attempt to run via conda install wbender@wills-urmc-mbp hyphy-2.5.49 % hyphy -i zsh: illegal hardware instruction hyphy -i

Command line attempt to build from source wbender@wills-urmc-mbp hyphy-2.5.49 % cmake . Set default compiler flags to -fsigned-char -O3 -D_FORTIFY_SOURCE=2 -Wall -- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) -- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) -- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND) /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/lib/libcurl.tbd -- Could NOT find MPI_C (missing: MPI_C_LIB_NAMES MPI_C_HEADER_DIR MPI_C_WORKS) -- Could NOT find MPI_CXX (missing: MPI_CXX_LIB_NAMES MPI_CXX_HEADER_DIR MPI_CXX_WORKS) -- Could NOT find MPI (missing: MPI_C_FOUND MPI_CXX_FOUND) -- Configuring done -- Generating done -- Build files have been written to: /Users/wbender/hyphy-2.5.49 (base) wbender@wills-urmc-mbp hyphy-2.5.49 % make MP [ 4%] Building CXX object CMakeFiles/hyphy.dir/src/core/likefunc.cpp.o /Users/wbender/hyphy-2.5.49/src/core/likefunc.cpp:250:13: error: no member named 'SetThreadCount' in '_LikelihoodFunction' lf->SetThreadCount(MIN(nt, hy_global::system_CPU_count)); ~~ ^ 1 error generated. make[3]: [CMakeFiles/hyphy.dir/src/core/likefunc.cpp.o] Error 1 make[2]: [CMakeFiles/hyphy.dir/all] Error 2 make[1]: [CMakeFiles/MP.dir/rule] Error 2 make: [MP] Error 2

stevenweaver commented 1 year ago

Dear @wbender1 ,

Can you please pull down the latest version from GitHub (2.5.50) and try compiling again? I've found that if OpenMP isn't installed on a user's system, then SetThreadCount is not defined. I've defined a dummy function so that hyphy will run under such circumstances (as it did before 2.5.48).

Best, Steven

wbender1 commented 1 year ago

I tried to compile version 2.5.50 but it is still unable to find OpenMP. I appreciate you looking into this for me!

wbender@wills-urmc-mbp hyphy % cmake . -- The C compiler identification is AppleClang 14.0.0.14000029 -- The CXX compiler identification is AppleClang 14.0.0.14000029 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test HAVE_AVX_EXTENSIONS -- Performing Test HAVE_AVX_EXTENSIONS - Failed -- Performing Test HAVE_SSE4_EXTENSIONS -- Performing Test HAVE_SSE4_EXTENSIONS - Failed -- Performing Test HAVE_NEON_EXTENSIONS -- Performing Test HAVE_NEON_EXTENSIONS - Success Set default compiler flags to -fsigned-char -O3 -D_FORTIFY_SOURCE=2 -Wall -- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) -- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) -- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND) -- Found CURL: /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/lib/libcurl.tbd (found version "7.85.0")
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/lib/libcurl.tbd -- Found ZLIB: /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/lib/libz.tbd (found suitable version "1.2.11", minimum required is "1.2.9") -- Could NOT find MPI_C (missing: MPI_C_LIB_NAMES MPI_C_HEADER_DIR MPI_C_WORKS) -- Could NOT find MPI_CXX (missing: MPI_CXX_LIB_NAMES MPI_CXX_HEADER_DIR MPI_CXX_WORKS) -- Could NOT find MPI (missing: MPI_C_FOUND MPI_CXX_FOUND) -- Configuring done -- Generating done -- Build files have been written to: /Users/wbender/hyphy

stevenweaver commented 1 year ago

Dear @wbender1,

Yes but it will still compile.

If you want OpenMP support, try the following.

On M1 or M2 Mac, follow the instructions here to install libomp. https://github.com/microsoft/LightGBM/issues/4229#issue-867528353

On an Intel-based Mac, simply

brew install libomp

Best, Steven

github-actions[bot] commented 1 year ago

Stale issue message