diff --git a/easybuild/easyconfigs/b/Block/Block-1.5.3-20200525-foss-2022a.eb b/easybuild/easyconfigs/b/Block/Block-1.5.3-20200525-foss-2022a.eb new file mode 100644 index 00000000000..f1e3f55e80b --- /dev/null +++ b/easybuild/easyconfigs/b/Block/Block-1.5.3-20200525-foss-2022a.eb @@ -0,0 +1,53 @@ +easyblock = 'MakeCp' + +name = 'Block' +version = '1.5.3-20200525' +_commit = 'f95317b08043b7c531289576d59ad74a6d920741' + +homepage = 'https://sanshar.github.io/Block/' +description = """Block implements the density matrix renormalization group (DMRG) algorithm for +quantum chemistry.""" + +toolchain = {'name': 'foss', 'version': '2022a'} +toolchainopts = {'cstd': 'c++11', 'pic': True} + +# Version 1.5 is a major rewrite of Block that was named at some point StackBlock +# sources are available in sanshar/StackBlock +# sources at sanshar/Block@b0e3671aad and pyscf/Block@db27636b76 correspond to version 1.1.1 +source_urls = ['https://github.com/sanshar/StackBlock/archive'] +sources = [{'download_filename': '%s.tar.gz' % _commit, 'filename': '%(version)s.tar.gz'}] +patches = [ + 'Block-1.5.3_use-eb-environment.patch', + 'Block-1.5.3_replace_mpi_cxx_binds_with_boost_mpi.patch', +] +checksums = [ + {'1.5.3-20200525.tar.gz': '8d793c5e460d7747a0adcb06ce4b457c6750cf2d42cead1d060db8b44643c3b1'}, + {'Block-1.5.3_use-eb-environment.patch': '7f3e8a52f28d251441d20dfde1f9cb8cdc0c34216defab61cc6980e540a6cf60'}, + {'Block-1.5.3_replace_mpi_cxx_binds_with_boost_mpi.patch': + 'f53f1f88cb7b12ab38d1313f93a9bbd31c745dca1beca7a8d51d00e0ae4e762f'}, +] + +dependencies = [ + ('Boost.MPI', '1.79.0'), +] + +buildopts = [ + # Multi-threaded build (block.spin_adapted-serial) + 'OPENMP="yes" EXECUTABLE="block.spin_adapted-serial"', + # MPI build (block.spin_adapted) + 'USE_MPI="yes"', +] + +files_to_copy = [(['block.spin_adapted*'], 'bin')] + +sanity_check_paths = { + 'files': ['bin/block.spin_adapted', 'bin/block.spin_adapted-serial'], + 'dirs': [], +} + +sanity_check_commands = [ + "block.spin_adapted-serial --version", + "%(mpi_cmd_prefix)s block.spin_adapted --version", +] + +moduleclass = 'phys' diff --git a/easybuild/easyconfigs/b/Block/Block-1.5.3_replace_mpi_cxx_binds_with_boost_mpi.patch b/easybuild/easyconfigs/b/Block/Block-1.5.3_replace_mpi_cxx_binds_with_boost_mpi.patch new file mode 100644 index 00000000000..f0b74d8ec73 --- /dev/null +++ b/easybuild/easyconfigs/b/Block/Block-1.5.3_replace_mpi_cxx_binds_with_boost_mpi.patch @@ -0,0 +1,107 @@ +From ced3681cd8c4fe5e10f84d23973ed0e5ee4e0098 Mon Sep 17 00:00:00 2001 +From: Matthias Degroote +Date: Sat, 13 Mar 2021 15:49:28 +0100 +Subject: [PATCH] Remove old c++ MPI bindings + +--- input.C.orig 2023-01-07 01:14:17.074836000 +0100 ++++ input.C 2023-01-17 14:22:56.060651139 +0100 +@@ -24,7 +24,6 @@ + #include + #ifndef SERIAL + #include +-#include "mpi.h" + #endif + #include + #include "fiedler.h" +@@ -1862,7 +1861,7 @@ + } + #ifndef SERIAL + //wait for all procs to zero out the memory +- MPI::COMM_WORLD.Barrier(); ++ world.barrier(); + #endif + v1.set_data() = static_cast(region.get_address()) + (oneIntegralMem+twoIntegralMem)*integralIndex; + v2.set_data() = static_cast(region.get_address()) + oneIntegralMem + (oneIntegralMem+twoIntegralMem)*integralIndex; +@@ -1930,16 +1929,16 @@ + } + + #ifndef SERIAL +- MPI::COMM_WORLD.Barrier(); ++ world.barrier(); + long intdim = oneIntegralMem+twoIntegralMem; + long maxint = 26843540; //mpi cannot transfer more than these number of doubles + long maxIter = intdim/maxint; + for (int i=0; i(region.get_address()) + intdim*integralIndex; + vcc.set_data() = static_cast(region.get_address()) + oneIntegralMem + intdim*integralIndex; +@@ -2302,15 +2301,15 @@ + dumpFile.close(); + } + #ifndef SERIAL +- MPI::COMM_WORLD.Barrier(); ++ world.barrier(); + long maxint = 26843540; //mpi cannot transfer more than these number of doubles + long maxIter = intdim/maxint; + for (int i=0; i(region.get_address()); + v2.set_data() = static_cast(region.get_address()) + oneIntegralMem; + vpt1.set_data() = static_cast(region.get_address()) + oneIntegralMem + twoIntegralMem; +@@ -2692,16 +2691,16 @@ + dumpFile.close(); + } + #ifndef SERIAL +- MPI::COMM_WORLD.Barrier(); ++ world.barrier(); + long intdim = oneIntegralMem+twoIntegralMem+PerturboneIntegralMem; + long maxint = 26843540; //mpi cannot transfer more than these number of doubles + long maxIter = intdim/maxint; + for (int i=0; i= 1.56.0 + USE_BOOST56 = yes +@@ -35,7 +35,7 @@ + + #LAPACKBLAS = -lblas -llapack + #LAPACKBLAS = /usr/lib/liblapack.dylib /usr/lib/libblas.dylib +-LAPACKBLAS = ++LAPACKBLAS = ${LIBBLAS} + + # set if we will use MPI or OpenMP + USE_MPI = no +@@ -108,12 +108,12 @@ + MOLCAS_BLOCK= -DMOLCAS -fPIC + endif + +-FLAGS = -I${MKLFLAGS} -I$(INCLUDE1) -I$(INCLUDE2) -I$(NEWMATINCLUDE) -I$(BOOSTINCLUDE) -I$(MOLPROINCLUDE) \ ++FLAGS = $(CPPFLAGS) -I${MKLFLAGS} -I$(INCLUDE1) -I$(INCLUDE2) -I$(NEWMATINCLUDE) -I$(BOOSTINCLUDE) -I$(MOLPROINCLUDE) \ + -I$(HOME)/modules/generate_blocks/ -I$(HOME)/modules/onepdm -I$(HOME)/modules/twopdm/ \ + -I$(HOME)/modules/npdm -I$(HOME)/modules/two_index_ops -I$(HOME)/modules/three_index_ops -I$(HOME)/modules/four_index_ops -std=c++0x \ + -I$(HOME)/modules/ResponseTheory -I$(HOME)/modules/nevpt2 -I$(HOME)/molcas -I$(HOME)/modules/mps_nevpt + +-LIBS += -L$(NEWMATLIB) -lnewmat $(BOOSTLIB) $(LAPACKBLAS) $(MALLOC) ++LIBS := $(LDFLAGS) -L$(NEWMATLIB) -lnewmat $(BOOSTLIB) $(LAPACKBLAS) $(MALLOC) $(LIBS) -lrt + MPI_OPT = -DSERIAL + + +@@ -127,7 +127,7 @@ + #endif + endif + # Intel compiler +- OPT = -DNDEBUG -O2 -g -funroll-loops #-ipo ++ OPT = -DNDEBUG $(OPTFLAGS) -g -funroll-loops + # OPT = -g + # # Useful option to define a newer g++ binary if the default g++ is too old + # OPT += -gxx-name=g++-4.7 +--- newmat10/makefile.orig 2023-01-06 15:20:52.879226000 +0100 ++++ newmat10/makefile 2023-01-06 15:20:30.392463000 +0100 +@@ -1,6 +1,6 @@ + #CXX = g++ + $(info $(CXX)) +-CXXFLAGS = -fPIC -O2 -Wall ++#CXXFLAGS = -fPIC -O2 -Wall + + DIFF = ./sdiff + PRE = ./