Add Building information and building for sources on GPU
This commit is contained in:
parent
ad542fe856
commit
8f7d05efda
66
README.org
66
README.org
@ -26,3 +26,69 @@ before the proper paper is released please contact me.
|
|||||||
|
|
||||||
In the mean time the code has been used in
|
In the mean time the code has been used in
|
||||||
[[https://aip.scitation.org/doi/10.1063/5.0074936][this publication]] and can therefore been cited.
|
[[https://aip.scitation.org/doi/10.1063/5.0074936][this publication]] and can therefore been cited.
|
||||||
|
|
||||||
|
* Building
|
||||||
|
|
||||||
|
Atrip uses autotools to build the system.
|
||||||
|
Autotools works by first creating a =configure= script from
|
||||||
|
a =configure.ac= file.
|
||||||
|
|
||||||
|
Atrip should be built out of source, this means that
|
||||||
|
you have to create a build directory other that the root
|
||||||
|
directory, for instance in the =build/tutorial= directory
|
||||||
|
|
||||||
|
#+begin_src sh :exports code
|
||||||
|
mkdir -p build/tutorial/
|
||||||
|
cd build/tutorial
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
First you have to build the =configure= script by doing
|
||||||
|
|
||||||
|
#+begin_src sh :dir build/tutorial :exports code :results raw drawer
|
||||||
|
../../bootstrap.sh
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+RESULTS:
|
||||||
|
:results:
|
||||||
|
|
||||||
|
Creating configure script
|
||||||
|
|
||||||
|
|
||||||
|
Now you can build by doing
|
||||||
|
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
../configure
|
||||||
|
make extern
|
||||||
|
make all
|
||||||
|
|
||||||
|
:end:
|
||||||
|
|
||||||
|
And then you can see the =configure= options
|
||||||
|
#+begin_src sh :dir build/tutorial :results raw drawer :eval no
|
||||||
|
../../configure --help
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Benchmarks
|
||||||
|
|
||||||
|
The script =tools/configure-benches.sh= can be used to create
|
||||||
|
a couple of configurations for benchmarks:
|
||||||
|
|
||||||
|
#+begin_src sh :exports results :results verbatim org :results verbatim drawer replace output
|
||||||
|
awk '/begin +doc/,/end +doc/ { print $NL }' tools/configure-benches.sh |
|
||||||
|
grep -v -e "begin \+doc" -e "end \+doc" |
|
||||||
|
sed "s/^# //; s/^# *$//; /^$/d"
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+RESULTS:
|
||||||
|
:results:
|
||||||
|
- default ::
|
||||||
|
This configuration uses a CPU code with dgemm
|
||||||
|
and without computing slices.
|
||||||
|
- only-dgemm ::
|
||||||
|
This only runs the computation part that involves dgemms.
|
||||||
|
- slices-on-gpu-only-dgemm ::
|
||||||
|
This configuration tests that slices reside completely on the gpu
|
||||||
|
and it should use a CUDA aware MPI implementation.
|
||||||
|
It also only uses the routines that involve dgemm.
|
||||||
|
:end:
|
||||||
|
|||||||
@ -6,6 +6,7 @@ set -eu
|
|||||||
flags=("${@}")
|
flags=("${@}")
|
||||||
PROJECTS=()
|
PROJECTS=()
|
||||||
|
|
||||||
|
############################################################
|
||||||
#
|
#
|
||||||
## Check root directory
|
## Check root directory
|
||||||
#
|
#
|
||||||
@ -35,6 +36,7 @@ EOF
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
############################################################
|
||||||
#
|
#
|
||||||
## Create configuration function
|
## Create configuration function
|
||||||
#
|
#
|
||||||
@ -48,7 +50,8 @@ create_config () {
|
|||||||
echo "> creating: $name"
|
echo "> creating: $name"
|
||||||
cat <<SH > configure
|
cat <<SH > configure
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# created by $0 on $(date)
|
# creator: $0
|
||||||
|
# date: $(date)
|
||||||
|
|
||||||
$root_project/configure $(cat $file | paste -s) \\
|
$root_project/configure $(cat $file | paste -s) \\
|
||||||
$(for word in "${flags[@]}"; do
|
$(for word in "${flags[@]}"; do
|
||||||
@ -62,9 +65,14 @@ SH
|
|||||||
cd - > /dev/null
|
cd - > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
############################################################
|
||||||
|
# begin doc
|
||||||
#
|
#
|
||||||
## default configuration
|
# - default ::
|
||||||
|
# This configuration uses a CPU code with dgemm
|
||||||
|
# and without computing slices.
|
||||||
#
|
#
|
||||||
|
# end doc
|
||||||
|
|
||||||
tmp=`mktemp`
|
tmp=`mktemp`
|
||||||
cat <<EOF > $tmp
|
cat <<EOF > $tmp
|
||||||
@ -74,9 +82,12 @@ EOF
|
|||||||
create_config $tmp default
|
create_config $tmp default
|
||||||
rm $tmp
|
rm $tmp
|
||||||
|
|
||||||
|
# begin doc
|
||||||
#
|
#
|
||||||
## only-dgemm configuration
|
# - only-dgemm ::
|
||||||
|
# This only runs the computation part that involves dgemms.
|
||||||
#
|
#
|
||||||
|
# end doc
|
||||||
|
|
||||||
tmp=`mktemp`
|
tmp=`mktemp`
|
||||||
cat <<EOF > $tmp
|
cat <<EOF > $tmp
|
||||||
@ -87,6 +98,29 @@ EOF
|
|||||||
create_config $tmp only-dgemm
|
create_config $tmp only-dgemm
|
||||||
rm $tmp
|
rm $tmp
|
||||||
|
|
||||||
|
#
|
||||||
|
# begin doc
|
||||||
|
#
|
||||||
|
# - slices-on-gpu-only-dgemm ::
|
||||||
|
# This configuration tests that slices reside completely on the gpu
|
||||||
|
# and it should use a CUDA aware MPI implementation.
|
||||||
|
# It also only uses the routines that involve dgemm.
|
||||||
|
#
|
||||||
|
# end doc
|
||||||
|
|
||||||
|
tmp=`mktemp`
|
||||||
|
cat <<EOF > $tmp
|
||||||
|
--enable-cuda
|
||||||
|
--enable-sources-in-gpu
|
||||||
|
--enable-cuda-aware-mpi
|
||||||
|
--enable-only-dgemm
|
||||||
|
--disable-slice
|
||||||
|
EOF
|
||||||
|
|
||||||
|
create_config $tmp sources-in-gpu
|
||||||
|
rm $tmp
|
||||||
|
|
||||||
|
############################################################
|
||||||
#
|
#
|
||||||
## Create makefile
|
## Create makefile
|
||||||
#
|
#
|
||||||
@ -128,5 +162,5 @@ EOF
|
|||||||
## Emacs stuff
|
## Emacs stuff
|
||||||
# Local Variables:
|
# Local Variables:
|
||||||
# eval: (outline-minor-mode)
|
# eval: (outline-minor-mode)
|
||||||
# outline-regexp: "## "
|
# outline-regexp: "############################################################"
|
||||||
# End:
|
# End:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user