Skip to content
Snippets Groups Projects
Commit 94539709 authored by Chichi Lalescu's avatar Chichi Lalescu
Browse files

bugfix --- correct field_descriptor inits

parent 38a52024
Branches
Tags
No related merge requests found
......@@ -51,7 +51,7 @@ RMHD_converter::RMHD_converter(
// (which is generally an even number)
n[0] = n0*n1;
n[1] = n2;
this->f0c = new field_descriptor(2, n, MPI_COMPLEX8);
this->f0c = new field_descriptor(2, n, MPI_COMPLEX8, MPI_COMM_WORLD);
// f1c will be pointing at the input array after it has been
// transposed in 2D, therefore we have this correspondence:
......@@ -59,13 +59,13 @@ RMHD_converter::RMHD_converter(
n[0] = n2;
n[1] = n0;
n[2] = n1;
this->f1c = new field_descriptor(3, n, MPI_COMPLEX8);
this->f1c = new field_descriptor(3, n, MPI_COMPLEX8, MPI_COMM_WORLD);
// the description for the fully transposed field
n[0] = n2;
n[1] = n1;
n[2] = n0;
this->f2c = new field_descriptor(3, n, MPI_COMPLEX8);
this->f2c = new field_descriptor(3, n, MPI_COMPLEX8, MPI_COMM_WORLD);
// following 3 arguments are dimensions for real space grid dimensions
// f3r and f3c will be allocated in this call
......@@ -96,15 +96,15 @@ RMHD_converter::RMHD_converter(
n[0] = N0*2;
n[1] = N1;
n[2] = N2;
this->f4r = new field_descriptor(3, n, MPI_REAL4);
this->f4r = new field_descriptor(3, n, MPI_REAL4, MPI_COMM_WORLD);
n[0] = N0/8;
n[1] = N1/8;
n[2] = N2/8;
n[3] = 8*8*8*2;
this->drcubbie = new field_descriptor(4, n, MPI_REAL4);
this->drcubbie = new field_descriptor(4, n, MPI_REAL4, MPI_COMM_WORLD);
n[0] = (N0/8) * (N1/8) * (N2/8);
n[1] = 8*8*8*2;
this->dzcubbie = new field_descriptor(2, n, MPI_REAL4);
this->dzcubbie = new field_descriptor(2, n, MPI_REAL4, MPI_COMM_WORLD);
}
......
......@@ -135,11 +135,11 @@ int fftwf_get_descriptors_3D(
ntmp[0] = n0;
ntmp[1] = n1;
ntmp[2] = n2;
*fr = new field_descriptor(3, ntmp, MPI_REAL4);
*fr = new field_descriptor(3, ntmp, MPI_REAL4, MPI_COMM_WORLD);
ntmp[0] = n0;
ntmp[1] = n1;
ntmp[2] = n2/2+1;
*fc = new field_descriptor(3, ntmp, MPI_COMPLEX8);
*fc = new field_descriptor(3, ntmp, MPI_COMPLEX8, MPI_COMM_WORLD);
return EXIT_SUCCESS;
}
......@@ -232,6 +232,6 @@ field_descriptor* field_descriptor::get_transpose()
int n[this->ndims];
for (int i=0; i<this->ndims; i++)
n[i] = this->sizes[this->ndims - i - 1];
return new field_descriptor(this->ndims, n, this->mpi_dtype);
return new field_descriptor(this->ndims, n, this->mpi_dtype, this->comm);
}
{
"metadata": {
"name": "",
"signature": "sha256:81d6e5b84639491eb537b89cba2864168127d437faeb5298d4c8e2dc26ef2d12"
"signature": "sha256:ae900b72d559af23210256bab2cd50894706b98d9b53b4846df0f6db9ae56322"
},
"nbformat": 3,
"nbformat_minor": 0,
......@@ -21,16 +21,8 @@
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stderr",
"text": [
"WARNING:traits.has_traits:DEPRECATED: traits.has_traits.wrapped_class, 'the 'implements' class advisor has been deprecated. Use the 'provides' class decorator.\n"
]
}
],
"prompt_number": 2
"outputs": [],
"prompt_number": 1
},
{
"cell_type": "code",
......@@ -79,7 +71,7 @@
]
}
],
"prompt_number": 3
"prompt_number": 2
},
{
"cell_type": "code",
......@@ -174,7 +166,7 @@
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 94
"prompt_number": 3
},
{
"cell_type": "code",
......@@ -201,7 +193,7 @@
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 110
"prompt_number": 4
},
{
"cell_type": "code",
......@@ -227,12 +219,12 @@
"stream": "stdout",
"text": [
"2.86102e-06\n",
"[4 0 1]\n",
"68 68 0.0\n"
"[12 9 2]\n",
"1634 1634 0.0\n"
]
}
],
"prompt_number": 111
"prompt_number": 6
},
{
"cell_type": "code",
......@@ -254,7 +246,7 @@
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 112
"prompt_number": 8
},
{
"cell_type": "code",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment