Commit 408a730f authored by incardon's avatar incardon

Eliminating warning

parent b37af1cd
...@@ -163,11 +163,6 @@ if [ ! -d "$i_dir/PETSC" -o ! -d "$i_dir/EIGEN" ]; then ...@@ -163,11 +163,6 @@ if [ ! -d "$i_dir/PETSC" -o ! -d "$i_dir/EIGEN" ]; then
else else
inst_lin_alg = n inst_lin_alg = n
fi fi
# if [ ! x"$choose" == x"0" ]; then
# ./script/install_PETSC.sh $i_dir $choose
# configure_options="$configure_options --with-PETSC=$i_dir/PETSC "
# fi
fi fi
lin_alg_dir="" lin_alg_dir=""
...@@ -301,7 +296,7 @@ else ...@@ -301,7 +296,7 @@ else
if [ x"$inst_lin_alg" == x"y" ]; then if [ x"$inst_lin_alg" == x"y" ]; then
./script/install_EIGEN.sh $i_dir $ncore ./script/install_EIGEN.sh $i_dir $ncore
./script/install_PETSC.sh $i_dir $ncore ./script/install_PETSC.sh $i_dir $ncore $CC $CXX $F77 $FC
fi fi
### collect PETSC configuration options ### collect PETSC configuration options
......
...@@ -161,9 +161,19 @@ function detect_compiler() ...@@ -161,9 +161,19 @@ function detect_compiler()
commands[0]="icpc" commands[0]="icpc"
commands[1]="g++" commands[1]="g++"
possible_solutions "${commands[@]}" possible_solutions "${commands[@]}"
dgc_compiler=$possible_solutions_command if [ x"$possible_solutions_command" == x"icpc" ]; then
CXX=icpc
CC=icc
F77=ifort
FC=ifort
dgc_compiler=icpc
else
CXX=g++
CC=gcc
F77=gfortran
FC=gfortran
fi
dgc_ret=1 dgc_ret=1
CXX=$dgc_compiler
fi fi
} }
......
...@@ -2,6 +2,11 @@ ...@@ -2,6 +2,11 @@
# check if the directory $1/PETSC exist # check if the directory $1/PETSC exist
CXX=$3
CC=$4
F77=$5
FC=$6
if [ -d "$1/PETSC" ]; then if [ -d "$1/PETSC" ]; then
echo "PETSC already installed" echo "PETSC already installed"
exit 0 exit 0
...@@ -9,9 +14,7 @@ fi ...@@ -9,9 +14,7 @@ fi
# Detect gcc pr clang # Detect gcc pr clang
source script/detect_gcc
source script/discover_os source script/discover_os
detect_compiler g++
discover_os discover_os
##### if we are on osx we use gsed ##### if we are on osx we use gsed
......
...@@ -5,7 +5,7 @@ function set_mpi() ...@@ -5,7 +5,7 @@ function set_mpi()
if [ x"$MPI_valid" == x"yes" ]; then if [ x"$MPI_valid" == x"yes" ]; then
configure_options="$configure_options CXX=mpic++ " configure_options="$configure_options CXX=mpic++ "
else else
./script/install_MPI.sh $1 $2 CC=$3 CXX=$4 F77=$5 FC=$6 ./script/install_MPI.sh $1 $2 $3 $4 $5 $6
MPI_installed=1 MPI_installed=1
export PATH="$1/MPI/bin:$PATH" export PATH="$1/MPI/bin:$PATH"
configure_options="$configure_options CXX=mpic++ " configure_options="$configure_options CXX=mpic++ "
......
...@@ -63,53 +63,53 @@ BOOST_AUTO_TEST_CASE( vector_dist_periodic_complex_prp_test_use_3d ) ...@@ -63,53 +63,53 @@ BOOST_AUTO_TEST_CASE( vector_dist_periodic_complex_prp_test_use_3d )
// initalize vector property and grid // initalize vector property and grid
vd.template getProp<0>(key).add(vd.getPos(key)[0]); vd.getProp<0>(key).add(vd.getPos(key)[0]);
vd.template getProp<0>(key).add(vd.getPos(key)[1]); vd.getProp<0>(key).add(vd.getPos(key)[1]);
vd.template getProp<0>(key).add(vd.getPos(key)[2]); vd.getProp<0>(key).add(vd.getPos(key)[2]);
vd.template getProp<0>(key).add(vd.getPos(key)[0]+vd.getPos(key)[1]); vd.getProp<0>(key).add(vd.getPos(key)[0]+vd.getPos(key)[1]);
vd.template getProp<0>(key).add(vd.getPos(key)[1]+vd.getPos(key)[2]); vd.getProp<0>(key).add(vd.getPos(key)[1]+vd.getPos(key)[2]);
vd.template getProp<0>(key).add(vd.getPos(key)[0]+vd.getPos(key)[2]); vd.getProp<0>(key).add(vd.getPos(key)[0]+vd.getPos(key)[2]);
// Grid // Grid
size_t sz[] = {3,3,3}; size_t sz[] = {3,3,3};
vd.template getProp<1>(key).resize(sz); vd.getProp<1>(key).resize(sz);
vd.template getProp<1>(key).template get<0>({0,0,0}) = vd.getPos(key)[0]; vd.getProp<1>(key).get<0>({0,0,0}) = vd.getPos(key)[0];
vd.template getProp<1>(key).template get<0>({0,0,1}) = vd.getPos(key)[1]; vd.getProp<1>(key).get<0>({0,0,1}) = vd.getPos(key)[1];
vd.template getProp<1>(key).template get<0>({0,0,2}) = vd.getPos(key)[2]; vd.getProp<1>(key).get<0>({0,0,2}) = vd.getPos(key)[2];
vd.template getProp<1>(key).template get<0>({0,1,0}) = 2.0*vd.getPos(key)[0]; vd.getProp<1>(key).get<0>({0,1,0}) = 2.0*vd.getPos(key)[0];
vd.template getProp<1>(key).template get<0>({0,1,1}) = 2.0*vd.getPos(key)[1]; vd.getProp<1>(key).get<0>({0,1,1}) = 2.0*vd.getPos(key)[1];
vd.template getProp<1>(key).template get<0>({0,1,2}) = 2.0*vd.getPos(key)[2]; vd.getProp<1>(key).get<0>({0,1,2}) = 2.0*vd.getPos(key)[2];
vd.template getProp<1>(key).template get<0>({0,2,0}) = 3.0*vd.getPos(key)[0]; vd.getProp<1>(key).get<0>({0,2,0}) = 3.0*vd.getPos(key)[0];
vd.template getProp<1>(key).template get<0>({0,2,1}) = 3.0*vd.getPos(key)[1]; vd.getProp<1>(key).get<0>({0,2,1}) = 3.0*vd.getPos(key)[1];
vd.template getProp<1>(key).template get<0>({0,2,2}) = 3.0*vd.getPos(key)[2]; vd.getProp<1>(key).get<0>({0,2,2}) = 3.0*vd.getPos(key)[2];
vd.template getProp<1>(key).template get<0>({1,0,0}) = 4.0*vd.getPos(key)[0]; vd.getProp<1>(key).get<0>({1,0,0}) = 4.0*vd.getPos(key)[0];
vd.template getProp<1>(key).template get<0>({1,0,1}) = 4.0*vd.getPos(key)[1]; vd.getProp<1>(key).get<0>({1,0,1}) = 4.0*vd.getPos(key)[1];
vd.template getProp<1>(key).template get<0>({1,0,2}) = 4.0*vd.getPos(key)[2]; vd.getProp<1>(key).get<0>({1,0,2}) = 4.0*vd.getPos(key)[2];
vd.template getProp<1>(key).template get<0>({1,1,0}) = 5.0*vd.getPos(key)[0]; vd.getProp<1>(key).get<0>({1,1,0}) = 5.0*vd.getPos(key)[0];
vd.template getProp<1>(key).template get<0>({1,1,1}) = 5.0*vd.getPos(key)[1]; vd.getProp<1>(key).get<0>({1,1,1}) = 5.0*vd.getPos(key)[1];
vd.template getProp<1>(key).template get<0>({1,1,2}) = 5.0*vd.getPos(key)[2]; vd.getProp<1>(key).get<0>({1,1,2}) = 5.0*vd.getPos(key)[2];
vd.template getProp<1>(key).template get<0>({1,2,0}) = 6.0*vd.getPos(key)[0]; vd.getProp<1>(key).get<0>({1,2,0}) = 6.0*vd.getPos(key)[0];
vd.template getProp<1>(key).template get<0>({1,2,1}) = 6.0*vd.getPos(key)[1]; vd.getProp<1>(key).get<0>({1,2,1}) = 6.0*vd.getPos(key)[1];
vd.template getProp<1>(key).template get<0>({1,2,2}) = 6.0*vd.getPos(key)[2]; vd.getProp<1>(key).get<0>({1,2,2}) = 6.0*vd.getPos(key)[2];
vd.template getProp<1>(key).template get<0>({2,0,0}) = 7.0*vd.getPos(key)[0]; vd.getProp<1>(key).get<0>({2,0,0}) = 7.0*vd.getPos(key)[0];
vd.template getProp<1>(key).template get<0>({2,0,1}) = 7.0*vd.getPos(key)[1]; vd.getProp<1>(key).get<0>({2,0,1}) = 7.0*vd.getPos(key)[1];
vd.template getProp<1>(key).template get<0>({2,0,2}) = 7.0*vd.getPos(key)[2]; vd.getProp<1>(key).get<0>({2,0,2}) = 7.0*vd.getPos(key)[2];
vd.template getProp<1>(key).template get<0>({2,1,0}) = 8.0*vd.getPos(key)[0]; vd.getProp<1>(key).get<0>({2,1,0}) = 8.0*vd.getPos(key)[0];
vd.template getProp<1>(key).template get<0>({2,1,1}) = 8.0*vd.getPos(key)[1]; vd.getProp<1>(key).get<0>({2,1,1}) = 8.0*vd.getPos(key)[1];
vd.template getProp<1>(key).template get<0>({2,1,2}) = 8.0*vd.getPos(key)[2]; vd.getProp<1>(key).get<0>({2,1,2}) = 8.0*vd.getPos(key)[2];
vd.template getProp<1>(key).template get<0>({2,2,0}) = 9.0*vd.getPos(key)[0]; vd.getProp<1>(key).get<0>({2,2,0}) = 9.0*vd.getPos(key)[0];
vd.template getProp<1>(key).template get<0>({2,2,1}) = 9.0*vd.getPos(key)[1]; vd.getProp<1>(key).get<0>({2,2,1}) = 9.0*vd.getPos(key)[1];
vd.template getProp<1>(key).template get<0>({2,2,2}) = 9.0*vd.getPos(key)[2]; vd.getProp<1>(key).get<0>({2,2,2}) = 9.0*vd.getPos(key)[2];
++it; ++it;
} }
...@@ -171,54 +171,54 @@ BOOST_AUTO_TEST_CASE( vector_dist_periodic_complex_prp_test_use_3d ) ...@@ -171,54 +171,54 @@ BOOST_AUTO_TEST_CASE( vector_dist_periodic_complex_prp_test_use_3d )
{ {
auto key = it3.get(); auto key = it3.get();
ret &= vd.template getProp<0>(key).size() == 6; ret &= vd.getProp<0>(key).size() == 6;
ret &= vd.template getProp<0>(key).get(0) == vd.getPos(key)[0]; ret &= vd.getProp<0>(key).get(0) == vd.getPos(key)[0];
ret &= vd.template getProp<0>(key).get(1) == vd.getPos(key)[1]; ret &= vd.getProp<0>(key).get(1) == vd.getPos(key)[1];
ret &= vd.template getProp<0>(key).get(2) == vd.getPos(key)[2]; ret &= vd.getProp<0>(key).get(2) == vd.getPos(key)[2];
ret &= vd.template getProp<0>(key).get(3) == vd.getPos(key)[0]+vd.getPos(key)[1]; ret &= vd.getProp<0>(key).get(3) == vd.getPos(key)[0]+vd.getPos(key)[1];
ret &= vd.template getProp<0>(key).get(4) == vd.getPos(key)[1]+vd.getPos(key)[2]; ret &= vd.getProp<0>(key).get(4) == vd.getPos(key)[1]+vd.getPos(key)[2];
ret &= vd.template getProp<0>(key).get(5) == vd.getPos(key)[0]+vd.getPos(key)[2]; ret &= vd.getProp<0>(key).get(5) == vd.getPos(key)[0]+vd.getPos(key)[2];
// BOOST_REQUIRE_EQUAL(vd.template getProp<0>(key).get(0),vd.getPos(key)[0]); // BOOST_REQUIRE_EQUAL(vd.getProp<0>(key).get(0),vd.getPos(key)[0]);
ret &= vd.template getProp<1>(key).size() == 3*3*3; ret &= vd.getProp<1>(key).size() == 3*3*3;
ret &= vd.template getProp<1>(key).template get<0>({0,0,0}) == vd.getPos(key)[0]; ret &= vd.getProp<1>(key).get<0>({0,0,0}) == vd.getPos(key)[0];
ret &= vd.template getProp<1>(key).template get<0>({0,0,1}) == vd.getPos(key)[1]; ret &= vd.getProp<1>(key).get<0>({0,0,1}) == vd.getPos(key)[1];
ret &= vd.template getProp<1>(key).template get<0>({0,0,2}) == vd.getPos(key)[2]; ret &= vd.getProp<1>(key).get<0>({0,0,2}) == vd.getPos(key)[2];
ret &= vd.template getProp<1>(key).template get<0>({0,1,0}) == 2.0*vd.getPos(key)[0]; ret &= vd.getProp<1>(key).get<0>({0,1,0}) == 2.0*vd.getPos(key)[0];
ret &= vd.template getProp<1>(key).template get<0>({0,1,1}) == 2.0*vd.getPos(key)[1]; ret &= vd.getProp<1>(key).get<0>({0,1,1}) == 2.0*vd.getPos(key)[1];
ret &= vd.template getProp<1>(key).template get<0>({0,1,2}) == 2.0*vd.getPos(key)[2]; ret &= vd.getProp<1>(key).get<0>({0,1,2}) == 2.0*vd.getPos(key)[2];
ret &= vd.template getProp<1>(key).template get<0>({0,2,0}) == 3.0*vd.getPos(key)[0]; ret &= vd.getProp<1>(key).get<0>({0,2,0}) == 3.0*vd.getPos(key)[0];
ret &= vd.template getProp<1>(key).template get<0>({0,2,1}) == 3.0*vd.getPos(key)[1]; ret &= vd.getProp<1>(key).get<0>({0,2,1}) == 3.0*vd.getPos(key)[1];
ret &= vd.template getProp<1>(key).template get<0>({0,2,2}) == 3.0*vd.getPos(key)[2]; ret &= vd.getProp<1>(key).get<0>({0,2,2}) == 3.0*vd.getPos(key)[2];
ret &= vd.template getProp<1>(key).template get<0>({1,0,0}) == 4.0*vd.getPos(key)[0]; ret &= vd.getProp<1>(key).get<0>({1,0,0}) == 4.0*vd.getPos(key)[0];
ret &= vd.template getProp<1>(key).template get<0>({1,0,1}) == 4.0*vd.getPos(key)[1]; ret &= vd.getProp<1>(key).get<0>({1,0,1}) == 4.0*vd.getPos(key)[1];
ret &= vd.template getProp<1>(key).template get<0>({1,0,2}) == 4.0*vd.getPos(key)[2]; ret &= vd.getProp<1>(key).get<0>({1,0,2}) == 4.0*vd.getPos(key)[2];
ret &= vd.template getProp<1>(key).template get<0>({1,1,0}) == 5.0*vd.getPos(key)[0]; ret &= vd.getProp<1>(key).get<0>({1,1,0}) == 5.0*vd.getPos(key)[0];
ret &= vd.template getProp<1>(key).template get<0>({1,1,1}) == 5.0*vd.getPos(key)[1]; ret &= vd.getProp<1>(key).get<0>({1,1,1}) == 5.0*vd.getPos(key)[1];
ret &= vd.template getProp<1>(key).template get<0>({1,1,2}) == 5.0*vd.getPos(key)[2]; ret &= vd.getProp<1>(key).get<0>({1,1,2}) == 5.0*vd.getPos(key)[2];
ret &= vd.template getProp<1>(key).template get<0>({1,2,0}) == 6.0*vd.getPos(key)[0]; ret &= vd.getProp<1>(key).get<0>({1,2,0}) == 6.0*vd.getPos(key)[0];
ret &= vd.template getProp<1>(key).template get<0>({1,2,1}) == 6.0*vd.getPos(key)[1]; ret &= vd.getProp<1>(key).get<0>({1,2,1}) == 6.0*vd.getPos(key)[1];
ret &= vd.template getProp<1>(key).template get<0>({1,2,2}) == 6.0*vd.getPos(key)[2]; ret &= vd.getProp<1>(key).get<0>({1,2,2}) == 6.0*vd.getPos(key)[2];
ret &= vd.template getProp<1>(key).template get<0>({2,0,0}) == 7.0*vd.getPos(key)[0]; ret &= vd.getProp<1>(key).get<0>({2,0,0}) == 7.0*vd.getPos(key)[0];
ret &= vd.template getProp<1>(key).template get<0>({2,0,1}) == 7.0*vd.getPos(key)[1]; ret &= vd.getProp<1>(key).get<0>({2,0,1}) == 7.0*vd.getPos(key)[1];
ret &= vd.template getProp<1>(key).template get<0>({2,0,2}) == 7.0*vd.getPos(key)[2]; ret &= vd.getProp<1>(key).get<0>({2,0,2}) == 7.0*vd.getPos(key)[2];
ret &= vd.template getProp<1>(key).template get<0>({2,1,0}) == 8.0*vd.getPos(key)[0]; ret &= vd.getProp<1>(key).get<0>({2,1,0}) == 8.0*vd.getPos(key)[0];
ret &= vd.template getProp<1>(key).template get<0>({2,1,1}) == 8.0*vd.getPos(key)[1]; ret &= vd.getProp<1>(key).get<0>({2,1,1}) == 8.0*vd.getPos(key)[1];
ret &= vd.template getProp<1>(key).template get<0>({2,1,2}) == 8.0*vd.getPos(key)[2]; ret &= vd.getProp<1>(key).get<0>({2,1,2}) == 8.0*vd.getPos(key)[2];
ret &= vd.template getProp<1>(key).template get<0>({2,2,0}) == 9.0*vd.getPos(key)[0]; ret &= vd.getProp<1>(key).get<0>({2,2,0}) == 9.0*vd.getPos(key)[0];
ret &= vd.template getProp<1>(key).template get<0>({2,2,1}) == 9.0*vd.getPos(key)[1]; ret &= vd.getProp<1>(key).get<0>({2,2,1}) == 9.0*vd.getPos(key)[1];
ret &= vd.template getProp<1>(key).template get<0>({2,2,2}) == 9.0*vd.getPos(key)[2]; ret &= vd.getProp<1>(key).get<0>({2,2,2}) == 9.0*vd.getPos(key)[2];
++it3; ++it3;
} }
......
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