juuli / ParallelFDTD

A Parallel FDTD solver for room acoustics
MIT License
51 stars 18 forks source link

Compilation with new CUDA version #1

Open Jearde opened 4 years ago

Jearde commented 4 years ago

Hello, I would like to try and compare this software to other RIR simulations as a preparation for my master thesis. Because pf the age of this software, I'm struggling to compile it on a newer system. My current attempts were:

I also tried to use the binary from releases but wasn't successful even with trying to install CUDA 5.5. The libcudart.so.5.5 cannot be found.

So far I was able to:

The compilation error I get is:

Building NVCC (Device) object src/CMakeFiles/libParallelFDTD.dir/kernels/libParallelFDTD_generated_kernels3d.cu.o
CMake Warning (dev) at libParallelFDTD_generated_kernels3d.cu.o.cmake:107:
  Syntax Warning in cmake code at column 85

  Argument not separated from preceding token by whitespace.
This warning is for project developers.  Use -Wno-dev to suppress it.

cc: error: (: No such file or directory
cc: error: (: No such file or directory
cc: error: noinline: No such file or directory
cc: error: ): No such file or directory
cc: error: ): No such file or directory
cc: error: ': No such file or directory
CMake Error at libParallelFDTD_generated_kernels3d.cu.o.cmake:219 (message):
  Error generating
  /home/ParallelFDTD/build/src/CMakeFiles/libParallelFDTD.dir/kernels/./libParallelFDTD_generated_kernels3d.cu.o

src/CMakeFiles/libParallelFDTD.dir/build.make:126: recipe for target 'src/CMakeFiles/libParallelFDTD.dir/kernels/libParallelFDTD_generated_kernels3d.cu.o' failed
make[2]: *** [src/CMakeFiles/libParallelFDTD.dir/kernels/libParallelFDTD_generated_kernels3d.cu.o] Error 1
CMakeFiles/Makefile2:89: recipe for target 'src/CMakeFiles/libParallelFDTD.dir/all' failed
make[1]: *** [src/CMakeFiles/libParallelFDTD.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Dockerfile:

ARG BASE_CONTAINER=nvidia/cudagl:10.2-devel

FROM $BASE_CONTAINER

LABEL maintainer="Parallel FDTD <example@mail.com>"

RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    cmake \
    libboost-all-dev \ 
    freeglut3-dev \
    libglew-dev \
    unzip \
    python3 \
    python3-pip \
    wget \
    gdebi \
    git

ADD . /home/ParallelFDTD

RUN cd /home/ParallelFDTD/Voxelizer && mkdir build && cd build && cmake ../ && make && make install
RUN cd /home/ParallelFDTD && cp -r /home/ParallelFDTD/Voxelizer /home/ParallelFDTD/src/Voxelizer
RUN cd /home/ParallelFDTD/Voxelizer/build/lib && mkdir -p /home/ParallelFDTD/lib/ && cp libVoxelizer.a  /home/ParallelFDTD/lib/libVoxelizer.a
RUN cd /home/ParallelFDTD && mkdir build
RUN cd /home/ParallelFDTD/build && cmake ../ -DBUILD_TESTS=on -DBUILD_PYTHON=on
# RUN cd /home/ParallelFDTD/build && make && make install

WORKDIR /home/ParallelFDTD

CMakeLists.txt Changes:

set( CUDA_NVCC_FLAGS_RELEASE ${CUDA_NVCC_FLAGS_RELEASE}; 
                            -gencode arch=compute_30,code=sm_30 
                            -gencode arch=compute_35,code=sm_35
                            -gencode arch=compute_60,code=sm_60
                            -gencode arch=compute_75,code=sm_75
                             )

set( CUDA_NVCC_FLAGS_DEBUG ${CUDA_NVCC_FLAGS_DEBUG}; 
                            -gencode arch=compute_30,code=sm_30 
                            -gencode arch=compute_35,code=sm_35
                            -gencode arch=compute_60,code=sm_60
                            -gencode arch=compute_75,code=sm_75
                             )

I hope that someone can help me despite the age of this project.

schmiph2 commented 4 years ago

Hi Jearde

I'm also interested in compiling this on a new system. Nice idea to put it in a docker. Were you able to solve the compilation error?

schmiph2 commented 4 years ago

I think the first problem is the argument -DBOOST_NOINLINE='__attribute__ ((noinline))' in line https://github.com/juuli/ParallelFDTD/blob/ba8fbf14b832c7f4936c952f909c5c47c8056877/CMakeLists.txt#L67 When I remove the argument, the libParallelFDTD and parallelFDTD are built. But there are still some errors in the python lib and the tests...

Jearde commented 4 years ago

Hi Jearde

I'm also interested in compiling this on a new system. Nice idea to put it in a docker. Were you able to solve the compilation error?

I wasn't able to compile it and had to abound using this program for my current project. Anyway, I am still interested in using it on a new platform in a Docker container.

I think the first problem is the argument -DBOOST_NOINLINE='__attribute__ ((noinline))' in line https://github.com/juuli/ParallelFDTD/blob/ba8fbf14b832c7f4936c952f909c5c47c8056877/CMakeLists.txt#L67

When I remove the argument, the libParallelFDTD and parallelFDTD are built. But there are still some errors in the python lib and the tests...

Have you solved this issue, too, now?