PHASE is a physical optics and ray-tracing package.
This repository now uses CMake.
- CMake >= 3.20
- C compiler (e.g. clang/gcc)
- C++ compiler with C++17 support
- Fortran compiler
- Recommended:
gfortran flangis known to be problematic for legacy Fortran sources used byphaseqt/phasesrv
- Recommended:
Dependency requirements depend on enabled modules:
- Always for current default build:
- HDF5 (C + HL)
- For
phaseqt/phasesrv/opti:- FFTW3
- For
phaseqt:- Qt (Qt6 preferred, Qt5 supported)
- Qwt (if
USE_QWT=ON)
- For
opti:- ROOT with Minuit
cmake -S . -B build \
-DCMAKE_Fortran_COMPILER=gfortran
cmake --build build -jcmake --install buildCustom install prefix:
cmake -S . -B build \
-DCMAKE_Fortran_COMPILER=gfortran \
-DCMAKE_INSTALL_PREFIX=/your/prefix
cmake --build build -j
cmake --install buildUSE_MPI (default: OFF)
USE_DEBUG (default: OFF)
USE_OPENMP (default: OFF)
USE_QT6 (default: ON)
USE_QWT (default: ON)
BUILD_PHASEQT (default: ON)
BUILD_PHASESRV (default: ON)
BUILD_HDF5TOOLS (default: ON)
BUILD_FKOE (default: ON)
BUILD_OPTI (default: OFF)
BUILD_BASELIB (default: OFF)
BUILD_PHASELIB (default: OFF)
GRIDSIZE (default: 1)
cmake -S . -B build \
-DCMAKE_Fortran_COMPILER=gfortran \
-DBUILD_OPTI=ON
cmake --build build -jBuilds hdf5tools + fkoe, skips GUI/server/opti:
cmake -S . -B build-min \
-DBUILD_PHASEQT=OFF \
-DBUILD_PHASESRV=OFF \
-DBUILD_OPTI=OFF
cmake --build build-min -jcmake -S . -B build \
-DCMAKE_Fortran_COMPILER=gfortran \
-DBUILD_OPTI=ON
cmake --build build --target phaseqt -j
cmake --build build --target phasesrv -j
cmake --build build --target phaseopti -jOther useful targets include:
txtlog2phase_hdf5add_phaseu_2h5wave2phase_hdf5genesis2phase_hdf5wave2genesis_hdf5genesis_hdf5_2wavephase_hdf5_2wavefkoeopti_root_example
- If CMake picks
flangautomatically andphaseqt/phasesrvfail, reconfigure with:
cmake -S . -B build -DCMAKE_Fortran_COMPILER=gfortran- If Qt6 is installed in your home directory (for example on Ubuntu), pass its prefix explicitly:
cmake -S . -B build \
-DCMAKE_Fortran_COMPILER=gfortran \
-DPHASE_QT_PREFIX=$HOME/Qt/6.7.2/gcc_64Alternative (path to config directory):
cmake -S . -B build \
-DCMAKE_Fortran_COMPILER=gfortran \
-DQt6_DIR=$HOME/Qt/6.7.2/gcc_64/lib/cmake/Qt6- Existing legacy source warnings may still appear during compilation; this is expected for now.
If phaseqt fails with a message like
libQt6PrintSupport.so.6: cannot open shared object file, either:
- configure with
-DPHASE_QT_PREFIX=/path/to/Qt/<version>/<kit>and reinstall (recommended), or - set runtime lookup path manually:
export LD_LIBRARY_PATH=/path/to/Qt/<version>/<kit>/lib:$LD_LIBRARY_PATH