Skip to content

Commit

Permalink
Merge pull request #452 from unoebauer/build_fix
Browse files Browse the repository at this point in the history
Build fix and nthreads fix - fixes #356
  • Loading branch information
wkerzendorf committed Dec 11, 2015
2 parents 86a7d95 + dd513d9 commit c9e1b17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import __builtin__ as builtins
builtins._ASTROPY_SETUP_ = True

from astropy_helpers.setup_helpers import (register_commands, adjust_compiler,
from astropy_helpers.setup_helpers import (register_commands, adjust_compiler,
get_debug_option, get_package_info,
add_command_option)
from astropy_helpers.git_helpers import get_git_devstr
Expand Down Expand Up @@ -101,6 +101,8 @@
hook_func = 'astropy.utils.release:' + '_'.join(hook)
entry_points[hook_ep] = ['%s = %s' % (hook_name, hook_func)]

from Cython.Build import cythonize
package_info['ext_modules'] = cythonize(package_info['ext_modules'])
# Include all .c files, recursively, including those generated by
# Cython, since we can not do this in MANIFEST.in with a "dynamic"
# directory name.
Expand Down
2 changes: 1 addition & 1 deletion tardis/montecarlo/src/cmontecarlo.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,9 +826,9 @@ montecarlo_main_loop(storage_model_t * storage, int64_t virtual_packet_flag, int
storage->virt_array_size = storage->no_of_packets;
#endif // WITH_VPACKET_LOGGING
#ifdef WITHOPENMP
fprintf(stderr, "Running with OpenMP - %d threads\n", nthreads);
omp_set_dynamic(0);
omp_set_num_threads(nthreads);
fprintf(stderr, "Running with OpenMP - %d threads\n", omp_get_num_threads());
#pragma omp parallel
{
rk_state mt_state;
Expand Down

0 comments on commit c9e1b17

Please sign in to comment.