Commit 4e666097 authored by incardon's avatar incardon

Small fix for Metis installation

parent a2f5c182
......@@ -321,7 +321,7 @@ int main(int argc, char* argv[])
// visualization
if (i % 100 == 0)
{
Old.write("output",count);
Old.write_frame("output",count);
count++;
}
}
......
......@@ -107,8 +107,8 @@ int main(int argc, char* argv[])
size_t timeSteps = 5000;
// K and F (Physical constant in the equation)
double K = 0.014;
double F = 0.053;
double K = 0.053;
double F = 0.014;
//! \cond [init lib] \endcond
......@@ -149,41 +149,58 @@ int main(int argc, char* argv[])
timer tot_sim;
tot_sim.start();
static grid_key_dx<3> star_stencil_3D[7] = {{0,0,0},
{0,0,-1},
{0,0,1},
{0,-1,0},
{0,1,0},
{-1,0,0},
{1,0,0}};
for (size_t i = 0; i < timeSteps; ++i)
{
if (i % 300 == 0)
std::cout << "STEP: " << i << std::endl;
auto it = Old.getDomainIterator();
auto it = Old.getDomainIteratorStencil(star_stencil_3D);
while (it.isNext())
{
auto key = it.get();
// center point
auto Cp = it.getStencil<0>();
// plus,minus X,Y,Z
auto mx = it.getStencil<1>();
auto px = it.getStencil<2>();
auto my = it.getStencil<3>();
auto py = it.getStencil<4>();
auto mz = it.getStencil<5>();
auto pz = it.getStencil<6>();
// update based on Eq 2
New.get<U>(key) = Old.get<U>(key) + uFactor * (
Old.get<U>(key.move(x,1)) +
Old.get<U>(key.move(x,-1)) +
Old.get<U>(key.move(y,1)) +
Old.get<U>(key.move(y,-1)) +
Old.get<U>(key.move(z,1)) +
Old.get<U>(key.move(z,-1)) -
6.0*Old.get<U>(key)) +
- deltaT * Old.get<U>(key) * Old.get<V>(key) * Old.get<V>(key) +
- deltaT * F * (Old.get<U>(key) - 1.0);
New.get<U>(Cp) = Old.get<U>(Cp) + uFactor * (
Old.get<U>(mz) +
Old.get<U>(pz) +
Old.get<U>(my) +
Old.get<U>(py) +
Old.get<U>(mx) +
Old.get<U>(px) -
6.0*Old.get<U>(Cp)) +
- deltaT * Old.get<U>(Cp) * Old.get<V>(Cp) * Old.get<V>(Cp) +
- deltaT * F * (Old.get<U>(Cp) - 1.0);
// update based on Eq 2
New.get<V>(key) = Old.get<V>(key) + vFactor * (
Old.get<V>(key.move(x,1)) +
Old.get<V>(key.move(x,-1)) +
Old.get<V>(key.move(y,1)) +
Old.get<V>(key.move(y,-1)) +
Old.get<V>(key.move(z,1)) +
Old.get<V>(key.move(z,-1)) -
6*Old.get<V>(key)) +
deltaT * Old.get<U>(key) * Old.get<V>(key) * Old.get<V>(key) +
- deltaT * (F+K) * Old.get<V>(key);
New.get<V>(Cp) = Old.get<V>(Cp) + vFactor * (
Old.get<V>(mz) +
Old.get<V>(pz) +
Old.get<V>(my) +
Old.get<V>(py) +
Old.get<V>(mx) +
Old.get<V>(px) -
6*Old.get<V>(Cp)) +
deltaT * Old.get<U>(Cp) * Old.get<V>(Cp) * Old.get<V>(Cp) +
- deltaT * (F+K) * Old.get<V>(Cp);
// Next point in the grid
++it;
......
......@@ -296,7 +296,7 @@ set_mpi $i_dir $ncore $CC $CXX $F77 $FC
./script/install_Parmetis.sh $i_dir $ncore
configure_options=" $configure_options --with-parmetis=$i_dir/PARMETIS "
./script/install_Metis.sh $i_dir $compiler_gcc $compiler_gpp $ncore
./script/install_Metis.sh $i_dir $CC $CXX $ncore
configure_options=" $configure_options --with-metis=$i_dir/METIS "
MPI_installed=0
......@@ -343,7 +343,7 @@ else
echo "Error the installation of METIS failed"
exit 1
fi
./script/install_Metis.sh $i_dir $compiler_gcc $compiler_gpp
./script/install_Metis.sh $i_dir $CC $CXX
METIS_installed=1
configure_options=" $configure_options --with-metis=$i_dir/METIS "
elif [ $conf_err -eq 202 ]; then
......
......@@ -193,7 +193,7 @@ function detect_compiler()
dgc_ret=1
icpc_found=1
elif [ $dgc_major -lt 17 ]; then
echo -e "icpc $dgc_major.$dgc_middle.$dgc_minor \033[91;5;1m FAILED \033[0m your icpc version is too old intel 16.0.2 at least required"
echo -e "icpc $dgc_major.$dgc_middle.$dgc_minor \033[91;5;1m FAILED \033[0m your icpc version is too old intel 17.0.X at least required"
dgc_ret=0
icpc_found=0
elif [ $dgc_middle -gt 0 ]; then
......
......@@ -344,6 +344,8 @@ void Test3D_stencil(const Box<3,float> & domain, long int k)
while (st_it.isNext())
{
auto key = st_it.get();
// center point
auto Cp = st_it.getStencil<0>();
......@@ -365,6 +367,12 @@ void Test3D_stencil(const Box<3,float> & domain, long int k)
ret &= (sum == 0);
// get the local grid info
grid_sm<3,void> info = g_dist.get_loc_grid(key.getSub()).getGrid();
ret &= info.LinId(key.getKey()) == (long int)Cp.getKey();
++st_it;
}
......
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