Skip to content

Commit

Permalink
Merge pull request #295 from NOAA-GFDL/224.fre-make-compile-test
Browse files Browse the repository at this point in the history
224.fre make compile test
  • Loading branch information
singhd789 authored Jan 21, 2025
2 parents 97505d6 + b87fbf0 commit a9730e0
Show file tree
Hide file tree
Showing 11 changed files with 223 additions and 301 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ fre/tests/test_files/outdirfre/
fre/pp/tests/configure_yaml_out/
fre/yamltools/tests/combine_yamls_out/
fre/app/generate_time_averages/tests/time_avg_test_files/
fre/make/tests/null_example/combined-null_model.yaml
fre/make/tests/makefile_out
fre/make/tests/compile_out
fre/tests/fremake_out

# Translations
*.mo
Expand Down
2 changes: 1 addition & 1 deletion fre/gfdl_msd_schemas
8 changes: 4 additions & 4 deletions fre/make/create_compile_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def compile_create(yamlfile, platform, target, jobs, parallel, execute, verbose)
name = yamlfile.split(".")[0]
nparallel = parallel
jobs = str(jobs)
run = execute

if verbose:
logging.basicCOnfig(level=logging.INFO)
Expand Down Expand Up @@ -80,13 +79,14 @@ def compile_create(yamlfile, platform, target, jobs, parallel, execute, verbose)
fremakeBuild.writeBuildComponents(c)
fremakeBuild.writeScript()
fremakeBuildList.append(fremakeBuild)
print("\nCompile script created at " + bldDir + "/compile.sh" + "\n") #was click.echo
if run:
print("\nCompile script created at " + bldDir + "/compile.sh" + "\n")

if execute:
if baremetalRun:
pool = Pool(processes=nparallel) # Create a multiprocessing Pool
pool.map(buildBaremetal.fremake_parallel,fremakeBuildList) # process data_inputs iterable with pool
else:
return #0 #sys.exit()
return

if __name__ == "__main__":
compile_create()
1 change: 0 additions & 1 deletion fre/make/gfdlfremake/platformfre.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ def __init__(self,platforminfo):
raise Exception("You must specify the program used to build the container (containerBuild) on the "+p["name"]+" platform in the file "+fname+"\n")
if p["containerBuild"] != "podman" and p["containerBuild"] != "docker":
raise ValueError("Container builds only supported with docker or podman, but you listed "+p["containerBuild"]+"\n")
print (p["containerBuild"])
## Check for container environment set up for RUN commands
try:
p["containerBase"]
Expand Down
1 change: 0 additions & 1 deletion fre/make/gfdlfremake/yamlfre.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ def __init__(self,combinedyaml,v):

#get platform info
self.platformsdict = self.freyaml.get("platforms")
print(self.platformsdict)
self.platforms = platformfre.platforms(self.platformsdict)
self.platformsyaml = self.platforms.getPlatformsYaml()

Expand Down
104 changes: 0 additions & 104 deletions fre/make/tests/AM5_example/am5.yaml

This file was deleted.

67 changes: 0 additions & 67 deletions fre/make/tests/AM5_example/compile.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions fre/make/tests/AM5_example/yaml_include/platforms.yaml

This file was deleted.

88 changes: 0 additions & 88 deletions fre/make/tests/AM5_example/yaml_include/pp.c96_amip.yaml

This file was deleted.

Loading

0 comments on commit a9730e0

Please sign in to comment.