diff --git a/examples/hello/writer/helloWriter_OOP.cpp b/examples/hello/writer/helloWriter_OOP.cpp
index 31b07a80fb7e1c38eae5edeb9be9cd1a509e5378..af6cebb409fe06cc9354de0cb0e04ba67996d765 100644
--- a/examples/hello/writer/helloWriter_OOP.cpp
+++ b/examples/hello/writer/helloWriter_OOP.cpp
@@ -41,7 +41,7 @@ int main( int argc, char* argv [] )
         adios::Group& ioGroup = adios.DeclareGroup( "ioGroup" );
         adios::Var ioNx = ioGroup.DefineVariable<unsigned int>( "Nx" );
         adios::Dims dimNx = ioGroup.SetDimensions( {ioNx} );
-        adios::Var ioMyDoubles = ioGroup.DefineVariable<double>( "myDoubles" );
+        adios::Var ioMyDoubles = ioGroup.DefineVariable<double>( "myDoubles", dimNx );
 
         //add transform to variable in group...not executed (just testing API)
         adios::Transform bzip2 = adios::transform::BZIP2( );