Skip to content

Commit

Permalink
Merge remote-tracking branch 'mainline/dev' into fix-h5EarlyChunk
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l committed Jul 21, 2021
2 parents 782c78e + bf5174d commit 080ac6c
Show file tree
Hide file tree
Showing 8 changed files with 147 additions and 109 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ if(openPMD_BUILD_TESTING)
"to add example files to samples/git-sample/ directory!")
else()
message(STATUS "Note: run\n"
" . ${openPMD_SOURCE_DIR}/share/openPMD/download_samples.sh\n"
" ${openPMD_SOURCE_DIR}/share/openPMD/download_samples.sh\n"
"to add example files to samples/git-sample/ directory!")
endif()
endif()
Expand Down
1 change: 1 addition & 0 deletions examples/8a_benchmark_write_parallel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class MemoryProfiler
m_Name = "/proc/self/status";
Display(tag);
#else
(void)tag;
m_Name = "";
#endif
}
Expand Down
1 change: 1 addition & 0 deletions examples/8b_benchmark_read_parallel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class MemoryProfiler
m_Name = "/proc/self/status";
Display(tag);
#else
(void)tag;
m_Name = "";
#endif
}
Expand Down
7 changes: 0 additions & 7 deletions include/openPMD/Datatype.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ toBytes( Datatype d )
// case DT::SCHAR:
// case DT::VEC_SCHAR:
// return sizeof(signed char);
// break;
case DT::SHORT:
case DT::VEC_SHORT:
return sizeof(short);
Expand Down Expand Up @@ -270,19 +269,15 @@ toBytes( Datatype d )
case DT::LONG_DOUBLE:
case DT::VEC_LONG_DOUBLE:
return sizeof(long double);
break;
case DT::CFLOAT:
case DT::VEC_CFLOAT:
return sizeof(float) * 2;
break;
case DT::CDOUBLE:
case DT::VEC_CDOUBLE:
return sizeof(double) * 2;
break;
case DT::CLONG_DOUBLE:
case DT::VEC_CLONG_DOUBLE:
return sizeof(long double) * 2;
break;
case DT::BOOL:
return sizeof(bool);
case DT::DATATYPE:
Expand Down Expand Up @@ -360,10 +355,8 @@ isFloatingPoint( Datatype d )
case DT::VEC_LONG_DOUBLE:
// note: complex floats are not std::is_floating_point
return true;
break;
default:
return false;
break;
}
}

Expand Down
18 changes: 15 additions & 3 deletions share/openPMD/download_samples.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
# build directory as optional first argument, otherwise $PWD
# we assume PWD is inside the CMake build directory
Param(
[parameter(Position=0)]$bdir = $(Get-Location | Foreach-Object { $_.Path })
)

$orgdir = $(Get-Location | Foreach-Object { $_.Path })
cd $bdir

New-item -ItemType directory -Name samples\git-sample\thetaMode\
New-item -ItemType directory -Name samples\git-sample\3d-bp4\
Invoke-WebRequest https://github.com/openPMD/openPMD-example-datasets/raw/72545c4d6bcca2c258bffd2eabe38679b2507c80/example-3d.tar.gz -OutFile example-3d.tar.gz
Invoke-WebRequest https://github.com/openPMD/openPMD-example-datasets/raw/72545c4d6bcca2c258bffd2eabe38679b2507c80/example-thetaMode.tar.gz -OutFile example-thetaMode.tar.gz
Invoke-WebRequest https://github.com/openPMD/openPMD-example-datasets/raw/72545c4d6bcca2c258bffd2eabe38679b2507c80/example-3d-bp4.tar.gz -OutFile example-3d-bp4.tar.gz

Invoke-WebRequest https://github.com/openPMD/openPMD-example-datasets/raw/f3b73e43511db96217a153dc3ab3cb2e8f81f7db/example-3d.tar.gz -OutFile example-3d.tar.gz
Invoke-WebRequest https://github.com/openPMD/openPMD-example-datasets/raw/f3b73e43511db96217a153dc3ab3cb2e8f81f7db/example-thetaMode.tar.gz -OutFile example-thetaMode.tar.gz
Invoke-WebRequest https://github.com/openPMD/openPMD-example-datasets/raw/f3b73e43511db96217a153dc3ab3cb2e8f81f7db/example-3d-bp4.tar.gz -OutFile example-3d-bp4.tar.gz
7z.exe x -r example-3d.tar.gz
7z.exe x -r example-3d.tar
7z.exe x -r example-thetaMode.tar.gz
Expand All @@ -29,3 +39,5 @@ Invoke-WebRequest https://github.com/openPMD/openPMD-viewer/files/5655027/diags.
Expand-Archive empty_alternate_fbpic.zip
Move-Item -Path empty_alternate_fbpic\diags\hdf5\data00000050.h5 samples\issue-sample\empty_alternate_fbpic_00000050.h5
Remove-Item -Recurse -Force empty_alternate_fbpic*

cd $orgdir
17 changes: 14 additions & 3 deletions share/openPMD/download_samples.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
#!/usr/bin/env bash
#

# build directory as optional first argument, otherwise $PWD
# we assume PWD is inside the CMake build directory
bdir=${1:-$(pwd)}

orgdir=$(pwd)
mkdir -p ${bdir}
cd ${bdir}

mkdir -p samples/git-sample/thetaMode
mkdir -p samples/git-sample/3d-bp4
curl -sOL https://github.com/openPMD/openPMD-example-datasets/raw/72545c4d6bcca2c258bffd2eabe38679b2507c80/example-3d.tar.gz
curl -sOL https://github.com/openPMD/openPMD-example-datasets/raw/72545c4d6bcca2c258bffd2eabe38679b2507c80/example-thetaMode.tar.gz
curl -sOL https://github.com/openPMD/openPMD-example-datasets/raw/72545c4d6bcca2c258bffd2eabe38679b2507c80/example-3d-bp4.tar.gz

curl -sOL https://github.com/openPMD/openPMD-example-datasets/raw/f3b73e43511db96217a153dc3ab3cb2e8f81f7db/example-3d.tar.gz
curl -sOL https://github.com/openPMD/openPMD-example-datasets/raw/f3b73e43511db96217a153dc3ab3cb2e8f81f7db/example-thetaMode.tar.gz
curl -sOL https://github.com/openPMD/openPMD-example-datasets/raw/f3b73e43511db96217a153dc3ab3cb2e8f81f7db/example-3d-bp4.tar.gz
tar -xzf example-3d.tar.gz
tar -xzf example-thetaMode.tar.gz
tar -xzf example-3d-bp4.tar.gz
Expand All @@ -30,3 +39,5 @@ curl -sOL https://github.com/openPMD/openPMD-viewer/files/5655027/diags.zip
unzip diags.zip
mv diags/hdf5/data00000050.h5 samples/issue-sample/empty_alternate_fbpic_00000050.h5
rm -rf diags.zip diags

cd ${orgdir}
1 change: 0 additions & 1 deletion src/IO/HDF5/HDF5IOHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,6 @@ HDF5IOHandlerImpl::closeFile(
throw std::runtime_error(
"[HDF5] Trying to close a file that is not "
"present in the backend" );
return;
}
File file = optionalFile.get();
H5Fclose( file.id );
Expand Down
Loading

0 comments on commit 080ac6c

Please sign in to comment.