Skip to content

Commit 10655f3

Browse files
authored
Merge pull request #228 from PaNOSC-ViNYL/develop
pre-release v0.5.0-alpha
2 parents d4659df + 54c17f1 commit 10655f3

File tree

258 files changed

+5243
-304608
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

258 files changed

+5243
-304608
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
*.pyc
22
*.pyo
3-
**.swp
3+
.*.*.swp
44
bin
55
include/
66
!Sources/doc/source/include
@@ -18,3 +18,6 @@ deploy_rsa.enc
1818
*.bak
1919
*.code-workspace
2020
*.root
21+
.ropeproject
22+
tags
23+
Tests/python/unittest/TestFiles/

.travis.yml

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
11
language: python
22
python:
3+
- "3.5"
34
- "3.6"
5+
- "3.7"
6+
- "3.8"
7+
- "nightly"
48

59
sudo: required
6-
dist: trusty
10+
dist: xenial
711

812
matrix:
913
allow_failures:
14+
- python: "3.5"
15+
- python: "3.6"
1016
- python: "nightly"
1117

1218
env:
1319
global:
1420
- C_INCLUDE_PATH=/usr/lib/openmpi/include
1521
- WITH_CUDA: true
16-
- DEPLOY_DOCS_FOR_PYTHON: '3.5'
17-
- TRIGGER_DOCKER_FOR_PYTHON: '3.5'
22+
- DEPLOY_DOCS_FOR_PYTHON: '3.8'
23+
- TRIGGER_DOCKER_FOR_PYTHON: '3.8'
1824
- SIMEX_VERBOSE=MPI:PYTHON
1925

2026
addons:
@@ -50,11 +56,8 @@ cache:
5056
# see https://github.com/travis-ci/travis-ci/issues/3634
5157
before_install:
5258
- mkdir -p $HOME/bin
53-
- wget https://github.com/github/git-lfs/releases/download/v1.1.2/git-lfs-linux-amd64-1.1.2.tar.gz
54-
- tar xvfz git-lfs-linux-amd64-1.1.2.tar.gz
55-
- mv git-lfs-1.1.2/git-lfs $HOME/bin/git-lfs
56-
- export PATH=$PATH:$HOME/bin/
57-
#- bash $TRAVIS_BUILD_DIR/TravisCI/pyqt.sh ## only needed for python v<3.5
59+
- export Python_ROOT_DIR=$(dirname $(dirname $(which python)))
60+
5861

5962
before_script:
6063
- python --version

CMake/FindPythonLibs.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ set(CMAKE_FIND_FRAMEWORK LAST)
9090

9191
set(_PYTHON1_VERSIONS 1.6 1.5)
9292
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
93-
set(_PYTHON3_VERSIONS 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
93+
set(_PYTHON3_VERSIONS 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
9494

9595
if(PythonLibs_FIND_VERSION)
9696
if(PythonLibs_FIND_VERSION_COUNT GREATER 1)

CMakeLists.txt

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required (VERSION 2.8)
1+
cmake_minimum_required (VERSION 3.12)
22

33
project (SIMEX)
44

@@ -8,35 +8,38 @@ include(CMakeDependentOption)
88
if ("${SIMEX_SOURCE_DIR}" STREQUAL "${SIMEX_BINARY_DIR}")
99
message(FATAL_ERROR
1010
"SIMEX requires an out of source Build. "
11-
"Please create a separate binary directory and run CMake there.")
11+
"Please create a separate build/ directory and run CMake there.")
1212
endif()
1313

1414
# set path for modules
1515
set (SIMEX_CMAKE_DIR "${SIMEX_SOURCE_DIR}/CMake")
1616
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${SIMEX_CMAKE_DIR})
1717

18+
# Build variant.
1819
option (DEVELOPER_INSTALL "Install modules only, do not install SimEx files" OFF)
19-
2020
option (INSTALL_TESTS "Install tests" ON)
21+
option (PACKAGE_MAKE "Use this option to create linux packages" OFF)
2122

22-
# options required for building the py_detector_interface module:
23+
# Options required for building the py_detector_interface module:
2324
# XCSITPotonDetector
2425
option(PY_DETECTOR_INTERFACE_DEBUG "
2526
-DPY_DETECTOR_INTERFACE_DEBUG=default: OFF | ON"
2627
)
2728

2829
### PYTHON
29-
FIND_PACKAGE(PythonInterp 3.5 REQUIRED)
30+
FIND_PACKAGE(Python
31+
3.5
32+
REQUIRED
33+
)
3034

3135
set (LIBDIR lib)
3236
set (INCLUDEDIR include)
3337
set (BINDIR bin)
34-
set (PYPATH ${LIBDIR}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
38+
set (PYPATH ${LIBDIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages)
3539
message( "PYPATH=${PYPATH}" )
3640

3741
set (DOCDIR share/doc)
3842

39-
option (PACKAGE_MAKE "Use this option to create linux packages" OFF)
4043
if (PACKAGE_MAKE)
4144
set (TESTSDIR share/simex/Tests)
4245
else()
@@ -60,15 +63,15 @@ message (STATUS "************************ checking python dependencies *********
6063
add_subdirectory (Sources)
6164

6265
#By default all modules are included/excluded depending on this flag.
63-
#If a flag: USE_${module_name} is passed, this will overwrite teh default.
66+
#If a flag: USE_${module_name} is passed, this will overwrite the default.
6467
#For example:
6568
# [De-]activate all modules:
6669
# cmake -DUSE_MODULES_DEFAULT=[OFF]ON [...]
6770
# Activate a single module:
6871
# cmake -DUSE_MODULES_DEFAULT=OFF -DUSE_wpg=ON [...]
6972
# Deactivate a single module:
7073
# cmake -DUSE_MODULES_DEFAULT=ON -DUSE_wpg=OFF [...]
71-
option(USE_MODULES_DEFAULT "Default to include/exclude a module" ON)
74+
option(USE_MODULES_DEFAULT "Default to include/exclude all modules" OFF)
7275
message(STATUS "**************** Including modules (default "
7376
"${USE_MODULES_DEFAULT}) ****************")
7477
# find and add modules
@@ -137,6 +140,3 @@ endif()
137140

138141
# Add documentation target.
139142
add_subdirectory("Sources/doc")
140-
141-
# Add extra stuff, e.g. python libs not pip'able.
142-
add_subdirectory("Sources/python/extra")

Docker/simex/build_image

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
cp ../../requirements.txt .
22

3-
docker build --no-cache -t chuckie82/simex .
3+
docker build --no-cache -t cfgrote/simex .
44

Docker/simex/simex_install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -e
44

55
BRANCH=develop
6-
URL=https://github.com/eucall-software/simex_platform/archive/${BRANCH}.zip
6+
URL=https://github.com/PaNOSC-ViNYL/SimEx/archive/${BRANCH}.zip
77

88
cd /opt
99

Docker/simex_devel/simex_install_devel.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44

55

66
BRANCH=develop
7-
URL=https://github.com/eucall-software/simex_platform.git
7+
URL=https://github.com/PaNOSC-ViNYL/SimEx.git
88
cd /opt
99

1010
wget https://github.com/github/git-lfs/releases/download/v1.1.2/git-lfs-linux-amd64-1.1.2.tar.gz

Modules/Diffractors/CrystFELPhotonDiffractor/CMakeLists.txt

+10-7
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ MESSAGE("HDF5_VERSION= ${HDF5_VERSION}")
1818
MESSAGE("HDF5_LIBRARY_DIRS= ${HDF5_LIBRARY_DIRS}")
1919

2020
FIND_PACKAGE (GSL REQUIRED)
21-
21+
find_package(ZLIB)
22+
include_directories(${ZLIB_INCLUDE_DIRS})
23+
# TARGET_LINK_LIBRARIES( ${ZLIB_LIBRARIES})
2224
# This macro invokes the HDF5 compiler wrapper, it parses the output and
2325
# extracts the path where library are stored.
2426
# Usage:
@@ -97,17 +99,18 @@ IF(${_listlen} GREATER 1)
9799
ENDIF()
98100
# Add the project.
99101
ExternalProject_Add( crystfel
100-
URL http://www.desy.de/~twhite/crystfel/crystfel-0.6.3.tar.gz
101-
BUILD_IN_SOURCE 1
102-
#CONFIGURE_COMMAND ./configure --with-hdf5=${MYHDF5_LIBRARY_DIRS} --disable-gtk --disable-gtk-doc --disable-png
103-
CONFIGURE_COMMAND ./configure --with-hdf5=/usr/lib64 --disable-gtk --disable-gtk-doc --disable-png --prefix=${CMAKE_INSTALL_PREFIX}
102+
URL http://www.desy.de/~twhite/crystfel/crystfel-0.9.1.tar.gz
103+
BUILD_IN_SOURCE 0
104+
INSTALL_COMMAND ""
104105
)
105106

106107
# Install needed crystfel binaries, scripts and doc material.
108+
ExternalProject_Get_Property(crystfel BINARY_DIR)
107109
ExternalProject_Get_Property(crystfel SOURCE_DIR)
110+
ExternalProject_Get_Property(crystfel BINARY_DIR)
108111
#
109-
#install(PROGRAMS ${SOURCE_DIR}/src/pattern_sim DESTINATION ${BINDIR})
110-
#install(PROGRAMS ${SOURCE_DIR}/src/partial_sim DESTINATION ${BINDIR})
112+
install(PROGRAMS ${BINARY_DIR}/pattern_sim DESTINATION ${BINDIR})
113+
install(PROGRAMS ${BINARY_DIR}/partial_sim DESTINATION ${BINDIR})
111114
install(PROGRAMS ${SOURCE_DIR}/scripts/gen-sfs DESTINATION ${BINDIR})
112115
install(PROGRAMS ${SOURCE_DIR}/scripts/gen-sfs-ano DESTINATION ${BINDIR})
113116
install(PROGRAMS ${SOURCE_DIR}/scripts/gen-sfs-expand DESTINATION ${BINDIR})

Modules/Others/sdf/CMakeLists.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
INCLUDE(ExternalProject)
2+
3+
ExternalProject_Add(
4+
sdf
5+
GIT_REPOSITORY https://cfsa-pmw.warwick.ac.uk/SDF/SDF.git
6+
GIT_TAG 642be14ccae3bc7db53995f3fa8ea831bbbd3c6a
7+
GIT_SUBMODULES C utilities
8+
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PYPATH}
9+
)

Modules/Propagators/XFELPhotonPropagator/wpg/CMakeLists.txt Modules/Propagators/WavePropagator/wpg/CMakeLists.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ option (SRW_OPTIMIZED "Use optimized SRW library" TRUE)
44

55
ExternalProject_Add(
66
wpg
7-
URL https://github.com/eucall-software/WPG/archive/feature/openmp.zip
7+
# URL https://github.com/PaNOSC-ViNYL/WPG/archive/develop.zip
8+
URL https://github.com/samoylv/WPG/archive/develop.zip
89
PATCH_COMMAND ""
910
CONFIGURE_COMMAND ""
1011
CMAKE_COMMAND ""
1112
BUILD_IN_SOURCE 1
12-
BUILD_COMMAND make all
13+
BUILD_COMMAND OPENMP=omp make all
1314
INSTALL_COMMAND ""
1415
)
1516

Modules/Sources/GenesisPhotonSource/CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ INCLUDE(ExternalProject)
33
ExternalProject_Add(
44
ocelot
55
#URL https://github.com/eucall-software/ocelot/archive/dev_gen.zip
6-
URL https://github.com/ocelot-collab/ocelot/archive/dev_gen.zip
6+
#URL https://github.com/ocelot-collab/ocelot/archive/dev_gen.zip
7+
URL https://github.com/panosc-vinyl/ocelot/archive/dev_gen.zip
78
PATCH_COMMAND ""
89
INSTALL_COMMAND ""
910
CONFIGURE_COMMAND ""

README.md

+19-10
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
SIMEX PLATFORM
1+
SimEx
22
==================
33

4-
Software platform for simulation of advanced photon experiments.
4+
Software platform for **Sim**ulation of advanced photon **Ex**periments.
55

6-
[![Build Status](https://travis-ci.org/PaNOSC-ViNYL/SimEx.svg?branch=master)](https://travis-ci.org/PaNOSC-ViNYL/SimEx)
7-
[![Build Status](https://travis-ci.org/PaNOSC-ViNYL/SimEx.svg?branch=develop)](https://travis-ci.org/PaNOSC-ViNYL/SimEx)
6+
[![Build Status master](https://travis-ci.org/PaNOSC-ViNYL/SimEx.svg?branch=master)](https://travis-ci.org/github/panosc-vinyl/simex/branches)
7+
[![Build Status develop](https://travis-ci.org/PaNOSC-ViNYL/SimEx.svg?branch=develop)](https://travis-ci.org/github/panosc-vinyl/simex/branches)
88

99

10+
## Purpose of SimEx
1011

11-
12-
## Purpose of simex_platform
13-
14-
simex_platform is a python library to facilitate setup, execution, and analysis of
12+
SimEx is a python library to facilitate setup, execution, and analysis of
1513
simulations of experiments at advanced laser light sources.
1614
As an example, consider a molecule radiated by highly brilliant,
1715
ultrashort x-ray pulses such as delivered by an X-Ray Free Electron Laser (X-FEL).
@@ -23,7 +21,18 @@ field and detection of the latter. The platform provides slots and
2321
interfaces for the various simulation steps.
2422

2523
For more details (User Manual, installation instructions, examples, etc.),
26-
please visit the project's homepage at [https://eucall-software.github.io/simex_platform/](https://eucall-software.github.io/simex_platform/)
24+
please visit the project's homepage at https://panosc-vinyl.github.io/SimEx/
25+
26+
## Development
27+
28+
The size of this Github repository of SimEx is huge due to the historical TestFiles.
29+
30+
This command can clone only the newest develop branch to reduce the dowloading size:
31+
`git clone --depth 1 -b develop [email protected]:PaNOSC-ViNYL/SimEx.git`
32+
33+
Now the TestFiles are hosted at [Zenodo](https://zenodo.org/record/3750541#.X2R9DZMzZE5).
34+
The files can be downloaded with [this script](get_testdata.sh).
2735

2836
## Acknowledgements
29-
This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 654220.
37+
This project has received funding from the European Union’s Horizon 2020 research
38+
and innovation programme under grant agreement No 654220 and No 823852.

Sources/CMakeLists.txt

+9-17
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,19 @@
11
# find needed packages
22
include(FindPythonModules)
3+
find_python_module(Bio REQUIRED)
4+
find_python_module(Cython REQUIRED)
5+
find_python_module(dill REQUIRED)
36
find_python_module(h5py REQUIRED)
47
find_python_module(matplotlib REQUIRED)
5-
find_python_module(scipy REQUIRED)
68
find_python_module(mpi4py REQUIRED)
7-
find_python_module(periodictable REQUIRED)
8-
find_python_module(dill REQUIRED)
9-
find_python_module(Bio REQUIRED)
10-
find_python_module(argparse REQUIRED)
11-
find_python_module(Cython REQUIRED)
12-
find_python_module(datetime REQUIRED)
9+
find_python_module(openpmd_api REQUIRED)
1310
find_python_module(numpy REQUIRED)
14-
find_python_module(setuptools REQUIRED)
15-
find_python_module(pyFAI REQUIRED)
16-
find_python_module(numba REQUIRED)
11+
find_python_module(periodictable REQUIRED)
1712
find_python_module(pint REQUIRED)
18-
find_python_module(breathe REQUIRED)
19-
find_python_module(sqlalchemy REQUIRED)
20-
find_python_module(pyfftw REQUIRED)
21-
#find_python_module(PyQt4 REQUIRED)
22-
23-
#FIND_PACKAGE (LAPACK REQUIRED)
24-
#message (STATUS "***** LAPACK_LIBRARIES ${LAPACK_LIBRARIES} ****")
13+
find_python_module(pyFAI REQUIRED)
14+
find_python_module(scipy REQUIRED)
15+
find_python_module(setuptools REQUIRED)
16+
find_python_module(xraydb REQUIRED)
2517

2618
if (NOT DEVELOPER_INSTALL)
2719
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/python/ DESTINATION ${PYPATH}

Sources/doc/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
include(FindPythonModules)
2+
find_python_module(breathe REQUIRED)
3+
14
INCLUDE(ExternalProject)
25

36
#soft find package to set needed variable

0 commit comments

Comments
 (0)