Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ testData
test_data/psf.dv
test_data/GPUsirecon/*
test_data/proc.dv
IVE
lapack
*dist
fftw2
cmake_build

src/IVE
_test.sh
src/cudaSirecon/cudasireconConfig.h
src/cudasireconConfig.h
37 changes: 0 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,40 +258,3 @@ conda env create -f environment-windows.yml
conda activate simbuild
bld.bat # see bld.bat for cmake details
```

### Building with MRC support

The IVE/Priism libraries (for MRC/DV support), are not distributed with this
source code and must be acquired seperately from UCSF. Place them in a folder
called `IVE` at the top level of the source folder (same folder as the
cudaSirecon folder). It should minimally have the following files and folders
(example shown for linux, use `.a` or `.lib` as necessary for osx or windows)

then build with `cmake -DBUILD_MRC=ON ....`

<details>

<summary>required IVE folder structure</summary>

```
cudasirecon
├── ...
└── IVE/
├── darwin64/
│ ├── INCLUDE/
│ └── LIB/
├── linux64/
│ ├── INCLUDE/
│ │ ├── IM.h
│ │ ├── IMInclude.h
│ │ └── IWApiConstants.h
│ └── LIB/
│ ├── libimlib.a
│ └── libive.a
└── win64/
├── INCLUDE/
└── LIB/
```

</details>

6 changes: 3 additions & 3 deletions VStutio_project/VStutio_project.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,16 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(CUDA_PATH)/include;../Buffers;C:/libtiff;../IVE/win64/INCLUDE;C:/Boost/boost_1_55_0</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(CUDA_PATH)/include;../Buffers;C:/libtiff;C:/Boost/boost_1_55_0</AdditionalIncludeDirectories>
<DebugInformationFormat>None</DebugInformationFormat>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>C:\Boost\boost_1_55_0\lib;$(CUDA_PATH)\lib\x64;C:\libtiff;..\lapack\win64;..\IVE\win64\lib;$(SolutionDir)</AdditionalLibraryDirectories>
<AdditionalDependencies>cuda.lib;cudart.lib;cufft.lib;libtiff.lib;liblapack.lib;libblas.lib;libimlib.lib;libive.lib;Buffers.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\Boost\boost_1_55_0\lib;$(CUDA_PATH)\lib\x64;C:\libtiff;..\lapack\win64;$(SolutionDir)</AdditionalLibraryDirectories>
<AdditionalDependencies>cuda.lib;cudart.lib;cufft.lib;libtiff.lib;liblapack.lib;libblas.lib;Buffers.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<CudaCompile>
<TargetMachinePlatform>64</TargetMachinePlatform>
Expand Down
22 changes: 9 additions & 13 deletions bld.bat
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
del /Q cmake_build
@REM rmdir /S /Q cmake_build

@REM if not exist src\IVE\ (
@REM powershell -Command "Invoke-WebRequest https://www.dropbox.com/s/2twvw0go3dr3aim/IVE.zip -OutFile IVE.zip"
@REM powershell -Command "Expand-Archive IVE.zip -DestinationPath src\"
@REM del IVE.zip )
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"

mkdir cmake_build
@REM mkdir cmake_build
cd cmake_build

cmake -G Ninja ^
-DBUILD_MRC=ON ^
-DBUILD_OTF_VIEWER=OFF ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX="%CONDA_PREFIX%/Library" ^
../src
@REM cmake -G Ninja ^
@REM -DBUILD_OTF_VIEWER=OFF ^
@REM -DCMAKE_BUILD_TYPE=Release ^
@REM -DCMAKE_INSTALL_PREFIX="%CONDA_PREFIX%/Library" ^
@REM ../src

ninja
ninja install
@REM ninja install
13 changes: 2 additions & 11 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
rm -rf cmake_build

if [ ! -d "src/IVE" ]
then
wget src/ https://www.dropbox.com/s/2twvw0go3dr3aim/IVE.zip
unzip -o -d src IVE.zip
rm IVE.zip
fi


mkdir cmake_build
cd cmake_build

CXXFLAGS="$CXXFLAGS -Wfatal-errors -Wno-deprecated-declarations"
cmake ${CMAKE_ARGS} \
-DBUILD_MRC=ON \
-DBUILD_OTF_VIEWER=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
../src

make -j 2
make install
make -j 4
# make install
35 changes: 0 additions & 35 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@
# includes the nvcc compiler For windows, you will need to install the CUDA
# toolkit manually
#
# 1. MRC/DV support (optional) If you want to build with MRC support add the IVE
# libraries to the src directory with the following paths: For Linux:
# src/IVE/linux64/INCLUDE src/IVE/linux64/LIB For Windows:
# src/IVE/win64/INCLUDE src/IVE/win64/LIB
#
# If you DON'T want to build with MRC or do not have access to the IVE libraries
# please run cmake with the `-DBUILD_MRC=OFF` option
#
# To build the otfviewer, use `-DBUILD_OTF_VIEWER=ON`
#
# 1. run build.sh (linux) or bld.bat (windows) inspect those scripts for more
Expand Down Expand Up @@ -81,33 +73,6 @@ endif(WIN32)
message(STATUS "CUDA_NVCC_FLAGS: " ${CUDA_NVCC_FLAGS})


if(BUILD_MRC OR BUILD_OTF_VIEWER)
message(STATUS "** Building WITH mrc support **")

if(WIN32)
set(PLATFORM win64)
else()
set(PLATFORM linux64)
endif(WIN32)

set(PRIISM_LIB_PATH "${CMAKE_SOURCE_DIR}/IVE/${PLATFORM}/LIB")
set(PRIISM_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/IVE/${PLATFORM}/INCLUDE")
include_directories(${PRIISM_INCLUDE_PATH})
link_directories(${PRIISM_LIB_PATH})

find_library(
IMLIB
NAMES imlib libimlib
PATHS ${PRIISM_LIB_PATH} REQUIRED)
find_library(
IVELIB
NAMES ive libive
PATHS ${PRIISM_LIB_PATH} REQUIRED)
add_definitions(-DMRC)
else()
message(STATUS "** Building WITHOUT mrc support **")
endif()

add_subdirectory(Buffers)
add_subdirectory(cudaSirecon)
add_subdirectory(otf)
5 changes: 1 addition & 4 deletions src/cudaSirecon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ include_directories(
"${CMAKE_CURRENT_SOURCE_DIR}/../Buffers")

find_package(LAPACK REQUIRED)
message(STATUS "IMLIB: " ${IMLIB})
message(STATUS "IVELIB: " ${IVELIB})
message(STATUS "LEG_STDIO: " ${LEG_STDIO})
message(STATUS "LAPACK_FOUND: " ${LAPACK_FOUND})

Expand All @@ -23,8 +21,7 @@ target_link_libraries(
${BOOST_LIBRARIES}
${Boost_PROGRAM_OPTIONS_LIBRARY}
${Boost_FILESYSTEM_LIBRARY}
${IMLIB}
${IVELIB})
)


# cudasirecon executable file
Expand Down
2 changes: 0 additions & 2 deletions src/cudaSirecon/SIM_reconstructor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ class SIM_Reconstructor {
int m_zoffset;
po::options_description m_progopts;
po::variables_map m_varsmap;
#ifdef MRC
IW_MRC_HEADER m_in_out_header;
#endif
bool m_OTFfile_valid;

int m_argc;
Expand Down
Loading