Installation#
Prerequisites#
GFortran version 7.5.0 or newer. For more information, refer to the GFortran website.
Building and testing hipFORT from source#
Ensure you have gfortran, git, cmake, and HIP installed.
Build, install, and test hipFORT from the source with the following commands:
git clone https://github.com/ROCmSoftwarePlatform/hipfort
mkdir build ; cd build
cmake -DHIPFORT_INSTALL_DIR=/tmp/hipfort ..
make install
export PATH=/tmp/hipfort/bin:$PATH
cd ../test/f2003/vecadd
hipfc -v hip_implementation.cpp main.f03
./a.out
The preceding steps demonstrate the hipfc utility. hipfc calls hipcc for non-Fortran files and then compiles the Fortran files and links to the object file created by hipcc.