diff --git a/0001-use-python3-instead-of-python.patch b/0001-use-python3-instead-of-python.patch new file mode 100644 index 0000000000000000000000000000000000000000..be1070efa704888d5b38f39b4edac4d56c336d76 --- /dev/null +++ b/0001-use-python3-instead-of-python.patch @@ -0,0 +1,541 @@ +From e61768cfd171e0967cdd26b8896294635df0c1a0 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Tue, 16 Jan 2024 09:04:25 +0000 +Subject: [PATCH 1/3] use python3 instead of python + +Signed-off-by: rpm-build +--- + Defs.mak.in | 2 +- + setup-wrappers.py | 350 ++++++++++++++++++++++++---------------------- + 2 files changed, 183 insertions(+), 169 deletions(-) + +diff --git a/Defs.mak.in b/Defs.mak.in +index a1b3bf3..2154332 100644 +--- a/Defs.mak.in ++++ b/Defs.mak.in +@@ -9,7 +9,7 @@ CXX = @CXX@ + FC = @F77@ + AR = ar + RANLIB = @RANLIB@ +-PYTHON = python ++PYTHON = python3 + + CFLAGS = @CFLAGS@ + FFLAGS = @FFLAGS@ +diff --git a/setup-wrappers.py b/setup-wrappers.py +index 82ad9bc..9b120ea 100644 +--- a/setup-wrappers.py ++++ b/setup-wrappers.py +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/python ++#!/usr/bin/python3 + # -*- python -*- + # + # memP Parallel Heap Profiler ( http://memp.sourceforge.net/ ) +@@ -33,62 +33,64 @@ lastFunction = "NULL" + verbose = 0 + baseID = 1000 + ++ + class VarDesc: +- def __init__ (self,name, basetype, pointerLevel, arrayLevel): +- "initialize a new variable description structure" +- self.name = name +- self.basetype = basetype +- self.pointerLevel = pointerLevel +- self.arrayLevel = arrayLevel +- self.recordIt = 0 ++ def __init__(self, name, basetype, pointerLevel, arrayLevel): ++ "initialize a new variable description structure" ++ self.name = name ++ self.basetype = basetype ++ self.pointerLevel = pointerLevel ++ self.arrayLevel = arrayLevel ++ self.recordIt = 0 ++ + + class fdecl: +- def __init__ (self,name, id, returntype, paramList, protoline): +- "initialize a new function declaration structure" +- self.name = name +- self.id = id +- self.returntype = returntype +- self.paramList = paramList +- self.paramDict = {} +- self.protoline = protoline +- self.wrapperPreList = [] +- self.wrapperPostList = [] +- self.nowrapper = 0 +- self.paramConciseList = [] +- self.extrafields = {} +- self.extrafieldsList = [] ++ def __init__(self, name, id, returntype, paramList, protoline): ++ "initialize a new function declaration structure" ++ self.name = name ++ self.id = id ++ self.returntype = returntype ++ self.paramList = paramList ++ self.paramDict = {} ++ self.protoline = protoline ++ self.wrapperPreList = [] ++ self.wrapperPostList = [] ++ self.nowrapper = 0 ++ self.paramConciseList = [] ++ self.extrafields = {} ++ self.extrafieldsList = [] + + + def ProcessDirectiveLine(lastFunction, line): +- tokens = string.split(line) ++ tokens = str.split(line) + if tokens[0] == "nowrapper": +- fdict[lastFunction].nowrapper = 1 ++ fdict[lastFunction].nowrapper = 1 + elif tokens[0] == "extrafield": +- fdict[lastFunction].extrafieldsList.append(tokens[2]) +- fdict[lastFunction].extrafields[tokens[2]] = tokens[1] ++ fdict[lastFunction].extrafieldsList.append(tokens[2]) ++ fdict[lastFunction].extrafields[tokens[2]] = tokens[1] + else: +- print "Warning: ",lastFunction," unknown directive [",string.strip(line),"]" ++ print("Warning: ", lastFunction, " unknown directive [", str.strip(line), "]") + + + def ProcessWrapperPreLine(lastFunction, line): +- #print "Processing wrapper pre [",string.strip(line),"] for ",lastFunction ++ # print "Processing wrapper pre [",str.strip(line),"] for ",lastFunction + fdict[lastFunction].wrapperPreList.append(line) + + + def ProcessWrapperPostLine(lastFunction, line): +- #print "Processing wrapper post [",string.strip(line),"] for ",lastFunction ++ # print "Processing wrapper post [",str.strip(line),"] for ",lastFunction + fdict[lastFunction].wrapperPostList.append(line) + + + def DumpDict(): + for i in flist: +- print i +- if verbose: +- print "\tParams\t",fdict[i].paramList +- if fdict[i].wrapperPreList: +- print "\tpre\t", fdict[i].wrapperPreList +- if fdict[i].wrapperPostList: +- print "\tpost\t", fdict[i].wrapperPostList ++ print(i) ++ if verbose: ++ print("\tParams\t", fdict[i].paramList) ++ if fdict[i].wrapperPreList: ++ print("\tpre\t", fdict[i].wrapperPreList) ++ if fdict[i].wrapperPostList: ++ print("\tpost\t", fdict[i].wrapperPostList) + + + ##### +@@ -107,78 +109,86 @@ def ReadInputFile(f): + + fcounter = baseID + +- print "-----*----- Parsing input file" ++ print("-----*----- Parsing input file") + while 1: +- ##### read a line from input +- rawline = f.readline() +- if not rawline: +- break +- cnt = cnt + 1 +- line = re.sub("\@.*$","",rawline) +- +- ##### break it into tokens +- tokens = string.split(line) +- if not tokens: +- continue +- +- ##### determine what type of line this is and then parse it as required +- if (string.find(line,"(") != -1) \ +- and (string.find(line,")") != -1) \ +- and parserState == p_start: +- ##### we have a prototype start line +- name = tokens[1] +- retype = tokens[0] +- lparen = string.index(line,"(") +- rparen = string.index(line,")") +- paramstr = line[lparen+1:rparen] +- paramList = map(string.strip,string.split(paramstr,",")) +- # print cnt, "-->", name, paramList +- fdict[name] = fdecl(name, fcounter, retype, paramList,line) +- fcounter = fcounter + 1 +- lastFunction = name +- if verbose: +- print name +- else: +- ##### DIRECTIVES +- if tokens[0] == "directives" and parserState != p_directives: +- ##### beginning of directives +- parserState = p_directives +- elif tokens[0] == "directives" and parserState == p_directives: +- ##### end of directives +- parserState = p_start +- elif parserState == p_directives: +- ##### must be a directive, process it +- ProcessDirectiveLine(lastFunction, line) +- +- ##### CODE WRAPPER PRE +- elif tokens[0] == "wrapper_pre" and parserState != p_wrapper_pre: +- ##### beginning of wrapper_pre +- parserState = p_wrapper_pre +- elif tokens[0] == "wrapper_pre" and parserState == p_wrapper_pre: +- ##### end of wrapper_pre +- parserState = p_start +- elif parserState == p_wrapper_pre: +- ##### must be a directive, process it +- ProcessWrapperPreLine(lastFunction, line) +- +- ##### CODE WRAPPER POST +- elif tokens[0] == "wrapper_post" and parserState != p_wrapper_post: +- ##### beginning of wrapper_post +- parserState = p_wrapper_post +- elif tokens[0] == "wrapper_post" and parserState == p_wrapper_post: +- ##### end of wrapper_post +- parserState = p_start +- elif parserState == p_wrapper_post: +- ##### must be a directive, process it +- ProcessWrapperPostLine(lastFunction, line) +- +- ##### UNKNOWN +- else: +- print "Unknown input line ",cnt, ":", line, ++ ##### read a line from input ++ rawline = f.readline() ++ if not rawline: ++ break ++ cnt = cnt + 1 ++ line = re.sub("\@.*$", "", rawline) ++ ++ ##### break it into tokens ++ tokens = str.split(line) ++ if not tokens: ++ continue ++ ++ ##### determine what type of line this is and then parse it as required ++ if ( ++ (str.find(line, "(") != -1) ++ and (str.find(line, ")") != -1) ++ and parserState == p_start ++ ): ++ ##### we have a prototype start line ++ name = tokens[1] ++ retype = tokens[0] ++ lparen = str.index(line, "(") ++ rparen = str.index(line, ")") ++ paramstr = line[lparen + 1 : rparen] ++ paramList = map(str.strip, str.split(paramstr, ",")) ++ # print cnt, "-->", name, paramList ++ fdict[name] = fdecl(name, fcounter, retype, paramList, line) ++ fcounter = fcounter + 1 ++ lastFunction = name ++ if verbose: ++ print(name) ++ else: ++ ##### DIRECTIVES ++ if tokens[0] == "directives" and parserState != p_directives: ++ ##### beginning of directives ++ parserState = p_directives ++ elif tokens[0] == "directives" and parserState == p_directives: ++ ##### end of directives ++ parserState = p_start ++ elif parserState == p_directives: ++ ##### must be a directive, process it ++ ProcessDirectiveLine(lastFunction, line) ++ ++ ##### CODE WRAPPER PRE ++ elif tokens[0] == "wrapper_pre" and parserState != p_wrapper_pre: ++ ##### beginning of wrapper_pre ++ parserState = p_wrapper_pre ++ elif tokens[0] == "wrapper_pre" and parserState == p_wrapper_pre: ++ ##### end of wrapper_pre ++ parserState = p_start ++ elif parserState == p_wrapper_pre: ++ ##### must be a directive, process it ++ ProcessWrapperPreLine(lastFunction, line) ++ ++ ##### CODE WRAPPER POST ++ elif tokens[0] == "wrapper_post" and parserState != p_wrapper_post: ++ ##### beginning of wrapper_post ++ parserState = p_wrapper_post ++ elif tokens[0] == "wrapper_post" and parserState == p_wrapper_post: ++ ##### end of wrapper_post ++ parserState = p_start ++ elif parserState == p_wrapper_post: ++ ##### must be a directive, process it ++ ProcessWrapperPostLine(lastFunction, line) ++ ++ ##### UNKNOWN ++ else: ++ print( ++ "Unknown input line ", ++ cnt, ++ ":", ++ line, ++ ) + + flist = fdict.keys() ++ flist = list(flist) + flist.sort() +- print "-----*----- Parsing completed: ", len(fdict), " functions found." ++ print("-----*----- Parsing completed: ", len(fdict), " functions found.") + + + ### +@@ -188,8 +198,12 @@ def StandardFileHeader(fname): + olist = [] + olist.append("/* " + fname + " */\n") + olist.append("/* DO NOT EDIT -- AUTOMATICALLY GENERATED! */\n") +- olist.append("/* Timestamp: " + time.strftime("%d %B %Y %H:%M", time.localtime(time.time())) + " */\n") +- olist.append("/* Location: " + socket.gethostname () + " " + os.name + " */\n") ++ olist.append( ++ "/* Timestamp: " ++ + time.strftime("%d %B %Y %H:%M", time.localtime(time.time())) ++ + " */\n" ++ ) ++ olist.append("/* Location: " + socket.gethostname() + " " + os.name + " */\n") + olist.append("/* Creator: " + os.environ["LOGNAME"] + " */\n") + olist.append("\n") + olist.append("\n") +@@ -202,19 +216,19 @@ def StandardFileHeader(fname): + def GenerateStructureFile(): + global flist + global fdict +- print "-----*----- Generating structure files" ++ print("-----*----- Generating structure files") + cwd = os.getcwd() + os.chdir(cwd) + sname = cwd + "/memPi_def.h" + g = open(sname, "w") + olist = StandardFileHeader(sname) +- ++ + olist.append("\n") + olist.append("#define memPi_BASE " + str(baseID) + "\n") + olist.append("\n") + + for funct in flist: +- olist.append("#define memPi_ID_" + funct + " " + str(fdict[funct].id) + "\n") ++ olist.append("#define memPi_ID_" + funct + " " + str(fdict[funct].id) + "\n") + + olist.append("\n\n/* eof */\n") + g.writelines(olist) +@@ -228,15 +242,15 @@ def GenerateLookup(): + global flist + global fdict + +- print "-----*----- Generating the lookup table" ++ print("-----*----- Generating the lookup table") + cwd = os.getcwd() + os.chdir(cwd) + sname = cwd + "/lookup.c" + g = open(sname, "w") + olist = StandardFileHeader(sname) + +- olist.append("#include \"memPi.h\"\n") +- olist.append("#include \"memPi_def.h\"\n") ++ olist.append('#include "memPi.h"\n') ++ olist.append('#include "memPi_def.h"\n') + olist.append("\n") + olist.append("\n") + +@@ -244,13 +258,12 @@ def GenerateLookup(): + + counter = 0 + for funct in flist: +- if counter < len(flist) \ +- and counter > 0 : +- olist.append(",\n") +- olist.append("\t{ memPi_ID_" + funct) +- olist.append(", \"" + funct + "\"") +- olist.append("}") +- counter = counter + 1 ++ if counter < len(flist) and counter > 0: ++ olist.append(",\n") ++ olist.append("\t{ memPi_ID_" + funct) ++ olist.append(', "' + funct + '"') ++ olist.append("}") ++ counter = counter + 1 + + olist.append(",\n\t{0,NULL}};\n") + +@@ -269,57 +282,57 @@ def GenerateSymbolDefs(): + sname = cwd + "/symbols.h" + + symflist = copy.deepcopy(flist) +- symflist.append('mempi_get_fortran_argc') +- symflist.append('mempi_get_fortran_arg') ++ symflist.append("mempi_get_fortran_argc") ++ symflist.append("mempi_get_fortran_arg") + + g = open(sname, "w") + for funct in symflist: +- if f77symbol == 'symbol': +- f77funct = string.lower(funct) +- elif f77symbol == 'symbol_': +- f77funct = string.lower(funct) + "_" +- elif f77symbol == 'symbol__': +- f77funct = string.lower(funct) + "__" +- elif f77symbol == 'SYMBOL': +- f77funct = string.upper(funct) +- elif f77symbol == 'SYMBOL_': +- f77funct = string.upper(funct) + "_" +- elif f77symbol == 'SYMBOL__': +- f77funct = string.upper(funct) + "__" ++ if f77symbol == "symbol": ++ f77funct = str.lower(funct) ++ elif f77symbol == "symbol_": ++ f77funct = str.lower(funct) + "_" ++ elif f77symbol == "symbol__": ++ f77funct = str.lower(funct) + "__" ++ elif f77symbol == "SYMBOL": ++ f77funct = str.upper(funct) ++ elif f77symbol == "SYMBOL_": ++ f77funct = str.upper(funct) + "_" ++ elif f77symbol == "SYMBOL__": ++ f77funct = str.upper(funct) + "__" + else: +- f77funct = string.lower(funct) ++ f77funct = str.lower(funct) + +- g.write("#define F77_" + string.upper(funct) + " " + f77funct + "\n") ++ g.write("#define F77_" + str.upper(funct) + " " + f77funct + "\n") + + g.close() + ++ + def main(): + global fdict + global flist + global f77symbol + global arch + +- opts, pargs = getopt.getopt(sys.argv[1:], '', ['f77symbol=', 'xlate', 'arch=']) ++ opts, pargs = getopt.getopt(sys.argv[1:], "", ["f77symbol=", "xlate", "arch="]) ++ ++ print("Function Wrapper Generator ($Revision: 402 $)") ++ # print "opts=",opts ++ # print "pargs=",pargs + +- print "Function Wrapper Generator ($Revision: 402 $)" +- #print "opts=",opts +- #print "pargs=",pargs ++ f77symbol = "symbol" ++ arch = "unknown" + +- f77symbol = 'symbol' +- arch = 'unknown' +- + for o, a in opts: +- if o == '--f77symbol': ++ if o == "--f77symbol": + f77symbol = a +- if o == '--arch': ++ if o == "--arch": + arch = a +- + + ##### Load the input file + if len(pargs) < 1: +- f = sys.__stdin__ ++ f = sys.__stdin__ + else: +- f = open(pargs[0]) ++ f = open(pargs[0]) + ReadInputFile(f) + + GenerateStructureFile() +@@ -332,33 +345,33 @@ def main(): + ##### + main() + +-# +-# ++# ++# + # +-# ++# + # Copyright (c) 2010, Lawrence Livermore National Security, LLC. + # Produced at the Lawrence Livermore National Laboratory + # Written by Christopher Chambreau . + # CODE-OCEC-10-010 + # All rights reserved. +-# ++# + # This file is part of memP. For details, see http://memp.sourceforge.net . + # Please also read this link: Additional BSD Notice. +-# ++# + # Redistribution and use in source and binary forms, with or without modification, + # are permitted provided that the following conditions are met: +-# +-# o Redistributions of source code must retain the above copyright notice, ++# ++# o Redistributions of source code must retain the above copyright notice, + # this list of conditions and the disclaimer below. +-# +-# o Redistributions in binary form must reproduce the above copyright notice, +-# this list of conditions and the disclaimer (as noted below) in the ++# ++# o Redistributions in binary form must reproduce the above copyright notice, ++# this list of conditions and the disclaimer (as noted below) in the + # documentation and/or other materials provided with the distribution. +-# ++# + # o Neither the name of the LLNS/LLNL nor the names of its contributors may be +-# used to endorse or promote products derived from this software without ++# used to endorse or promote products derived from this software without + # specific prior written permission. +-# ++# + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +@@ -373,20 +386,20 @@ main() + # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + # THE POSSIBILITY OF SUCH DAMAGE. +-# +-# ++# ++# + # Additional BSD Notice +-# ++# + # 1. This notice is required to be provided under our contract with the U.S. + # Department of Energy (DOE). This work was produced at Lawrence Livermore + # National Laboratory under Contract No. DE-AC52-07NA27344 with the DOE. +-# ++# + # 2. Neither the United States Government nor Lawrence Livermore National + # Security, LLC nor any of their employees, makes any warranty, express or + # implied, or assumes any liability or responsibility for the accuracy, + # completeness, or usefulness of any information, apparatus, product, or process + # disclosed, or represents that its use would not infringe privately-owned rights. +-# ++# + # 3. Also, reference herein to any specific commercial products, process, or + # services by trade name, trademark, manufacturer or otherwise does not + # necessarily constitute or imply its endorsement, recommendation, or favoring by +@@ -395,8 +408,9 @@ main() + # reflect those of the United States Government or Lawrence Livermore National + # Security, LLC, and shall not be used for advertising or product endorsement + # purposes. +-# ++# + # +-# +-# ++# ++# + # --- EOF ++ +-- +2.43.0 + diff --git a/0002-Use-reloc_count-instead-of-the-reloc_done-provided-b.patch b/0002-Use-reloc_count-instead-of-the-reloc_done-provided-b.patch new file mode 100644 index 0000000000000000000000000000000000000000..7b5c004e0444783803cbbb66af3c4fd39b08238f --- /dev/null +++ b/0002-Use-reloc_count-instead-of-the-reloc_done-provided-b.patch @@ -0,0 +1,27 @@ +From b61a8545f6124752c80c2cd03f8d3ff6ba245ed4 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Tue, 16 Jan 2024 09:05:57 +0000 +Subject: [PATCH 2/3] Use reloc_count instead of the reloc_done provided by + binutils + +Signed-off-by: rpm-build +--- + pc_lookup.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pc_lookup.c b/pc_lookup.c +index d58a36d..dc8d996 100644 +--- a/pc_lookup.c ++++ b/pc_lookup.c +@@ -320,7 +320,7 @@ find_address_in_section (abfd, section, data) + #ifdef HAVE_BFD_GET_SECTION_SIZE + size = bfd_get_section_size (section); + #else +- if (section->reloc_done) ++ if (section->reloc_count) + size = bfd_get_section_size_after_reloc (section); + else + size = bfd_get_section_size_before_reloc (section); +-- +2.43.0 + diff --git a/0003-Generate-position-independent-test-code.patch b/0003-Generate-position-independent-test-code.patch new file mode 100644 index 0000000000000000000000000000000000000000..16275bd7c2233c787c074c23ce4bf28722fde0d1 --- /dev/null +++ b/0003-Generate-position-independent-test-code.patch @@ -0,0 +1,26 @@ +From f4eaf40235d66e9b20188978ff4c680e94a8f583 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Tue, 16 Jan 2024 09:07:43 +0000 +Subject: [PATCH 3/3] Generate position-independent test code + +Signed-off-by: rpm-build +--- + testing/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/testing/Makefile.in b/testing/Makefile.in +index 35a934e..88c34b9 100644 +--- a/testing/Makefile.in ++++ b/testing/Makefile.in +@@ -13,7 +13,7 @@ FFLAGS = -g + CXXFLAGS = -g + CPPFLAGS = -g + CFLAGS += -I.. +-LDFLAGS += -L.. ++LDFLAGS += -L.. -fPIE + LIBS := -lmemP -ldl $(LIBS) + CXXLIBS := -l$(MEMPCXXLIB) $(LIBS) $(CXXLIBS) + FLIBS := -l$(MEMPFLIB) $(LIBS) +-- +2.43.0 + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..289b22f94daaa00cba6ecee8d22c618361f3aa27 --- /dev/null +++ b/LICENSE @@ -0,0 +1,59 @@ +Copyright (c) 2010, Lawrence Livermore National Security, LLC. +Produced at the Lawrence Livermore National Laboratory +Written by Christopher Chambreau . +CODE-OCEC-10-010 +All rights reserved. + +This file is part of memP. For details, see http://memp.sourceforge.net . +Please also read this link – Additional BSD Notice. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + o Redistributions of source code must retain the above copyright notice, + this list of conditions and the disclaimer below. + + o Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the disclaimer (as noted below) in the + documentation and/or other materials provided with the distribution. + + o Neither the name of the LLNS/LLNL nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL +SECURITY, LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. + + +Additional BSD Notice + +1. This notice is required to be provided under our contract with the U.S. +Department of Energy (DOE). This work was produced at Lawrence Livermore +National Laboratory under Contract No. DE-AC52-07NA27344 with the DOE. + +2. Neither the United States Government nor Lawrence Livermore National +Security, LLC nor any of their employees, makes any warranty, express or +implied, or assumes any liability or responsibility for the accuracy, +completeness, or usefulness of any information, apparatus, product, or process +disclosed, or represents that its use would not infringe privately-owned rights. + +3. Also, reference herein to any specific commercial products, process, or +services by trade name, trademark, manufacturer or otherwise does not +necessarily constitute or imply its endorsement, recommendation, or favoring by +the United States Government or Lawrence Livermore National Security, LLC. +The views and opinions of authors expressed herein do not necessarily state or +reflect those of the United States Government or Lawrence Livermore National +Security, LLC, and shall not be used for advertising or product endorsement +purposes. diff --git a/memP-1.0.3.tar.gz b/memP-1.0.3.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..f46cc398a5aba0b2809770e60e417167bc704224 Binary files /dev/null and b/memP-1.0.3.tar.gz differ diff --git a/memP.spec b/memP.spec new file mode 100644 index 0000000000000000000000000000000000000000..9e763373c8d6a8184e0e0e93deb6e24102d6b1d4 --- /dev/null +++ b/memP.spec @@ -0,0 +1,61 @@ +%global debug_package %{nil} + +Name: memP +Version: 1.0.3 +Release: 1 +Summary: Parallel Heap Profiling + +# This is a BSD-style open source license with specific terms and disclaimers from LLNS/LLNL. +License: BSD-3-Clause-LLNL +URL: https://memp.sourceforge.net/ +Source0: https://sourceforge.net/projects/memp/files/%{name}/%{name}-%{version}/%{name}-%{version}.tar.gz +Source1: LICENSE + +Patch1: 0001-use-python3-instead-of-python.patch +Patch2: 0002-Use-reloc_count-instead-of-the-reloc_done-provided-b.patch +Patch3: 0003-Generate-position-independent-test-code.patch + +BuildRequires: gcc-c++ gcc-gfortran make automake autoconf libtool binutils-devel +BuildRequires: python3 openmpi-devel environment-modules zlib-devel + +%description +memP is a parallel heap profiling library based on the mpiP MPI profiling tool. +The intent of memP is to identify the heap allocation that causes a task to +reach its memory in use high water mark for each task in a parallel job. + + +%prep +%autosetup -p1 + + +%build +cp %{SOURCE1} ./LICENSE + +touch config.{sub,guess} +%_update_config_guess +%_update_config_sub + +module load mpi +F77=/bin/gfortran \ + %configure +%make_build + + +%install +%make_install + + +%check +module load mpi +%make_build test + + +%files +%license LICENSE +%{_libdir}/libmemP.a +%{_docdir}/memp + + +%changelog +* Tue Jan 16 2024 herengui - 1.0.3-1 +- Initial package