Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kokkos Base Makefile adds AVX to KNC Build #16

Closed
nmhamster opened this issue May 14, 2015 · 8 comments
Closed

Kokkos Base Makefile adds AVX to KNC Build #16

nmhamster opened this issue May 14, 2015 · 8 comments

Comments

@nmhamster
Copy link
Contributor

If I run: ../generate_makefile.bash --with-openmp --arch=KNC --compiler=which iclc

But use Kokkos files later, I get:

mpiicpc -O3 -I../src -DWITH_MPI=1 -mmic -DCELL_FLUX -I./ -I/home/sdhammo/kokkos/kokkos-git/core/src -I/home/sdhammo/kokkos/kokkos-git/containers/src -I/home/sdhammo/kokkos/kokkos-git/algorithms/src --std=c++11 -mavx -fopenmp -c ../src/Cell.C
icpc: command line error: option '-mavx' not supported

CXXFLAGS looks incorrect here, should be -mmic not -mavx.

@crtrott
Copy link
Member

crtrott commented May 14, 2015

I can't reproduce that at the moment. Can you give more details.
It doesn't look like you are actually building against an installed kokkos?

@nmhamster
Copy link
Contributor Author

Here is what I have been doing.

(1) git glone ..
(2) cd into directory
(3) mkdir build
(4) cd build
(5) ../generate_makefile.bash --with-openmp --arch=KNC --compiler=which icpc
(6) make

@crtrott
Copy link
Member

crtrott commented May 14, 2015

but where is the -DWITH_MPI coming from? thats not Kokkos.
If you want to first install Kokkos and then build miniaero against the installed directory you need to do
git clone ..
mkdir KokkosBuild
cd KokkosBuild
../generate_makefile.bash --prefix="INSTALLDIR" --with-openmp --arch=KNC --compiler=icpc
make lib
make install

cd MINIAERO/build
make KOKKOS_PATH=INSTALLDIR -j 8

Though I have to admit I didn't try that yet ;-)

@nmhamster
Copy link
Contributor Author

MiniAero.

@crtrott
Copy link
Member

crtrott commented May 14, 2015

I am going through that right now and will fix any issues ;-)

@crtrott
Copy link
Member

crtrott commented May 14, 2015

OK I just pushed a fix which makes it work at least with GCC. KNC build fails because it says the library is not valid. Is ar the wrong thing to put the things together in that case?
Also the miniAero makefile needs some small changes so that it doesn't override setting from the installed Makefile.kokkos (i.e. comment out some lines):

#Set the path to Kokkos
KOKKOS_PATH = /home/crtrott/KokkosInstall/SNB-OpenMP
#Set the Devices to compile for
#KOKKOS_DEVICES=OpenMP
#Set the Architecture to compiler for
#KOKKOS_ARCH=SNB

(1) ~/kokkos/generate_makefile.bash --with-openmp --prefix=/home/crtrott/KokkosInstall/SNB-OpenMP --arch=SNB --compiler=g++ --kokkos-path=/home/crtrott/kokkos
(2) make install
(3) cd ~/mantevo/trunk/packages/miniAero/miniAero_Kokkos/build/
(4) make -j

that worked for non KNC, for KNC we need to fix the linking step of the library itself I guess.

@nmhamster
Copy link
Contributor Author

ar should be fine for Kokkos (assuming you want .a file), if not xiar

might be needed from Intel.

Si Hammond

Scalable Computer Architectures
Sandia National Laboratories, NM, USA

On 5/14/15, 5:22 PM, "Christian Trott" notifications@github.com wrote:

OK I just pushed a fix which makes it work at least with GCC. KNC build
fails because it says the library is not valid. Is ar the wrong thing to
put the things together in that case?
Also the miniAero makefile needs some small changes so that it doesn't
override setting from the installed Makefile.kokkos (i.e. comment out
some lines):
#Set the path to Kokkos
KOKKOS_PATH = /home/crtrott/KokkosInstall/SNB-OpenMP
#Set the Devices to compile for
#KOKKOS_DEVICES=OpenMP
#Set the Architecture to compiler for
#KOKKOS_ARCH=SNB
(1) ~/kokkos/generate_makefile.bash --with-openmp
--prefix=/home/crtrott/KokkosInstall/SNB-OpenMP --arch=SNB --compiler=g++
--kokkos-path=/home/crtrott/kokkos
(2) make install
(3) cd ~/mantevo/trunk/packages/miniAero/miniAero_Kokkos/build/
(4) make -j
that worked for non KNC, for KNC we need to fix the linking step of the
library itself I guess.

Reply to this email directly or
view it on GitHub
#16 (comment).

@crtrott
Copy link
Member

crtrott commented Jun 15, 2015

I think this was fixed. If you encounter this issue again feel free to reopen/make a new issue.

@crtrott crtrott closed this as completed Jun 15, 2015
Rombur added a commit to Rombur/kokkos that referenced this issue Oct 2, 2019
Disable HIP code where ROCm is disabled
crtrott added a commit that referenced this issue Nov 2, 2020
Test whether half_t is trivially copyable
dalg24 added a commit to dalg24/kokkos that referenced this issue May 2, 2022
Replaced wiki links to ProgrammingGuide to point to Kokkos repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants