diff --git a/make_deps.sh b/make_deps.sh index 5c8da679b73ad9407fc7e76aa1bd96a713aac737..de423e7053d1e14f8d93fb025cb32ec8ed541ff9 100755 --- a/make_deps.sh +++ b/make_deps.sh @@ -70,11 +70,11 @@ if [ ! "$BUILD_BLITZ" = "yes" ]; then else echo "Building Blitz++" # Download the Blitz tarball if necessary - if [ ! -e "blitz_2010.tgz" ]; then - mv redist_libs/blitz_2010.tgz ./ + if [ ! -e "blitz_1.0.2.tar.gz" ]; then + mv redist_libs/blitz_1.0.2.tar.gz ./ fi - (tar -xzvf blitz_2010.tgz > /dev/null) || (echo "Untar of Blitz FAILED"; exit 1); - pushd blitz + (tar -xzvf blitz_1.0.2.tar.gz > /dev/null) || (echo "Untar of Blitz FAILED"; exit 1); + pushd blitz-1.0.2 (./configure --prefix="$CWD" --disable-fortran "${BLITZ_OPTIONS}" > /dev/null) && \ (make lib > /dev/null) && \ pushd blitz && (make install > /dev/null) && popd && \ @@ -92,14 +92,14 @@ if [ ! "$BUILD_FFTW" = "yes" ]; then else echo "Building FFTW" # Download FFTW if necessary - if [ ! -e "fftw-3.3.3.tar.gz" ]; then - mv redist_libs/fftw-3.3.3.tar.gz ./ + if [ ! -e "fftw-3.3.9.tar.gz" ]; then + mv redist_libs/fftw-3.3.9.tar.gz ./ fi - (tar -xzvf fftw-3.3.3.tar.gz > /dev/null) + (tar -xzvf fftw-3.3.9.tar.gz > /dev/null) if [ 0 -ne $? ]; then echo "Untar of FFTW FAILED"; exit 1 fi - pushd fftw-3.3.3 + pushd fftw-3.3.9 # The "${FFTW_OPTIONS[@]}" syntax expands FFTW_OPTIONS as an array variable; # this allows for multi-word arguments like 'CFLAGS="-O3 --fast-math"' to # work properly as a single argument from configure's perspective. diff --git a/src/ESolver.cpp b/src/ESolver.cpp index 656e4ea7e9db368bedddd3f518036739a538939f..4eab40950d4ee123d7365c986312ec4469d1aa1d 100644 --- a/src/ESolver.cpp +++ b/src/ESolver.cpp @@ -1,6 +1,5 @@ #include "TArray.hpp" #include "blitz/array.h" -#include "blitz/tinyvec-et.h" #include "ESolver.hpp" #include "gmres_1d_solver.hpp" #include "gmres_2d_solver.hpp" diff --git a/src/Parformer.cpp b/src/Parformer.cpp index 331a2922a7814e9f108461a76bb33d7c5558f6b5..383bde710afa35632db5c47b0a31495e5543eba2 100644 --- a/src/Parformer.cpp +++ b/src/Parformer.cpp @@ -2,7 +2,6 @@ #include "Parformer.hpp" #include "Par_util.hpp" -#include <blitz/tinyvec-et.h> #include <stdio.h> #include <iostream> diff --git a/src/Sorter.cpp b/src/Sorter.cpp index 27836927fd8cf6304b09a56fe88c988b0ad1108e..21b008b84e61bc5e0bab79f1f086418f81056639 100644 --- a/src/Sorter.cpp +++ b/src/Sorter.cpp @@ -10,7 +10,6 @@ #include <vector> #include <algorithm> #include <stdlib.h> -#include <blitz/tinyvec-et.h> #include "Sorter.hpp" diff --git a/src/Splits.cpp b/src/Splits.cpp index 1e366bee7578ab2e7cd6f5f8fa87ff0abf8240b7..afb5162e76e7404e68b999170432d4e713c305e2 100644 --- a/src/Splits.cpp +++ b/src/Splits.cpp @@ -2,7 +2,6 @@ #include <vector> #include <blitz/array.h> -#include <blitz/tinyvec-et.h> #include <stdio.h> #include <iostream> #include <complex> @@ -121,7 +120,7 @@ src_temp(0), dst_temp(0), issue_warning(true) { rec_types.resize(num_proc); // make sure our vector can hold everything for (int i = 0; i < num_proc; i++) { - // We'll have to use the MPI_Type_struct syntax, so build arrays: + /*// We'll have to use the MPI_Type_struct syntax, so build arrays: MPI_Datatype types[2] = {vec_type,MPI_UB}; int counts[2]; counts[0] = extent_from[i]; counts[1] = 1; // Now, set displacements to set the "end" of the datatype a full @@ -129,8 +128,23 @@ src_temp(0), dst_temp(0), issue_warning(true) { MPI_Aint displs[2] = {0,sizeof(T)*sizes[untouched_dim]*sizes[from_dim]}; // And make the type - MPI_Type_struct(2,counts,displs,types,&rec_types[i]); + MPI_Type_struct(2,counts,displs,types,&rec_types[i]);*/ + + // This code formerly used the MPI_UB marker to define the upper bound + // of the derived datatype. This was deprecated as part of the MPI-2 + // standard, and it was removed in MPI-3. The replacement is to use + // MPI_Type_create_resized to create a resized type directly. + + // First, create the multi-vector containing the data: + MPI_Datatype multivec; + MPI_Type_contiguous(extent_from[i],vec_type,&multivec); + + MPI_Type_create_resized(multivec, 0, // base type, lower bound + sizeof(T)*sizes[untouched_dim]*sizes[from_dim], // extent + &rec_types[i]); // new type + MPI_Type_commit(&rec_types[i]); + MPI_Type_free(&multivec); /* Impelementation note: one optimization possible here is to collapse this typelist. This impelementation makes no assumptions about how many part-rows are received per processor, but our default splitting diff --git a/src/TArray.cpp b/src/TArray.cpp index 5137e9246470d394ba6f4945bc1e9d2906848bb3..d10b09d13d04ee926293b0810251afb4115d04ff 100644 --- a/src/TArray.cpp +++ b/src/TArray.cpp @@ -1,6 +1,5 @@ #include "TArray.hpp" #include "Plan_holder.hpp" -#include <blitz/tinyvec-et.h> #include <assert.h> #include <fftw3.h> // FFTW /* Implementation of TArray transform functions for the relevant cases. diff --git a/src/T_util.cpp b/src/T_util.cpp index 7503f132e5c428f1f71124a334c87f4fa61a8e67..7913ee76aafaddfba21dc5224e217ab9f81b0ab0 100644 --- a/src/T_util.cpp +++ b/src/T_util.cpp @@ -1,7 +1,6 @@ #include "T_util.hpp" #include "TArray.hpp" #include <blitz/array.h> -#include <blitz/tinyvec-et.h> #include "Par_util.hpp" #include <complex> #include <string> diff --git a/src/VERSION b/src/VERSION index 2944c9e8063acc3ac0de00f2350a9e70fc6318e9..882b025b720b8ddb68732c2992c7484ee47f79f2 100644 --- a/src/VERSION +++ b/src/VERSION @@ -1,3 +1,3 @@ MAJOR_VERSION=2 MINOR_VERSION=1 -PATCH_VERSION=6 +PATCH_VERSION=7 diff --git a/src/gmres.hpp b/src/gmres.hpp index 1499ae3234ef06376ffc76b4d12594da2f042e58..863eed30f69ca4096bff355ad44caa9b266b4a5a 100644 --- a/src/gmres.hpp +++ b/src/gmres.hpp @@ -269,8 +269,8 @@ template <class Controller> class GMRES_Solver { /* Perform the inner iteration */ /* First, allocate vectors for residuals and the Krylov basis */ - blitz::Vector<RType> resid_vec(num_its+1); - blitz::Vector<BType> basis_vec(num_its); // Note, these are base 0 + blitz::Array<RType,1> resid_vec(num_its+1); + blitz::Array<BType,1> basis_vec(num_its); // Note, these are base 0 for (int k = 0; k < num_its; k++) { resid_vec(k) = ops->alloc_resid(); basis_vec(k) = ops->alloc_basis(); @@ -406,7 +406,7 @@ template <class Controller> class GMRES_Solver { return my_it-1; } - void build_x(BType out_x, blitz::Vector<BType> & basis_vec, + void build_x(BType out_x, blitz::Array<BType,1> & basis_vec, blitz::Array<double,1> & rhs_vec, double starting_norm, int my_it) { /* Now, the Krylov basis is in basis_vec, and the proper multiples are in diff --git a/src/multigrid.cpp b/src/multigrid.cpp index 7df67096bd518b3e46bf98a718d016a22691b967..46836679ee105f0b58551c511976a9281e5b9433 100644 --- a/src/multigrid.cpp +++ b/src/multigrid.cpp @@ -3,7 +3,6 @@ #include <blitz/array.h> #include <iostream> -#include <blitz/tinyvec-et.h> #include "umfpack.h" #include "timing.hpp" @@ -1897,14 +1896,14 @@ void MG_Solver::_cycle(CYCLE_TYPE cycle, Array<double,2> & f, Array<double,2> & that the problem is really of size (1+size_x*size_z); this doesn't actually fit in u or f. So, allocate static blitz-vectors for the data, if necessary. */ - static blitz::Vector<double> extra_u(0), extra_f(0); + static blitz::Array<double,1> extra_u(0), extra_f(0); // fprintf(stderr,"CG: Input residual\n"); // cerr << f; if (indefinite_problem) { // fprintf(stderr,"Solving indefinite problem on coarse grid\n"); - if (extra_u.length() != (size_x*size_z+1)) + if (extra_u.length(firstDim) != (size_x*size_z+1)) extra_u.resize(size_x*size_z+1); - if (extra_f.length() != (size_x*size_z+1)) + if (extra_f.length(firstDim) != (size_x*size_z+1)) extra_f.resize(size_x*size_z+1); // Copy the f-problem to extra_f