5.1 KiB
5.1 KiB
This is molscat 14 modified by F. Lique
how to build
graffy@graffy-ws2:~/work/saboi$ ls -l
total 4
drwxr-xr-x 3 graffy spm 4096 févr. 20 13:51 molscat_14.git
create a directory for the build:
graffy@graffy-ws2:~/work/saboi$ mkdir molscat_14.build
graffy@graffy-ws2:~/work/saboi$ cd molscat_14.build/
configure the build
graffy@graffy-ws2:~/work/saboi/molscat_14.build$ cmake ../molscat_14.git/
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The Fortran compiler identification is GNU 9.4.0
-- Check for working Fortran compiler: /usr/bin/gfortran
-- Check for working Fortran compiler: /usr/bin/gfortran -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/gfortran supports Fortran 90
-- Checking whether /usr/bin/gfortran supports Fortran 90 -- yes
Fortran compiler ID: GNU
Fortran compiler: gfortran
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - found
-- Found BLAS: /usr/lib/x86_64-linux-gnu/libopenblas.so
-- Looking for Fortran cheev
-- Looking for Fortran cheev - found
-- A library with LAPACK API found.
-- BLAS_LIBRARIES = /usr/lib/x86_64-linux-gnu/libopenblas.so
-- LAPACK_LIBRARIES = /usr/lib/x86_64-linux-gnu/libopenblas.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/graffy/work/saboi/molscat_14.build
This created the makefile [~/work/saboi/molscat_14.build/Makefile].
useful configure options
Use a specific compiler
cmake option: -DCMAKE_Fortran_COMPILER=<compiler>
Where <compiler> is your fortran compiler executable e.g.:
gfortrangfortran-8ifortifx
Use a specific BLAS/LAPACK library
cmake option: -DBLA_VENDOR=<BLAS_LIB>
Where <BLAS_LIB> is your BLAS library e.g.:
OpenBLASIntel10_64lpApple
see CMake BLAS/LAPACK VENDORS for a full list of supported libraries
Choose a build type
cmake option: -DCMAKE_BUILD_TYPE=<build_type>
Where <build_type> is one of:
Debug: useful for debugging (eg usinggdb)Release: (optimize options are turned on)
Build the moscat executable using the makefile [~/work/saboi/molscat_14.build/Makefile]
graffy@graffy-ws2:~/work/saboi/molscat_14.build$ make
Scanning dependencies of target molscat
[ 16%] Building Fortran object CMakeFiles/molscat.dir/POTEN_rigidXD.f90.o
[ 33%] Building Fortran object CMakeFiles/molscat.dir/potenl_pes.f.o
[ 50%] Building Fortran object CMakeFiles/molscat.dir/SUBROUTINES_F77.f.o
[ 66%] Building Fortran object CMakeFiles/molscat.dir/v14_new.f.o
/home/graffy/work/saboi/molscat_14.git/v14_new.f:10033:10:
10031 | DO 21 IM2=2,NMID
| 2
...
Warning: Named COMMON block ‘cmbase’ at (1) shall be of the same size as elsewhere (24248 vs 24256 bytes)
/home/graffy/work/saboi/molscat_14.git/v14_new.f:11:21:
11 | COMMON /MEMORY/ MX,IXNEXT,NIPR,IVLFL,X
| 1
Warning: Named COMMON block ‘memory’ at (1) shall be of the same size as elsewhere (800000016 vs 24 bytes)
[ 83%] Building Fortran object CMakeFiles/molscat.dir/vrtp_co_co2.f.o
[100%] Linking Fortran executable molscat
[100%] Built target molscat
ifort and mkl on alambix cheatsheet
graffy@alambix-frontal:/opt/ipr/cluster/work.local/graffy/saboi$ git clone https://git.ipr.univ-rennes.fr/saboi/molscat_14.git ./molscat_14.git
graffy@alambix-frontal:/opt/ipr/cluster/work.local/graffy/saboi$ mkdir molscat_14.build
graffy@alambix-frontal:/opt/ipr/cluster/work.local/graffy/saboi$ cd molscat_14.build
graffy@alambix-frontal:/opt/ipr/cluster/work.local/graffy/saboi/molscat_14.build$ module load compilers/ifort/latest
graffy@alambix-frontal:/opt/ipr/cluster/work.local/graffy/saboi/molscat_14.build$ cmake -DCMAKE_Fortran_COMPILER=ifx -DBLA_VENDOR=Intel10_64lp -DCMAKE_BUILD_TYPE=Release ../molscat_14.git/
graffy@alambix-frontal:/opt/ipr/cluster/work.local/graffy/saboi/molscat_14.build$ make
how to run
./molscat < ./co2_co.input > molscat.stdout