Below how to compile OpenMX is described. We are supposed to use the latest version of OpenMX (3.9).
Go to the source directory and set the compiler and options in makefile as follows
CC = mpiicc -O3 -xHOST -qopenmp -ip -no-prec-div -I$(MKLROOT)/include/fftw -axCOMMON-AVX512,CORE-AVX512,CORE-AVX2,CORE-AVX-I,AVX FC = mpiifort -O3 -xHOST -qopenmp -ip -no-prec-div -axCOMMON-AVX512,CORE-AVX512,CORE-AVX2,CORE-AVX-I,AVX LIB= -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -mkl=parallel -lifcore
In the source directory (source/) type
$ make
In the work/ directory, type
$ mpirun -np 4 ../source/openmx --runtest
or in other directory do the same. In the latter case, make sure that input_example is copied from the "work" directory.