diff --git a/CMakeLists.txt b/CMakeLists.txt index 089d9f9..c1044ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,7 +64,6 @@ macro(configure_exec _source _destdir _destfile) endmacro(configure_exec) -include(${CMAKE_SOURCE_DIR}/external/base_external.cmake) include(${CMAKE_SOURCE_DIR}/external/external_build.cmake) include(${CMAKE_SOURCE_DIR}/external/external_cosmotool.cmake) include(${CMAKE_SOURCE_DIR}/external/external_python_build.cmake) diff --git a/README.md b/README.md index 0ff0b5b..0fa877c 100644 --- a/README.md +++ b/README.md @@ -47,10 +47,43 @@ is required by scipy and we have not decided to bundle it with VIDE at the momen Quick Start Guide ----------------- -After installing the package with `python3 setup.py install --user`, you can execute +It is generally advised to create a python3 virtual environment. This can be achieved as follows +``` +python3 -m venv --system-site-packages $PLACE_OF_VENV +source $PLACE_OF_VENV/bin/activate +``` +where `$PLACE_OF_VENV` is where you decide to put your environment on your +harddrive (e.g. `$HOME/my_venv`). + +Note: on OSX there are some difficulties to use the native clang compiler. +Please use a brew installed compiler like GCC. +``` +brew install gcc +export CC=/usr/local/bin/gcc-10 +export CXX=/usr/local/bin/g++-10 +``` +The gcc-10 is of course dependent on the version that was installed by brew. + +After this step you may start the build process +``` +python3 setup.py build +``` + +It will take a lot of time. It may also download python packages that you miss +on your system. On BigSur some of them fail to compile by default. + +After installing the package with +```python3 setup.py install +``` + +To test that the package is indeed installed you can execute ``` -python3 -m void_pipeline your_config_file.py +python3 -m void_pipeline +``` +which will state +``` +Usage: ./generateCatalog.py parameter_file.py ``` The VIDE tools are all packaged in the `vide` package. diff --git a/c_tools/mock/loaders/multidark_loader.cpp b/c_tools/mock/loaders/multidark_loader.cpp index fbe26ba..e3f90de 100644 --- a/c_tools/mock/loaders/multidark_loader.cpp +++ b/c_tools/mock/loaders/multidark_loader.cpp @@ -82,7 +82,7 @@ public: simu->Pos[k] = new float[allocated]; simu->Vel[k] = new float[allocated]; } - simu->Id = new long[allocated]; + simu->Id = new int64_t[allocated]; long *uniqueID = new long[allocated]; long *index = new long[allocated]; diff --git a/c_tools/mock/loaders/sdf_loader.cpp b/c_tools/mock/loaders/sdf_loader.cpp index dd8a8d9..8c47b49 100644 --- a/c_tools/mock/loaders/sdf_loader.cpp +++ b/c_tools/mock/loaders/sdf_loader.cpp @@ -203,7 +203,7 @@ public: } if (load_flags & NEED_GADGET_ID) { - d->Id = new long[numPartToLoad]; + d->Id = new int64_t[numPartToLoad]; SETUP_READ("ident", d->Id); } #undef SETUP_READ diff --git a/dummy_extension/empty.c b/dummy_extension/empty.c new file mode 100644 index 0000000..58efc31 --- /dev/null +++ b/dummy_extension/empty.c @@ -0,0 +1 @@ +void _vide_empty_symbol_for_osx() {} diff --git a/external/external_build.cmake b/external/external_build.cmake index ac895ca..6dbf174 100644 --- a/external/external_build.cmake +++ b/external/external_build.cmake @@ -6,7 +6,8 @@ OPTION(SDF_SUPPORT "Set to Yes to activate support for SDF" ON) IF(ENABLE_OPENMP) IF (NOT OPENMP_FOUND) - MESSAGE(FATAL_ERROR "No known compiler option for enabling OpenMP") + MESSAGE(WARNING "No known compiler option for enabling OpenMP") + SET(ENABLE_OPENMP FALSE) ENDIF(NOT OPENMP_FOUND) ENDIF(ENABLE_OPENMP) @@ -46,7 +47,7 @@ ELSE(INTERNAL_BOOST) ENDIF(INTERNAL_BOOST) IF(INTERNAL_QHULL) - SET(QHULL_URL "http://www.qhull.org/download/qhull-2012.1-src.tgz" CACHE STRING "URL to download QHull from") + SET(QHULL_URL "${CMAKE_SOURCE_DIR}/external/qhull-2012.1-src.tgz" CACHE STRING "URL to download QHull from") mark_as_advanced(QHULL_URL) ENDIF(INTERNAL_QHULL) diff --git a/external/patch_sdf b/external/patch_sdf index b41345c..9a85737 100644 --- a/external/patch_sdf +++ b/external/patch_sdf @@ -62,3 +62,35 @@ { int int_value; float float_value; +--- SDF-parse.c.old 2021-04-15 15:44:40.000000000 +0200 ++++ SDF-parse.c 2021-04-15 15:45:48.000000000 +0200 +@@ -87,8 +87,6 @@ + #define LEXERROR 265 + + +- +- + /* Copy the first part of user declarations. */ + #line 1 "SDF-parse.y" + +@@ -117,6 +115,9 @@ + #define yydebug SDFyydebug + #define yynerrs SDFyynerrs + ++extern int yylex(void); ++extern int Msg_on(int level); ++ + #include + #include + #include +--- SDFfuncs.c.old 2014-06-04 07:22:26.000000000 +0200 ++++ SDFfuncs.c 2021-04-15 15:46:29.000000000 +0200 +@@ -44,6 +44,8 @@ + char SDFerrstring[256]; + extern int SDFyyparse(void); + ++extern void Msg_on(int); ++ + int SDFdebug(int level) + { + sdf_debug = level; diff --git a/external/qhull-2012.1-src.tgz b/external/qhull-2012.1-src.tgz new file mode 100644 index 0000000..a47249b Binary files /dev/null and b/external/qhull-2012.1-src.tgz differ diff --git a/python_tools/setup.py b/python_tools/setup.py index 600b1c6..a8ba0bf 100644 --- a/python_tools/setup.py +++ b/python_tools/setup.py @@ -28,7 +28,7 @@ VOID_GSL=os.environ.get('VOID_GSL') setup( name='vide', version='1.0', - cmdclass = {'build_ext': build_ext}, +# cmdclass = {'build_ext': build_ext}, include_dirs = [np.get_include()], packages= ['vide','vide.backend','vide.apTools', 'vide.voidUtil', diff --git a/setup.py b/setup.py index 67e712f..258b563 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ class CMakeExtension(Extension): doesn't try to build your sources for you """ - def __init__(self, name, sources=[]): + def __init__(self, name, sources=["dummy_extension/empty.c"]): super().__init__(name = name, sources = sources)