shankar1729 / jdftx

JDFTx: software for joint density functional theory
http://jdftx.org
84 stars 54 forks source link

Compilation on NEC SX architecture #233

Closed alex-aziz closed 2 years ago

alex-aziz commented 2 years ago

I have started to use an unfamiliar NEC vector-type supercomputer (SX-Aurora TSUBASA) and have very little knowledge of compiling on it.

I am wondering if anyone has successfully compiled JDFTx on a similar architecture, and if so could they share the process.

Many thanks, Alex

shankar1729 commented 2 years ago

Hi Alex,

I have not encountered this architecture before and there haven't been any questions about compiling on it before either. From a brief search, it appears that that these machines could either run a standard linux OS (such as CentOS or RHEL) or a customized linux-based "VEOS" by NEC.

If it's the former, then the compilation should be same as for the same linux OS on other hardware, although performance could still be a question.

If it's the latter, you will need to compile all the dependencies for this target OS. In particular, you will need to make sure you get suitable BLAS and FFT implementations to get performance. Hopefully, your supercomputer support staff should be able to advise further, as these machines don't seem that common and have relatively limited public information on the software side.

If you get JDFTx to work well on these machines, please post compilation instructions and we would gladly add it to the compilation pages.

Thanks! Best, Shankar

alex-aziz commented 2 years ago

I have received some help from Tohoku University (Japan) and I did have to install the dependencies. If anyone else is interested or comes across a similar machine. Here are the steps that they advised that gave a successful compilation.

DIR=$HOME/installation_directory

mkdir -p $DIR cd $DIR

wget https://github.com/shankar1729/jdftx/archive/refs/tags/v1.7.0.tar.gz wget https://mirror.ibcp.fr/pub/gnu/gsl/gsl-latest.tar.gz wget https://www.fftw.org/fftw-3.3.10.tar.gz

tar xvfz gsl-latest.tar.gz cd gsl-2.7.1/ ./configure CC="clang -march=znver2 -O3 -fPIC" CXX="clang++ -march=znver2 -O3 -fPIC" --prefix=$DIR/usr make make install

cd ../ tar xvfz fftw-3.3.10.tar.gz cd fftw-3.3.10 ./configure CC="clang -march=znver2 -O3 -fpic" MPICC="mpicc -march=znver2 -O3 -fpic" F77="flang" --enable-threads --enable-mpi --enable-openmp --enable-shared --prefix=$DIR/usr make make install

cd ../ ln -s /opt/AMD/aocl/aocl-linux-gcc-3.1.0/lib/libblis.a $DIR/usr/lib/libcblas.a tar xvfz v1.7.0.tar.gz mkdir build cd build CC=clang CXX=clang++ cmake -D GSL_PATH=$DIR/usr -D FFTW3_PATH=$DIR/usr -D CBLAS_PATH=$DIR/usr ../jdftx-1.7.0/jdftx make

Here is a sample submission script.

!/bin/sh

PBS -T openmpi

PBS -l elapstim_req=12:00:00

PBS -q lx -b 1

PBS -jo -N test

cd $PBS_O_WORKDIR

mpirun $NQSV_MPIOPTS -np 4 $HOME/jdftx-1.7.0/build/jdftx -c 1 -i test.in -o test.out