Merge branch 'master' into release/2.x

This commit is contained in:
Guilhem Lavaux 2021-04-20 18:26:08 +02:00
commit 5fa5200341
10 changed files with 75 additions and 9 deletions

View file

@ -64,7 +64,6 @@ macro(configure_exec _source _destdir _destfile)
endmacro(configure_exec) 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_build.cmake)
include(${CMAKE_SOURCE_DIR}/external/external_cosmotool.cmake) include(${CMAKE_SOURCE_DIR}/external/external_cosmotool.cmake)
include(${CMAKE_SOURCE_DIR}/external/external_python_build.cmake) include(${CMAKE_SOURCE_DIR}/external/external_python_build.cmake)

View file

@ -47,10 +47,43 @@ is required by scipy and we have not decided to bundle it with VIDE at the momen
Quick Start Guide 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. The VIDE tools are all packaged in the `vide` package.

View file

@ -82,7 +82,7 @@ public:
simu->Pos[k] = new float[allocated]; simu->Pos[k] = new float[allocated];
simu->Vel[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 *uniqueID = new long[allocated];
long *index = new long[allocated]; long *index = new long[allocated];

View file

@ -203,7 +203,7 @@ public:
} }
if (load_flags & NEED_GADGET_ID) if (load_flags & NEED_GADGET_ID)
{ {
d->Id = new long[numPartToLoad]; d->Id = new int64_t[numPartToLoad];
SETUP_READ("ident", d->Id); SETUP_READ("ident", d->Id);
} }
#undef SETUP_READ #undef SETUP_READ

1
dummy_extension/empty.c Normal file
View file

@ -0,0 +1 @@
void _vide_empty_symbol_for_osx() {}

View file

@ -6,7 +6,8 @@ OPTION(SDF_SUPPORT "Set to Yes to activate support for SDF" ON)
IF(ENABLE_OPENMP) IF(ENABLE_OPENMP)
IF (NOT OPENMP_FOUND) 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(NOT OPENMP_FOUND)
ENDIF(ENABLE_OPENMP) ENDIF(ENABLE_OPENMP)
@ -46,7 +47,7 @@ ELSE(INTERNAL_BOOST)
ENDIF(INTERNAL_BOOST) ENDIF(INTERNAL_BOOST)
IF(INTERNAL_QHULL) 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) mark_as_advanced(QHULL_URL)
ENDIF(INTERNAL_QHULL) ENDIF(INTERNAL_QHULL)

32
external/patch_sdf vendored
View file

@ -62,3 +62,35 @@
{ {
int int_value; int int_value;
float float_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 <stdarg.h>
#include <inttypes.h>
#include <float.h>
--- 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;

BIN
external/qhull-2012.1-src.tgz vendored Normal file

Binary file not shown.

View file

@ -28,7 +28,7 @@ VOID_GSL=os.environ.get('VOID_GSL')
setup( setup(
name='vide', name='vide',
version='1.0', version='1.0',
cmdclass = {'build_ext': build_ext}, # cmdclass = {'build_ext': build_ext},
include_dirs = [np.get_include()], include_dirs = [np.get_include()],
packages= packages=
['vide','vide.backend','vide.apTools', 'vide.voidUtil', ['vide','vide.backend','vide.apTools', 'vide.voidUtil',

View file

@ -41,7 +41,7 @@ class CMakeExtension(Extension):
doesn't try to build your sources for you 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) super().__init__(name = name, sources = sources)