Commit a969bab6 authored by MIJIEUX Thomas's avatar MIJIEUX Thomas

New option -x for setting chameleon tag_sep in fabulous_test_cham

parent bc682b40
......@@ -20,61 +20,60 @@ echo ${HOME}/src/chameleon/
*** Install SPACK
If you do not have spack, download it:
#+begin_src bash
cd ${HOME}
git clone https://github.com/solverstack/spack.git
cd ${HOME}
git clone https://github.com/solverstack/spack.git
#+end_src
Set SPACK_ROOT variable to the directory where spack is installed:
#+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh :results silent :tangle-mode (identity #o755)
#!/bin/bash
export SPACK_ROOT=/home/tmijieux/spack
#+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh :results silent :shebang "#!/bin/bash"
export SPACK_ROOT=/home/tmijieux/spack
#+end_src
Load spack to into your terminal environment:
#+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh :results silent
source ${SPACK_ROOT}/share/spack/setup-env.sh
export MODULEPATH=$SPACK_ROOT/share/spack/modules/linux-x86_64:$MODULEPATH
source ${SPACK_ROOT}/share/spack/setup-env.sh
export MODULEPATH=$SPACK_ROOT/share/spack/modules/linux-x86_64:$MODULEPATH
#+end_src
*** Install Fabulous
On plafrim, you need to load the required modules:
#+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh :results silent
module purge
module load compiler/gcc/6.1.0
module load build/cmake/3.2.1
module load intel/mkl/64/11.2/2016.0.0
spack compiler find
module purge
module load compiler/gcc/6.1.0
module load build/cmake/3.2.1
module load intel/mkl/64/11.2/2016.0.0
spack compiler find
#+end_src
Set shell variables for spack to find the dependencies
#+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh :results silent
export CMAKE_DIR=/cm/shared/dev/apps/build/cmake/3.2.1
export CMAKE_DIR=/cm/shared/dev/apps/build/cmake/3.2.1
#+end_src
Check the specification with:
#+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh :results silent
SPEC="fabulous@develop+chameleon%gcc@6.1.0 ^chameleon@master ^mkl@exist ^cmake@exist"
spack spec ${SPEC}
SPEC="fabulous@develop+chameleon%gcc@6.1.0 ^chameleon@master ^mkl@exist ^cmake@exist"
spack spec ${SPEC}
#+end_src
On plafrim, spack may have troubles fetching the required dependencies
on the internet. If you encounter this issue, you can create a spack
mirror on your machine and sent it to plafrim:
#+begin_src bash
#local machine:
spack mirror create -d fabulous_mirror -D -o fabulous@develop+chameleon^chameleon@master
# mirror store dependencies as compressed archives already
# so it is not very useful to add anymore compression at this stage:
tar cf fabulous_mirror.tar fabulous_mirror/
sftp fabulous_mirror.tar plafrim:~
#on plafrim (for instance, in your $HOME directory):
tar xf fabulous_mirror.tar
spack mirror add local_mirror file://${HOME}/fabulous_mirror
#local machine:
spack mirror create -d fabulous_mirror -D -o fabulous@develop+chameleon^chameleon@master
# mirror store dependencies as compressed archives already
# so it is not very useful to add anymore compression at this stage:
tar cf fabulous_mirror.tar fabulous_mirror/
sftp fabulous_mirror.tar plafrim:~
#on plafrim (for instance, in your $HOME directory):
tar xf fabulous_mirror.tar
spack mirror add local_mirror file://${HOME}/fabulous_mirror
#+end_src
If everything looks good, you can proceed the installation with:
#+begin_src bash :session *INSTALLFABULOUS* :tangle install-fabulous.sh :results silent
spack install -v ${SPEC}
spack install -v ${SPEC}
#+end_src
You can perform these actions either manually, by evaluating the code blocks
......@@ -82,13 +81,13 @@ echo ${HOME}/src/chameleon/
document to produce file:./install-fabulous.sh execute it:
#+begin_src emacs-lisp :results silent
(org-babel-tangle)
(org-babel-tangle)
#+end_src
then:
#+begin_src bash :results silent
chmod +x ./install-fabulous.sh
./install-fabulous.sh
chmod +x ./install-fabulous.sh
./install-fabulous.sh
#+end_src
* DEVELOPER NOTICE
:PROPERTIES:
......
......@@ -4,7 +4,7 @@
* 2017
** 2017-05 May
*** 2017-05-10 Wednesday
**** start labbook for fabulous
**** start labbook for fabulous :ORG:
this are the extra org configuration I use for this labbook:
#+begin_src emacs-lisp
(add-to-list 'org-capture-templates
......@@ -16,8 +16,7 @@
(global-set-key [f6] 'org-capture)
#+end_src
My spacemacs configuration is based on https://gitlab.inria.fr/agullo/conf
This was added at the beginning of ~/.spacemacs.d/configuration.org
under Org-mode gtd/org-agenda ...
This was added here : [[file:~/.spacemacs.d/configuration.org::*org-agenda%20repository,%20files%20(repo),%20diary,%20refile][org-agenda repository, files (repo), diary, refile]]
:LOGBOOK:
CLOCK: [2017-05-10 Wed 08:49]--[2017-05-10 Wed 08:54] => 0:05
......@@ -453,7 +452,7 @@ ctest
** 2017-06 June
*** 2017-06-01 Thursday
**** meeting with Luc Giraud
- IB -> parameter to limit size of space expansion
***** TODO IB -> parameter to limit size of space expansion
:LOGBOOK:
CLOCK: [2017-06-01 Thu 17:31]--[2017-06-01 Thu 17:33] => 0:02
:END:
......@@ -519,9 +518,51 @@ ctest
CLOCK: [2017-06-01 Thu 17:33]--[2017-06-01 Thu 17:36] => 0:03
:END:
[2017-06-01 Thu 17:33]
**** ortho BLOCK variant in C api
**** Added ortho BLOCK variant in C api :api:
adapted BLOCK orthogonalization variant to use correct callback
:LOGBOOK:
CLOCK: [2017-06-01 Thu 19:33]--[2017-06-01 Thu 19:34] => 0:01
:END:
[2017-06-01 Thu 19:33]
*** 2017-06-02 Friday
**** better export of source code in org babel :ORG:
[[file:~/.spacemacs.d/configuration.org::*Seamless%20use%20of%20babel%20(no%20confirmation,%20lazy%20export)][Seamless use of babel (no confirmation, lazy export)]]
https://lists.gnu.org/archive/html/emacs-orgmode/2016-07/msg00039.html
The commented line was problematic because header argument for
src block were ignored during exports.
The new line at the bottom solve the problem
#+begin_src emacs-lisp
;;(setq org-export-babel-evaluate nil)
(setq org-confirm-babel-evaluate nil)
(setq org-babel-default-header-args
(cons '(:eval . "never-export")
(assq-delete-all :eval org-babel-default-header-args)))
#+end_src
:LOGBOOK:
CLOCK: [2017-06-02 Fri 18:08]--[2017-06-02 Fri 18:09] => 0:01
:END:
[2017-06-02 Fri 18:08]
**** new option fabulous_test_cham cmdline :chameleon:
Add option -x or --chameleon-tag-sep to set
chameleon tag separator on commandline.
Each tile of chameleon have a mpi tag (32bit integer) composed from two
parts. The 32 bit integer is split in two (but not necessarily two halves)
the descriptor id and the tile id (inside the descriptor)
This option enable to set the number of bits dedicated to the tile id part
on the command line
:LOGBOOK:
CLOCK: [2017-06-02 Fri 18:17]--[2017-06-02 Fri 18:19] => 0:02
:END:
[2017-06-02 Fri 18:17]
**** Added function to print advanced logging information in c api :api:
Print all logger informations in csv format
[[file:./src/api/include/fabulous.h::fabulous_print_log_file][fabulous_print_log_file()]]
[[file:./src/api/include/fabulous.h::fabulous_print_log_filename][fabulous_print_log_filename()]]
:LOGBOOK:
CLOCK: [2017-06-02 Fri 18:26]--[2017-06-02 Fri 18:29] => 0:03
:END:
[2017-06-02 Fri 18:26]
This diff is collapsed.
......@@ -19,9 +19,9 @@ enum class OrthoType {
*/
enum class OrthoScheme {
MGS = 0, /*!< Modified Gram Schmidt */
CGS = 1, /*!< Classical Gram Schmidt */
IMGS = 2, /*!< Iterated Modified Gram Schmidt */
ICGS = 3, /*!< Iterated Classical Gram Schmidt */
IMGS = 1, /*!< Iterated Modified Gram Schmidt */
CGS = 2, /*!< Classical Gram Schmidt */
ICGS = 3, /*!< Iterated Classical Gram Schmidt */
};
} // end namespace fabulous
......
......@@ -45,9 +45,11 @@ public:
time = _timer.get_length();
}
inline LogIterationStep()
inline LogIterationStep():
_timer{},
time{0.0},
flops(0L)
{
reset();
}
};
......@@ -77,7 +79,6 @@ public:
LogIterationStep least_square;
LogIterationStep ib;
static constexpr const char *log_header =
"global_iteration,local_iteration,krylov_space_size,nb_mvp,"
"current_block_size,minRes,maxRes,minRealRes,maxRealRes,time,"
......@@ -124,7 +125,8 @@ public:
{
fprintf(
o,
"%d,%d,%d,%d,%d,"
"%d,%d,%d,"
"%d,%d,"
"%g,%g,%g,%g,"
"%g,"
"%g,%ld,"
......@@ -159,7 +161,6 @@ private:
double _total_time; /*!< total time (over multiple restart) */
bool _started;
Timer _global_timer;
Timer _iterations_timer;
......@@ -181,7 +182,6 @@ private:
public:
Logger(bool log_real_residual = false):
_total_time{0.0},
_started{false},
_log_real_residual{log_real_residual},
_global_iteration{0},
_total_mvp{0},
......@@ -226,16 +226,18 @@ public:
/* -------------------- notify BEGIN --------------------------------------*/
void notify_iteration_begin(int iteration_count, int size_krylov_space)
void notify_iteration_begin(int iteration_id, int size_krylov_space)
{
std::cerr<<"\nStart of Iteration ["
<<Color::note<<iteration_count<<" :: "
<<Color::note<<iteration_id<<" :: "
<<size_krylov_space<<Color::reset<<"]\n";
if (!_started) {
_started = true;
if (_global_iteration == 0) {
global_reset();
_global_timer.start();
}
if (iteration_id == 0) {
_last_mvp = 0;
}
iteration_reset();
_iterations_timer.start();
}
......@@ -332,7 +334,7 @@ public:
/**
* \brief iterator over the iterations with everything.
*/
void for_each_iteration(std::function<void(int,int,int,P,P,P,P,double)> func)
void for_each_iteration(std::function<void(int,int,int,P,P,P,P,double)> func) const
{
for (auto &it : _iterations) {
func(it.global_iteration,
......@@ -348,7 +350,7 @@ public:
* \brief iterator over the iterations with everything.
*/
void for_each_iteration(
std::function<void(int,int,int,P,P,P,P,double,int,int)> func)
std::function<void(int,int,int,P,P,P,P,double,int,int)> func) const
{
for (auto &it : _iterations) {
func(it.glob_iteration,
......@@ -365,7 +367,7 @@ public:
/**
* \brief iterator over the iterations with only Arnoldi residual.
*/
void for_each_iteration(std::function<void(int,int,int,P,P,double)> func)
void for_each_iteration(std::function<void(int,int,int,P,P,double)> func) const
{
for (auto &it : _iterations) {
func(it.global_iteration,
......
......@@ -82,8 +82,8 @@ enum fabulous_arithmetic {
*/
enum fabulous_orthoscheme {
FABULOUS_MGS = 0, /*!< Modified Gram-Schmidt */
FABULOUS_CGS = 1, /*!< Classical Gram-Schmidt */
FABULOUS_IMGS = 2, /*!< Iterated Modified Gram-Schmidt */
FABULOUS_IMGS = 1, /*!< Iterated Modified Gram-Schmidt */
FABULOUS_CGS = 2, /*!< Classical Gram-Schmidt */
FABULOUS_ICGS = 3, /*!< Iteratied Classical Gram-Schmidt */
};
......
This diff is collapsed.
......@@ -37,7 +37,7 @@ extern "C" {
enum enum_type { type__NULL = -1, type_arg_RUHE = 0, type_arg_BLOCK };
enum enum_scheme { scheme__NULL = -1, scheme_arg_CGS = 0, scheme_arg_ICGS, scheme_arg_MGS, scheme_arg_IMGS };
enum enum_arithmetic { arithmetic__NULL = -1, arithmetic_arg_REAL_FLOAT = 0, arithmetic_arg_REAL_DOUBLE, arithmetic_arg_COMPLEX_FLOAT, arithmetic_arg_COMPLEX_DOUBLE };
enum enum_algo { algo__NULL = -1, algo_arg_STDDR = 0, algo_arg_CHAMDR, algo_arg_QR, algo_arg_CHAMQR, algo_arg_QRDR, algo_arg_IB, algo_arg_IBDR, algo_arg_QRIBDR, algo_arg_BCG, algo_arg_GCR };
enum enum_algo { algo__NULL = -1, algo_arg_STDDR = 0, algo_arg_CHAMDR, algo_arg_QR, algo_arg_CHAMQR, algo_arg_CHAMQR2, algo_arg_QRDR, algo_arg_IB, algo_arg_IBDR, algo_arg_QRIBDR, algo_arg_BCG, algo_arg_GCR };
enum enum_restart { restart__NULL = -1, restart_arg_CLASSIC = 0, restart_arg_DEFLATED };
enum enum_parser { parser__NULL = -1, parser_arg_MM = 0, parser_arg_IW, parser_arg_RD };
enum enum_storage { storage__NULL = -1, storage_arg_DENSE = 0, storage_arg_CSC, storage_arg_COO };
......@@ -102,6 +102,9 @@ struct gengetopt_args_info
int nb_starpu_worker_arg; /**< @brief Number of starpu worker. -1 for all available processors. (default='-1'). */
char * nb_starpu_worker_orig; /**< @brief Number of starpu worker. -1 for all available processors. original value given at command line. */
const char *nb_starpu_worker_help; /**< @brief Number of starpu worker. -1 for all available processors. help description. */
int chameleon_tag_sep_arg; /**< @brief chameleon mpi \"tag-separator\" limit between tile id/and descriptor id in mpi tag (default='16'). */
char * chameleon_tag_sep_orig; /**< @brief chameleon mpi \"tag-separator\" limit between tile id/and descriptor id in mpi tag original value given at command line. */
const char *chameleon_tag_sep_help; /**< @brief chameleon mpi \"tag-separator\" limit between tile id/and descriptor id in mpi tag help description. */
unsigned int help_given ; /**< @brief Whether help was given. */
unsigned int version_given ; /**< @brief Whether version was given. */
......@@ -124,6 +127,7 @@ struct gengetopt_args_info
unsigned int output_given ; /**< @brief Whether output was given. */
unsigned int suffix_given ; /**< @brief Whether suffix was given. */
unsigned int nb_starpu_worker_given ; /**< @brief Whether nb-starpu-worker was given. */
unsigned int chameleon_tag_sep_given ; /**< @brief Whether chameleon-tag-sep was given. */
} ;
......
......@@ -37,7 +37,7 @@ option "arithmetic" a "set the type arithmetic"
optional default="COMPLEX_DOUBLE"
option "algo" A "set the algorithm"
values="STDDR","CHAMDR","QR","CHAMQR","QRDR","IB","IBDR","QRIBDR", "BCG", "GCR" enum
values="STDDR","CHAMDR","QR","CHAMQR","CHAMQR2","QRDR","IB","IBDR","QRIBDR", "BCG", "GCR" enum
optional default="STDDR"
option "restart" r "restarting type"
......@@ -65,4 +65,7 @@ option "suffix" u "append parameters as a suffix to output filename"
flag on
option "nb-starpu-worker" z "Number of starpu worker. -1 for all available processors."
int optional default="-1"
\ No newline at end of file
int optional default="-1"
option "chameleon-tag-sep" x "chameleon mpi \"tag-separator\" limit between tile id/and descriptor id in mpi tag"
int optional default="16"
......@@ -182,11 +182,13 @@ void run_test_restart(const struct gengetopt_args_info &info, Restart restart)
case algo_arg_QRIBDR: run_test_algo<S>(info, bgmres::qribdr(), restart); break;
#if !defined(FABULOUS_USE_CHAMELEON)
case algo_arg_CHAMDR: /* fall-thru */
case algo_arg_CHAMQR:
case algo_arg_CHAMQR: /* fall-thru */
case algo_arg_CHAMQR2:
FABULOUS_FATAL_ERROR("chameleon is not enabled in this executable"); break;
#else // !defined(FABULOUS_USE_CHAMELEON)
case algo_arg_CHAMDR: run_test_algo<S>(info, bgmres::cham_tl(), restart); break;
case algo_arg_CHAMQR: run_test_algo<S>(info, bgmres::cham_qr(), restart); break;
case algo_arg_CHAMQR2:run_test_algo<S>(info, bgmres::cham_qr_submat(), restart); break;
#endif // !defined(FABULOUS_USE_CHAMELEON)
case algo_arg_GCR: run_test_algo<S>(info, bgcr::std(), restart); break;
case algo_arg_BCG: run_test_algo<S>(info, bcg::std(), restart); break;
......@@ -204,7 +206,8 @@ void run_test_restart(const struct gengetopt_args_info &info,
case algo_arg_IBDR: run_test_algo<S>(info, bgmres::ibdr(), restart); break;
case algo_arg_QRIBDR: run_test_algo<S>(info, bgmres::qribdr(), restart); break;
#if !defined(FABULOUS_USE_CHAMELEON)
case algo_arg_CHAMQR:
case algo_arg_CHAMQR: /* fall-thru */
case algo_arg_CHAMQR2:
warning("This QR version does not support deflated restarting");
/* fall-thru */
case algo_arg_CHAMDR:
......@@ -212,6 +215,7 @@ void run_test_restart(const struct gengetopt_args_info &info,
#else // !defined(FABULOUS_USE_CHAMELEON)
case algo_arg_CHAMDR: run_test_algo<S>(info, bgmres::cham_tl(), restart); break;
case algo_arg_CHAMQR: /* fall-thru */
case algo_arg_CHAMQR2: /* fall-thru */
#endif // !defined(FABULOUS_USE_CHAMELEON)
case algo_arg_QR: /* fall-thru */
case algo_arg_IB: /* fall-thru */
......@@ -250,7 +254,8 @@ int main(int argc, char *argv[])
MORSE_Init(NCPU, 0);
MORSE_Enable(MORSE_WARNINGS);
MORSE_Disable(MORSE_AUTOTUNING);
MORSE_user_tag_size(31, 18);
int TAG_SEP = info.chameleon_tag_sep_arg;
MORSE_user_tag_size(31, TAG_SEP);
#endif
switch(info.arithmetic_arg) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment