- Install OpenARC compiler
First, set up the environment variable, openarc to the root directory of the OpenARC repository.
$ export openarc=[OpenARC-root-directory]Second, set up the environment variable, OPENARC_ARCH to a correct value depending on the target device.
(See README.md file in the OpenARC repository for more details.)
$ export OPENARC_ARCH=0 #for NVIDIA GPUs with CUDA.
$ export OPENARC_ARCH=1 #for general OpenCL devices.
$ export OPENARC_ARCH=2 #for Xeon Phi with OpenCL
$ export OPENARC_ARCH=3 #for Intel FPGA with OpenCL
$ export OPENARC_ARCH=4 #for MCL with OpenCL
$ export OPENARC_ARCH=5 #for AMD GPUs with HIP
$ export OPENARC_ARCH=6 #for IRIS/BrisbaneThird, build the OpenARC compiler.
$ cd ${openarc}
$ make purge
$ makeEnvironment variables, OPENARC_ARCH and openarc should be set up properly to run the build scripts correctly.
- To compile and run OpenACC C sync version of P2Z
$ cd [directory-where-this-file-exists]
$ make COMPILER=openarc MODE=accc
$ cd ./bin
$ ./propagate_openarc_accc- To compile OpenACC C async version (v3) of P2Z
$ make COMPILER=openarc MODE=acccv3- To compile OpenMP4 C sync version of P2Z
$ make COMPILER=openarc MODE=omp4c- To compile OpenMP4 C async version (v3) of P2Z
$ make COMPILER=openarc MODE=omp4cv3- To compile OpenACC C sync version of P2Z for CPU
$ make COMPILER=openarc MODE=accccpu- To compile OpenACC C async version (v3) of P2Z for CPU
$ make COMPILER=openarc MODE=acccv3cpu- To enable the host-memory-prepinning optimization, set up the environment variable,
OPENARCRT_PREPINHOSTMEMto1before running the application.
$ export OPENARCRT_PREPINHOSTMEM=1- The best performance will be achieved if using the async OpenACC version with the host-memory-prepinning optimization:
$ make COMPILER=openarc MODE=acccv3
$ export OPENARCRT_PREPINHOSTMEM=1
$ cd ./bin
$ ./propagate_openarc_acccv3