Skip to content

Commit

Permalink
Move libyt/example to libyt/example/amr-example, and create example/q…
Browse files Browse the repository at this point in the history
…uick-start
  • Loading branch information
cindytsai committed Apr 16, 2024
1 parent 33f97a2 commit 9d054b0
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 16 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/example-test-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,26 +82,26 @@ jobs:
- name: Prepare Test
run: |
cd ${{ github.workspace }}/example
cd ${{ github.workspace }}/example/amr-example
cp ${{ github.workspace }}/.github/tests/test-DataIO/DataIOTest.py .
- name: Generate Density Data for Testing
run: |
cd ${{ github.workspace }}/example
cd ${{ github.workspace }}/example/amr-example
cp ${{ github.workspace }}/.github/tools/generate_density_data.cpp .
g++ -o generate_density_data generate_density_data.cpp
./generate_density_data
- name: Test Run and DataIO Test - example - Serial
run: |
cd ${{ github.workspace }}/example
cd ${{ github.workspace }}/example/amr-example
make clean
make OPTIONS=-DSERIAL_MODE LIBYT_PATH="${{ env.LIBYT_SERIAL_INSTALL_PATH }}"
./example DataIOTest.py
- name: Test Run and DataIO Test - example - Parallel (MPI 3)
- name: Test Run and DataIO Test - example - Parallel (MPI Size 3)
run: |
cd ${{ github.workspace }}/example
cd ${{ github.workspace }}/example/amr-example
make clean
make LIBYT_PATH="${{ env.LIBYT_PARALLEL_INSTALL_PATH }}"
OMPI_MCA_osc=sm,pt2pt mpirun -np 3 ./example DataIOTest.py
13 changes: 2 additions & 11 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,2 @@
if (NOT SERIAL_MODE)
find_package(MPI REQUIRED)
endif ()

add_executable(example example.cpp)

if (NOT SERIAL_MODE)
target_link_libraries(example PUBLIC MPI::MPI_CXX)
endif ()
target_link_libraries(example PUBLIC yt)
target_include_directories(example PUBLIC "../include")
add_subdirectory(quick-start)
add_subdirectory(amr-example)
11 changes: 11 additions & 0 deletions example/amr-example/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
if (NOT SERIAL_MODE)
find_package(MPI REQUIRED)
endif ()

add_executable(example example.cpp)

if (NOT SERIAL_MODE)
target_link_libraries(example PUBLIC MPI::MPI_CXX)
endif ()
target_link_libraries(example PUBLIC yt)
target_include_directories(example PUBLIC "../../include")
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.

0 comments on commit 9d054b0

Please sign in to comment.