Thank you, Lori, for your help.
Using the locally built version the output of the SCF says ‘1 Threads’ if I set OMP_NUM_THREADS=4 & MKL_NUM_THREADS=4, but the same job says ‘4 Threads’ if I use the -n 4 option. However, both runs used only 1 CPU, based on the wall times and looking at feedback from the top command.
Both options to set the number of OMP threads work properly for the binary version, that version uses all 4 CPUs.
I copy below the outputs and files you have requested. I did not see anything that would explain to me, why does the OpenMP not work and why does the built code run 4 times slower, than the binary.
Thank you again!
Standard output of cmake -H. -Bobjdir
– 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
– Setting (unspecified) option BUILD_SHARED_LIBS: OFF
– Setting (unspecified) option ENABLE_OPENMP: ON
– Setting (unspecified) option ENABLE_AUTO_BLAS: ON
– Setting (unspecified) option ENABLE_AUTO_LAPACK: ON
– Setting (unspecified) option ENABLE_XHOST: ON
– Performing Test CMAKE_C_FLAGS [-xHost] - Failed
– Performing Test CMAKE_C_FLAGS [-march=native] - Success, Appending
– Performing Test CMAKE_CXX_FLAGS [-xHost] - Failed
– Performing Test CMAKE_CXX_FLAGS [-march=native] - Success, Appending
– Setting (unspecified) option ENABLE_CODE_COVERAGE: OFF
– Setting (unspecified) option ENABLE_BOUNDS_CHECK: OFF
– Setting (unspecified) option ENABLE_ASAN: OFF
– Setting (unspecified) option ENABLE_TSAN: OFF
– Setting (unspecified) option ENABLE_UBSAN: OFF
– Setting (unspecified) option MAX_AM_ERI: 5
– Setting (unspecified) option CMAKE_BUILD_TYPE: Release
– Setting (unspecified) option FC_SYMBOL: 2
– Setting (unspecified) option BUILD_FPIC: ON
– Setting (unspecified) option CMAKE_INSTALL_LIBDIR: lib
– Setting (unspecified) option PYMOD_INSTALL_LIBDIR: /
– Setting (unspecified) option ENABLE_GENERIC: OFF
– Setting (unspecified) option CMAKE_INSTALL_MESSAGE: LAZY
– Setting (unspecified) option PSI4_CXX_STANDARD: 11
– Found PythonInterp: /usr/bin/python (found version “2.7.12”)
– Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found suitable version “2.7.12”, minimum required is “2”)
– Suitable pybind11 could not be located, building one instead.
– Suitable libint could not be located, building one instead.
– Suitable libefp could not be located, building one instead.
– Try OpenMP C flag = [-fopenmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Success
– Try OpenMP CXX flag = [-fopenmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Success
– Found OpenMP: -fopenmp
– Math lib search order is MKL;ESSL;ATLAS;ACML;SYSTEM_NATIVE
– You can select a specific type by defining for instance -D BLAS_TYPE=ATLAS or -D LAPACK_TYPE=ACML
– or by redefining MATH_LIB_SEARCH_ORDER
– Found BLAS: MKL (/export/intel/parallel_studio_xe_2013/composer_xe_2013_sp1.3.174/mkl/lib/intel64/libmkl_gf_lp64.so;/export/intel/parallel_studio_xe_2013/composer_xe_2013_sp1.3.174/mkl/lib/intel64/libmkl_gnu_thread.so;/export/intel/parallel_studio_xe_2013/composer_xe_2013_sp1.3.174/mkl/lib/intel64/libmkl_core.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libm.so)
– Found LAPACK: MKL (/export/intel/parallel_studio_xe_2013/composer_xe_2013_sp1.3.174/mkl/lib/intel64/libmkl_lapack95_lp64.a;/export/intel/parallel_studio_xe_2013/composer_xe_2013_sp1.3.174/mkl/lib/intel64/libmkl_gf_lp64.so)
– No Doxygen, no docs.
– No Sphinx, no docs. Pre-built documentation at http://psicode.org/psi4manual/master/index.html
– No LaTeX (incl. pdflatex), no PDF docs. Pre-built documentation at http://psicode.org/psi4manual/master/index.html
– Adding test cases: Psi4
– Found CFOUR: /export/prog/cfour_publ/bin/xcfour
– Adding test cases: Psi4 + CFOUR
– Adding test cases: Psi4 + libefp
– Configuring done
– Generating done
– Build files have been written to: /export/home/nape/programs/psi4_build/psi4-master_161130b/objdir
Error output of cmake -H. -Bobjdir
– BLAS will be searched for based on MKLROOT=/export/intel/parallel_studio_xe_2013/composer_xe_2013_sp1.3.174/mkl
– LAPACK will be searched for based on MKLROOT=/export/intel/parallel_studio_xe_2013/composer_xe_2013_sp1.3.174/mkl
psi4_core-prefix/src/psi4_core-build/src/CMakeFiles/core.dir/link.txt file:
/usr/bin/c++ -fPIC -march=native -fopenmp -O3 -DNDEBUG -shared -Wl,-soname,core.so -o core.so CMakeFiles/core.dir/export_psio.cc.o CMakeFiles/core.dir/export_mints.cc.o CMakeFiles/core.dir/export_fock.cc.o CMakeFiles/core.dir/export_functional.cc.o CMakeFiles/core.dir/export_oeprop.cc.o CMakeFiles/core.dir/export_plugins.cc.o CMakeFiles/core.dir/export_blas_lapack.cc.o CMakeFiles/core.dir/export_benchmarks.cc.o CMakeFiles/core.dir/export_efp.cc.o CMakeFiles/core.dir/export_cubeprop.cc.o CMakeFiles/core.dir/export_misc.cc.o CMakeFiles/core.dir/create_new_plugin.cc.o CMakeFiles/core.dir/read_options.cc.o CMakeFiles/versioned_code.dir/core.cc.o psi4/adc/libadc.a psi4/ccdensity/libccdensity.a psi4/ccenergy/libccenergy.a psi4/cceom/libcceom.a psi4/cchbar/libcchbar.a psi4/cclambda/libcclambda.a psi4/ccresponse/libccresponse.a psi4/ccsort/libccsort.a psi4/cctransort/libcctransort.a psi4/cctriples/libcctriples.a psi4/dcft/libdcft.a psi4/detci/libdetci.a psi4/dfmp2/libdfmp2.a psi4/dfocc/libdfocc.a psi4/efp_interface/libefp_interface.a psi4/findif/libfindif.a psi4/fisapt/libfisapt.a psi4/fnocc/libfnocc.a psi4/mcscf/libmcscf.a psi4/mrcc/libmrcc.a psi4/occ/libocc.a psi4/optking/liboptking.a psi4/psimrcc/libpsimrcc.a psi4/sapt/libsapt.a psi4/scfgrad/libscfgrad.a psi4/thermo/libthermo.a psi4/transqt2/libtransqt2.a psi4/gdma_interface/libgdma_interface.a psi4/dmrg/libdmrg.a -lpython2.7 psi4/libthce/libthce.a psi4/libcubeprop/libcubeprop.a psi4/libmoinfo/libmoinfo.a psi4/libsapt_solver/libsapt_solver.a psi4/libscf_solver/libscf_solver.a psi4/libdiis/libdiis.a psi4/libdpd/libdpd.a psi4/lib3index/lib3index.a psi4/libfock/libfock.a psi4/lib3index/lib3index.a psi4/libfock/libfock.a psi4/libfunctional/libfunctional.a psi4/libdisp/libdisp.a psi4/libplugin/libplugin.a -ldl psi4/libmints/libmints.a psi4/libtrans/libtrans.a psi4/libqt/libqt.a psi4/libefp_solver/libefp_solver.a psi4/libmints/libmints.a psi4/libtrans/libtrans.a psi4/libqt/libqt.a psi4/libefp_solver/libefp_solver.a psi4/libiwl/libiwl.a psi4/libpsi4util/libpsi4util.a /export/home/nape/programs/psi4_build/psi4-master_161130b/objdir/stage/export/home/nape/programs/psi4_build/psi4_bin_161130b/external/lib/libderiv.a /export/home/nape/programs/psi4_build/psi4-master_161130b/objdir/stage/export/home/nape/programs/psi4_build/psi4_bin_161130b/external/lib/libint.a psi4/libpsio/libpsio.a psi4/libciomr/libciomr.a psi4/libparallel/libparallel.a psi4/liboptions/liboptions.a psi4/libfilesystem/libfilesystem.a /export/home/nape/programs/psi4_build/psi4-master_161130b/objdir/stage/export/home/nape/programs/psi4_build/psi4_bin_161130b/external/lib/libefp.a -llapack -lblas -Wl,–start-group -Wl,-Bstatic -lmkl_lapack95_lp64 -Wl,-Bdynamic -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lpthread -lm -Wl,–end-group -Wl,-rpath,/export/home/nape/programs/psi4_build/psi4_bin_161130b/lib:/export/home/nape/programs/psi4_build/psi4-master_161130b/objdir/stage//export/home/nape/programs/psi4_build/psi4_bin_161130b/lib:/usr/lib/x86_64-linux-gnu