22
33set -e
44
5- BRANCH=develop
5+ BRANCH=master
66URL=https://github.com/PaNOSC-ViNYL/SimEx/archive/${BRANCH} .zip
77
88cd /opt
99
1010wget $URL
1111unzip ${BRANCH} .zip
1212rm ${BRANCH} .zip
13- cd simex_platform -${BRANCH}
13+ cd SimEx -${BRANCH}
1414
1515export PATH=/opt/miniconda/bin:$PATH
16- export HDF5_ROOT=/opt/miniconda
16+ # export HDF5_ROOT=/opt/miniconda
1717
1818echo " ###### DONE unzip ${BRANCH} .zip"
1919
2020conda install -c intel mkl
21+ export MKLROOT=/opt/miniconda
22+
23+ # This is a dirty hack
24+ pushd ${MKLROOT} /lib
25+ ln -s . intel64
26+ popd
2127
2228echo " ##### DONE install mkl"
2329
24- ROOT_DIR=/opt/simex_platform
25- mkdir -p $ROOT_DIR
30+ # ROOT_DIR=/opt/simex_platform
31+ # mkdir -p $ROOT_DIR
32+
33+ # PYPATH is necessary to facilitate the
34+ # install of sdf and s2e; otherwise the
35+ # modules are not installed outside of
36+ # the build tree -- dwebster.
37+ PYPATH=/opt/miniconda
38+
39+ CONDA_PREFIX=/opt/miniconda
40+ CONDA_BIN=` which conda`
41+ CONDA_BIN=${CONDA_BIN%/* }
42+ source ${CONDA_BIN%/* } /etc/profile.d/conda.sh
43+ INSTALL_PREFIX=$CONDA_PREFIX
44+ PYVERSION=` python -V | tr ' [:upper:]' ' [:lower:]' | tr -d ' ' `
45+ PYLIB=${PYVERSION% .* }
46+ DEVELOPER_MODE=ON
47+ export ZLIB_ROOT=$CONDA_PREFIX
48+ export LD_LIBRARY_PATH=$CONDA_PREFIX /lib:$LD_LIBRARY_PATH
2649
2750# Create new build dir and cd into it.
2851
@@ -32,20 +55,27 @@ cd build
3255# Uncomment the next line and specify the install dir for a custom user install.
3356# cmake -DCMAKE_INSTALL_PREFIX=$ROOT_DIR $ROOT_DIR
3457# Uncomment the next line and specify the install dir for a developer install.
35- cmake -DXCSITPhotonDetector=OFF \
36- -DGAPDPhotonDiffractor=OFF \
37- -DCrystFELPhotonDiffractor=OFF \
58+ cmake -DUSE_XCSITPhotonDetector=OFF \
59+ -DUSE_GAPDPhotonDiffractor=OFF \
60+ -DUSE_CrystFELPhotonDiffractor=ON \
61+ -DUSE_SingFELPhotonDiffractor=ON \
3862 -DINSTALL_TESTS=OFF \
3963 -DSRW_OPTIMIZED=ON \
40- -DDEVELOPER_INSTALL=OFF \
41- -DCMAKE_INSTALL_PREFIX=$ROOT_DIR \
42- $ROOT_DIR \
43- ..
64+ -DDEVELOPER_INSTALL=$DEVELOPER_MODE \
65+ -DCMAKE_INSTALL_PREFIX=/opt/miniconda \
66+ -DUSE_sdf=ON \
67+ -DUSE_s2e=ON \
68+ -DUSE_S2EReconstruction_EMC=ON \
69+ -DUSE_S2EReconstruction_DM=ON \
70+ -DUSE_wpg=ON \
71+ -DUSE_GenesisPhotonSource=ON \
72+ -DUSE_FEFFPhotonInteractor=ON \
73+ -DCMAKE_INSTALL_LOCAL_ONLY=0 \
74+ ..
4475
45- chmod og+rwX -R $ROOT_DIR
4676
4777# Build the project.
48- make
78+ make -j12
4979
5080echo " ######## done make"
5181
@@ -55,18 +85,10 @@ cd ../..
5585
5686echo " ####### done make install"
5787
58- # rm -rf simex_platform-${BRANCH}
59-
60-
61- # remove tests?
62- # rm -rf $ROOT_DIR/Tests
6388
64- echo " source /opt/simex_platform/bin/simex_vars.sh" > /etc/profile.d/scripts-simex.sh && \
89+ cp /opt/SimEx-${BRANCH} /build/simex_vars.sh ${CONDA_PREFIX} /bin
90+ echo " source ${CONDA_PREFIX} /bin/simex_vars.sh" > /etc/profile.d/scripts-simex.sh && \
6591 chmod 755 /etc/profile.d/scripts-simex.sh
6692
67-
6893echo " export PYFAI_TESTIMAGES=/tmp" >> /etc/profile.d/scripts-simex.sh
6994
70-
71- chmod og+rwX -R /opt/simex_platform
72-
0 commit comments