Skip to content

Commit

Permalink
allow parallel execution
Browse files Browse the repository at this point in the history
  • Loading branch information
bonfus committed Jan 27, 2017
1 parent 3e31903 commit de08d04
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion muesr/engines/LFCExt/LFCExt.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,8 @@ static PyObject * py_lfcext_fields(PyObject *self, PyObject *args) {
cont = (double *) PyArray_DATA(ocont);
lor = (double *) PyArray_DATA(olor);


// long computation starts here. No python object is touched so free thread execution
Py_BEGIN_ALLOW_THREADS
switch (icalc_type)
{
case 1:
Expand All @@ -441,6 +442,7 @@ static PyObject * py_lfcext_fields(PyObject *self, PyObject *args) {
in_cell,r, nnn,rcont,num_atoms,nangles,cont,dip,lor);

}
Py_END_ALLOW_THREADS

if (in_positions != NULL){
free(in_positions);
Expand Down

0 comments on commit de08d04

Please sign in to comment.