Skip to content
Open
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
2 changes: 1 addition & 1 deletion pynamic-pyMPI-2.6a1/Makefile.mpi4py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ MAKEFILE_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))

UTIL_LIBS := $(shell for s in {1..$(NUM_UTILITIES)}; do echo -lutility$$(($$s - 1)); done)
MODULE_LIBS := $(shell for s in {1..$(NUM_MODULES)}; do echo -lmodule$$(($$s - 1)); done)
BASE_MODULE_LIBS = -lmodulebegin -lmodulefinal
BASE_MODULE_LIBS += -lmodulebegin -lmodulefinal

PYNAMICDIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST))))

Expand Down
44 changes: 37 additions & 7 deletions pynamic-pyMPI-2.6a1/config_pynamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#

from so_generator import print_error, parse_and_run, run_command, print_usage
import sysconfig
import sys
import os

Expand Down Expand Up @@ -55,14 +56,43 @@
command = 'make -j ' + str(processes)
run_command(command)
else:
command = 'make -f Makefile.mpi4py clean'
run_command(command)

target = 'pynamic-mpi4py'
python = sys.executable

cfg_vars = sysconfig.get_config_vars()
cflags = cfg_vars.get('CFLAGS')
ldflags = '{} -L{}'.format(cfg_vars.get('LDFLAGS', ''), cfg_vars.get('LIBDIR'))
embed = cfg_vars.get('EMBED')
libs = '-lpython{} {}'.format(cfg_vars.get('LDVERSION'), cfg_vars.get('LIBS', ''))

cc = None
for arg in configure_args:
if 'with-cc' in arg and '=' in arg:
_, cc = arg.split('=', 1)
if 'with-python' in arg:
print("Run this with intended python")
sys.exit(1)
if 'with-includes' in arg:
if '=' in arg:
cflags = '{} {}'.format(cflags, arg.split('=',1)[1])

command = ['make', '-f', 'Makefile.mpi4py', 'clean']
run_command(' '.join(command))

command = ['make', '-f', 'Makefile.mpi4py', '-j', str(processes)]
for flag_name, flag_val in (
('CC', cc),
('PYTHON_CFLAGS', cflags),
('PYTHON_LDFLAGS', ldflags),
('PYTHON_EMBED', embed),
('PYTHON_EXE', python)):
if flag_val is not None:
command.append('{}="{}"'.format(flag_name, flag_val))
command.append('BASE_MODULE_LIBS="{}"'.format(libs))
targets = ['pynamic-mpi4py']
if bigexe:
target += ' pynamic-bigexe-mpi4py'
command = 'make -j ' + str(processes) + ' -f Makefile.mpi4py ' + target
run_command(command)
targets.append(' pynamic-bigexe-mpi4py')
command.extend(targets)
run_command(' '.join(command))

if bigexe == False:
command = 'rm -f pynamic-bigexe-pyMPI pynamic-bigexe-sdb-pyMPI pynamic-bigexe-mpi4py'
Expand Down
6 changes: 3 additions & 3 deletions pynamic-pyMPI-2.6a1/get-symtab-sizes
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ for sh in $sharedlib; do
ls -l $sh | gawk '{ print "Image size: "$5}' | tee -a 00imagesize
size -f $sh | gawk '{if ($1 ~ /[0-9]+/) print "Text size: "$1}' | tee -a 00textsize
size -f $sh | gawk '{if ($2 ~ /[0-9]+/) print "Data size: "$2}' | tee -a 00datasize
readelf -S -W $sh | gawk '{if ($2 ~ /\.debug/ ) print $6}' | addall "debug section" 16 | tee -a 00debugsectsize
readelf -S -W $sh | gawk '{if ($2 ~ /\.symtab/ ) print $6}' | addall "symbol table" 16 | tee -a 00symtabsize
readelf -S -W $sh | gawk '{if ($2 ~ /\.strtab/ ) print $6}' | addall "string table" 16 | tee -a 00strtabsize
readelf -S -W $sh | gawk '{if ($2 ~ /\.debug/ ) print $6}' | ./addall "debug section" 16 | tee -a 00debugsectsize
readelf -S -W $sh | gawk '{if ($2 ~ /\.symtab/ ) print $6}' | ./addall "symbol table" 16 | tee -a 00symtabsize
readelf -S -W $sh | gawk '{if ($2 ~ /\.strtab/ ) print $6}' | ./addall "string table" 16 | tee -a 00strtabsize
fi
done

Expand Down