Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Psi 4.0b5 with ictce-5.5.0 and MPI #434

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name = 'Boost'
version = '1.53.0'

homepage = 'http://www.boost.org/'
description = """Boost provides free peer-reviewed portable C++ source libraries."""

toolchain = {'name': 'ictce', 'version': '5.5.0'}
toolchainopts = {'pic': True, 'usempi': True}

source_urls = [SOURCEFORGE_SOURCE]
sources = ['%%(namelower)s_%s.tar.gz' % '_'.join(version.split('.'))]

patches = ['intellinuxjam_fPIC.patch']

pythonversion = '2.7.5'
versionsuffix = '-Python-%s' % pythonversion

dependencies = [
('bzip2', '1.0.6'),
('Python', pythonversion),
]

# also build boost_mpi
boost_mpi = True

osdependencies = ['zlib-devel']

moduleclass = 'devel'
13 changes: 13 additions & 0 deletions easybuild/easyconfigs/p/PSI/PSI-4.0b5-failed-test.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff -ur psi4.0b5.orig/tests/Makefile.in psi4.0b5/tests/Makefile.in
--- psi4.0b5.orig/tests/Makefile.in 2013-07-01 23:11:05.000000000 +0200
+++ psi4.0b5/tests/Makefile.in 2013-09-11 16:40:22.672796277 +0200
@@ -33,7 +33,7 @@

opt_subdirs = opt1 opt1-fd opt2 opt2-fd opt3 opt4 opt5 opt6 opt7 pywrap-opt-sowreap

-freq_subdirs = fd-gradient fd-freq-energy fd-freq-gradient dft-freq gibbs pywrap-freq-e-sowreap
+freq_subdirs = fd-gradient fd-freq-gradient dft-freq gibbs pywrap-freq-e-sowreap

mp2_subdirs = mp2-1 omp2-1 omp2-2 omp2-3 omp2-4 omp2-5 omp3-1 omp3-2 omp3-3 omp3-4 omp3-5 ocepa1 ocepa2 ocepa3 omp2_5-1 omp2_5-2 omp2-grad1 omp2-grad2 omp3-grad1 omp3-grad2 omp2_5-grad1 omp2_5-grad2 ocepa-grad1 ocepa-grad2 mp2-grad1 mp2-grad2 mp3-grad1 mp3-grad2 mp2_5-grad1 mp2_5-grad2 cepa0-grad1 cepa0-grad2 ocepa-freq1

Only in psi4.0b5/tests: Makefile.in~
31 changes: 31 additions & 0 deletions easybuild/easyconfigs/p/PSI/PSI-4.0b5-ictce-5.5.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name = 'PSI'
version = '4.0b5'

homepage = 'http://www.psicode.org/'
description = """PSI4 is an open-source suite of ab initio quantum chemistry programs designed for
efficient, high-accuracy simulations of a variety of molecular properties. We can routinely perform
computations with more than 2500 basis functions running serially or in parallel."""

toolchain = {'name': 'ictce', 'version': '5.5.0'}
toolchainopts = {'usempi': True}

source_urls = ['http://download.sourceforge.net/psicode/']
sources = ['%(namelower)s%(version)s.tar.gz']

patches = [
'PSI-4.0b5-mpi.patch',
'PSI-4.0b5-mpi-memcpy.patch',
'PSI-4.0b5-failed-test.patch', # The test works but it segfaults on exit
'PSI-4.0b5-thread-pool.patch',
'PSI-4.0b5-new-plugin.patch',
]

python = 'Python'
pyver = '2.7.5'

dependencies = [
(python, pyver),
('Boost', '1.53.0', '-%s-%s' % (python, pyver)),
]

moduleclass = 'chem'
53 changes: 53 additions & 0 deletions easybuild/easyconfigs/p/PSI/PSI-4.0b5-mpi-memcpy.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
diff -ur psi4.0b5.orig/src/lib/libparallel/elem.h psi4.0b5/src/lib/libparallel/elem.h
--- psi4.0b5.orig/src/lib/libparallel/elem.h 2013-09-12 19:58:45.675482999 +0200
+++ psi4.0b5/src/lib/libparallel/elem.h 2013-09-12 17:56:02.259640817 +0200
@@ -140,7 +140,7 @@
if (receive_buffer == 0) {
receive_buffer = new type[nelem];
elem::mpi::AllReduce(&data[0], receive_buffer, nelem, elem::mpi::SUM, comm_);
- ::memcpy(data, receive_buffer, nelem*sizeof(type));
+ std::memcpy(data, receive_buffer, nelem*sizeof(type));
delete receive_buffer;
}
else
diff -ur psi4.0b5.orig/src/lib/libparallel/local.h psi4.0b5/src/lib/libparallel/local.h
--- psi4.0b5.orig/src/lib/libparallel/local.h 2013-09-12 19:58:54.605171643 +0200
+++ psi4.0b5/src/lib/libparallel/local.h 2013-09-12 17:56:02.259640817 +0200
@@ -137,7 +137,7 @@
inline void sum(type data, int nelem, type *receive_buffer=0, int target=-1)
{
if (receive_buffer != 0)
- ::memcpy(receive_buffer, data, sizeof(type) * nelem);
+ std::memcpy(receive_buffer, data, sizeof(type) * nelem);
}

/**
diff -ur psi4.0b5.orig/src/lib/libparallel/mpi_wrapper.h psi4.0b5/src/lib/libparallel/mpi_wrapper.h
--- psi4.0b5.orig/src/lib/libparallel/mpi_wrapper.h 2013-09-12 19:58:37.556766089 +0200
+++ psi4.0b5/src/lib/libparallel/mpi_wrapper.h 2013-09-12 19:55:22.506570968 +0200
@@ -22,6 +22,7 @@

#if defined(HAVE_MPI)

+#include <cstring>
#include <mpi.h>

namespace psi {
@@ -99,7 +100,7 @@
void sum(double* data, size_t nelem) {
double *receive_buffer = new double[nelem];
MPI_Allreduce(static_cast<void*>(data), static_cast<void*>(receive_buffer), nelem, MPI_DOUBLE, MPI_SUM, comm_);
- ::memcpy(static_cast<void*>(data), static_cast<void*>(receive_buffer), sizeof(double)*nelem);
+ std::memcpy(static_cast<void*>(data), static_cast<void*>(receive_buffer), sizeof(double)*nelem);
delete[] receive_buffer;
}

@@ -118,7 +119,7 @@
MPI_Allreduce(static_cast<void*>(data), static_cast<void*>(receive_buffer), n, M, MPI_SUM, comm_); \
\
if (alloc) { \
- ::memcpy(static_cast<void*>(data), static_cast<void*>(receive_buffer), sizeof(T)*n); \
+ std::memcpy(static_cast<void*>(data), static_cast<void*>(receive_buffer), sizeof(T)*n); \
delete[] receive_buffer; \
} \
}
10 changes: 10 additions & 0 deletions easybuild/easyconfigs/p/PSI/PSI-4.0b5-mpi.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- psi4.0b4/src/lib/libmints/wavefunction.h.orig 2013-05-07 18:35:18.813690853 +0200
+++ psi4.0b4/src/lib/libmints/wavefunction.h 2013-05-07 18:35:43.113781216 +0200
@@ -6,7 +6,8 @@

#include "typedefs.h"
#include <libparallel/parallel.h>
+#include <liboptions/liboptions.h>

#define MAX_IOFF 30000
extern size_t ioff[MAX_IOFF];
Loading