dependency :
nlopt
mkdir build
cd build
cmake -DNLOPT_OCTAVE=Off -DNLOPT_MATLAB=Off -DNLOPT_GUILE=Off -DNLOPT_SWIG=Off ..
make
LAPACK BLAS already installed in mac as Accelerate framework
Centos
Modification of code
In regread.f
, line 19
change PHASE
to phase
nlopt
wget https://github.com/stevengj/nlopt/archive/v2.6.1.tar.gz
tar zxvf v2.6.1.tar.gz
cd nlopt-2.6.1/
cmake . && make && sudo make install
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib64
compile HeFESTo
Change Accelerate framework to intel mkl
Use Link Line Advisor
image.png
So we replace
LIB1 = -framework Accelerate
with
LIB1 = -L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
Test:
$./main
[In HeFESToRepository]$ ./main
1 1 1 1
PAR/inv310516 13
15 Ca_1Al_2Si_2O_8
Element found 20 Ca 40.077999114990234 1
stoich = 1.0000000000000000
Element found 13 Al 26.981538772583008 2
stoich = 2.0000000000000000
Element found 14 Si 28.085500717163086 3
stoich = 2.0000000000000000
Element found 8 O 15.999400138854980 4
stoich = 8.0000000000000000
fn,wm= 13.00000 278.20728
Notes when writing run.sh that runs main
difference between the GNU(linux)/BSD(mac) version of sed and head/tail
GNU:
head -n 3 control > head
tail -n +10 control > tail
sed -i "1s/.*/$comp/" control
BSD:
head -3 control > head
tail +10 control > tail
sed -i '' "1s/.*/$comp/" control
compile Bulk
In BULK/BULKjj/srcjj:
make
cp main ../../