Skip to content

Commit

Permalink
Merge pull request #194 from nlesc-dirac/spatialreg
Browse files Browse the repository at this point in the history
remove openmp
  • Loading branch information
SarodYatawatta authored Jan 30, 2024
2 parents 71a4eb0 + 767680e commit 410e0f7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Docker/ubuntu2004-cpu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ RUN git clone --depth 1 --branch master \
mkdir build-ubuntu && cd build-ubuntu && \
cmake -DCMAKE_INSTALL_PREFIX=/opt/sagecal \
-DBLA_VENDOR=OpenBLAS \
-DCMAKE_CXX_FLAGS="-O3 -fopenmp -ffast-math -lmvec -lm" \
-DCMAKE_C_FLAGS="-O3 -fopenmp -ffast-math -lmvec -lm" .. && \
-DCMAKE_CXX_FLAGS="-O3 -ffast-math -lmvec -lm" \
-DCMAKE_C_FLAGS="-O3 -ffast-math -lmvec -lm" .. && \
make -j4 && \
make install
RUN ls -alsrt /opt/sagecal && \
Expand Down
4 changes: 2 additions & 2 deletions Docker/ubuntu2004-cuda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ RUN git clone --depth 1 --branch master \
-DHAVE_CUDA=ON -DCUDA_NVCC_FLAGS="-gencode arch=compute_75,code=sm_75 -O3" \
-DNUM_GPU=2 -DBLA_VENDOR=OpenBLAS \
-DCMAKE_CXX_COMPILER=g++-8 -DCMAKE_C_COMPILER=gcc-8 \
-DCMAKE_CXX_FLAGS="-O3 -fopenmp -ffast-math -lmvec -lm" \
-DCMAKE_C_FLAGS="-O3 -fopenmp -ffast-math -lmvec -lm" .. && \
-DCMAKE_CXX_FLAGS="-O3 -ffast-math -lmvec -lm" \
-DCMAKE_C_FLAGS="-O3 -ffast-math -lmvec -lm" .. && \
make -j4 && \
make install
RUN ls -alsrt /opt/sagecal && \
Expand Down
4 changes: 2 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ The option *-DBLA_VENDOR=OpenBLAS* is to select OpenBLAS explicitly, but other B
To only build *libdirac* (shared) library, use *-DLIB_ONLY=1* option (also *-DBLA_VENDOR* to select the BLAS flavour). This library can be used with pkg-config using *lib/pkgconfig/libdirac.pc*. To build *libdirac* with GPU support, use *-DHAVE_CUDA=ON* with *-DLIB_ONLY=1* and give *-fPIC* compiler flag (for both *-DCMAKE_CXX_FLAGS* and *-DCMAKE_C_FLAGS*). With GPU support, only a static library is built because it needs to match the GPU architecture.

### Vectorized math operations
SAGECal can use ***libmvec*** vectorized math operations, both in GPU and CPU versions. In order to enable this, use compiler options *-fopenmp -ffast-math -lmvec -lm* for both gcc and g++. Also *-mavx*, *-mavx2* etc. can be added. Here is an example for CPU version
SAGECal can use ***libmvec*** vectorized math operations, both in GPU and CPU versions. In order to enable this, use compiler options *-ffast-math -lmvec -lm* for both gcc and g++. Also *-mavx*, *-mavx2* etc. can be added. Here is an example for CPU version

```
cmake .. -DCMAKE_CXX_FLAGS='-g -O3 -Wall -fopenmp -ffast-math -lmvec -lm -mavx2' -DCMAKE_C_FLAGS='-g -O3 -Wall -ffast-math -lmvec -lm -mavx2'
cmake .. -DCMAKE_CXX_FLAGS='-g -O3 -Wall -ffast-math -lmvec -lm -mavx2' -DCMAKE_C_FLAGS='-g -O3 -Wall -ffast-math -lmvec -lm -mavx2'
```

0 comments on commit 410e0f7

Please sign in to comment.