Skip to content

Commit

Permalink
Merge pull request #14 from ParaToolsInc/wspear-tau-paths
Browse files Browse the repository at this point in the history
Allow alternate tau dir for tests
  • Loading branch information
zbeekman authored Mar 4, 2024
2 parents ee8d646 + 702336e commit f5ebf3a
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 19 deletions.
33 changes: 20 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -315,36 +315,43 @@ endforeach()


################
# The following paths are fragile and somewhat specific to
# The following default paths are fragile and somewhat specific to
# the salt-dev container.
# More abstract & robust logic for reasoning about TAU
# isntallations and their locations would be helpful here.
# For alternative TAU installs add -DTAU_ROOT=<dir> to the
# cmake invication. Make sure TAU is built with these
# configurations: -pthread -cc=clang -c++=clang++ -bfd=download
# -unwind=download -dwarf=download -otf=download
# and -pthread -bfd=download -unwind=download -libdwarf=download
# -otf=download

set(TAU_ROOT "/usr/local" CACHE PATH "TAU Root Directory")

find_file(TAU_CLANG_MAKEFILE Makefile.tau-clang-pthread
PATH_SUFFIXES x86_64 x86_64/lib
PATHS ${TAU_ROOT} PATH_SUFFIXES x86_64 x86_64/lib
)
find_file(TAU_GCC_MAKEFILE Makefile.tau-pthread
PATH_SUFFIXES x86_64 x86_64/lib
PATHS ${TAU_ROOT} PATH_SUFFIXES x86_64 x86_64/lib
)
find_program(TAUCC tau_cc.sh
PATH_SUFFIXES x86_64 x86_64/bin
PATHS ${TAU_ROOT} PATH_SUFFIXES x86_64 x86_64/bin
)
find_program(TAUCXX tau_cxx.sh
PATH_SUFFIXES x86_64 x86_64/bin
PATHS ${TAU_ROOT} PATH_SUFFIXES x86_64 x86_64/bin
)
find_program(TAU_EXEC tau_exec
PATH_SUFFIXES x86_64 x86_64/bin
PATHS ${TAU_ROOT} PATH_SUFFIXES x86_64 x86_64/bin
)

set(TAU_HEADER_LOCATIONS
-I/usr/local/include
-I${TAU_ROOT}/include
)
set(TAU_CLANG_HEADER_LOCATIONS
-I/usr/local/x86_64/libdwarf-clang/include
-I/usr/local/x86_64/libunwind-1.3.1-clang/include
-I${TAU_ROOT}/x86_64/libdwarf-clang/include
-I${TAU_ROOT}/x86_64/libunwind-1.3.1-clang/include
)
set(TAU_GCC_HEADER_LOCATIONS
-I/usr/local/x86_64/libdwarf-clang/include
-I/usr/local/x86_64/libunwind-1.3.1-clang/include
-I${TAU_ROOT}/x86_64/libdwarf-clang/include
-I${TAU_ROOT}/x86_64/libunwind-1.3.1-clang/include
)
# End of section that note applies to
################
Expand Down
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ may fix the problem.

``` shell
$ docker pull paratools/salt-dev:latest
$ docker run -it --pull --tmpfs=/dev/shm:rw,nosuid,nodev,exec \
$ docker run -it --pull always --tmpfs=/dev/shm:rw,nosuid,nodev,exec \
--privileged -v $(pwd):/home/salt/src paratools/salt-dev:latest
# cd /home/salt/src
# ccache --show-stats
Expand All @@ -65,7 +65,7 @@ for testing with both GCC and Clang.
### 3. Configure and build SALT:

This step is most easily performed in the [salt-dev] container,
but can also be performed in a suitable installation of LLVM and Clang are present.
but can also be performed if a suitable installation of LLVM and Clang are present.

``` shell
# Tell CMake to use the clang/clang++ compiler to build SALT
Expand All @@ -75,6 +75,8 @@ export CXX=clang++
cmake -Wdev -Wdeprecated -S . -B build
cmake --build build --parallel # Add --verbose to debug something going wrong
```
To specify a TAU installation for testing other than the one used by the [salt-dev] container
you can add `-DTAU_ROOT=<dir>` to the first cmake invocation.

If the Ninja build system is present and you prefer it to Makefiles
(it's already present in the [salt-dev] container image),
Expand Down Expand Up @@ -106,10 +108,17 @@ The tests are all located in the `tests` subdirectory of the project.
* Old profiles associated with each test are JIT removed
* New profiles are moved to subdirectories indicating which test they are assosciated with

A limitation of the tests is that they assume a TAU installation matching the [salt-dev]
development image.
If you don't have a GCC and Clang configuration of TAU installed into the default location
(`/usr/local/x86_64/`) then some of the tests will fail.
By default the tests assume a TAU installation matching the [salt-dev]
development image (located at `/usr/local/x86_64/` with a GCC and Clang configuration).

To use a different TAU installation add `-DTAU_ROOT=<dir>` to the cmake invocation.
The specified directory should point to a TAU install built with at least these two configurations:

`-pthread -cc=clang -c++=clang++ -bfd=download -unwind=download -dwarf=download -otf=download`

and

`-pthread -bfd=download -unwind=download -libdwarf=download -otf=download`

### 5. Example usage:

Expand Down

0 comments on commit f5ebf3a

Please sign in to comment.