Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fre make does not actually generate a compile log #216

Open
uramirez8707 opened this issue Oct 24, 2024 · 0 comments
Open

Fre make does not actually generate a compile log #216

uramirez8707 opened this issue Oct 24, 2024 · 0 comments
Assignees

Comments

@uramirez8707
Copy link

Describe the bug
If a compile fails for whatever reason, fre will print out

There was an error running /ncrc/home1/Uriel.Ramirez/fremake_canopy/test/am5/ncrc5.intel23-prod-openmp/exec/compile.sh
Traceback (most recent call last):
  File "/autofs/ncrc-svm1_home1/Uriel.Ramirez/CANOPY_TESTING/wut/frecli/bin/fre", line 10, in <module>
    sys.exit(fre())
  File "/autofs/ncrc-svm1_home1/Uriel.Ramirez/CANOPY_TESTING/wut/frecli/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/autofs/ncrc-svm1_home1/Uriel.Ramirez/CANOPY_TESTING/wut/frecli/lib/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/autofs/ncrc-svm1_home1/Uriel.Ramirez/CANOPY_TESTING/wut/frecli/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/autofs/ncrc-svm1_home1/Uriel.Ramirez/CANOPY_TESTING/wut/frecli/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/autofs/ncrc-svm1_home1/Uriel.Ramirez/CANOPY_TESTING/wut/frecli/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/autofs/ncrc-svm1_home1/Uriel.Ramirez/CANOPY_TESTING/wut/frecli/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/autofs/ncrc-svm1_home1/Uriel.Ramirez/CANOPY_TESTING/wut/frecli/lib/python3.9/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/autofs/ncrc-svm1_home1/Uriel.Ramirez/CANOPY_TESTING/wut/frecli/lib/python3.9/site-packages/fre/make/fremake.py", line 181, in create_compile
    context.forward(compile_create)
  File "/autofs/ncrc-svm1_home1/Uriel.Ramirez/CANOPY_TESTING/wut/frecli/lib/python3.9/site-packages/click/core.py", line 804, in forward
    return __self.invoke(__cmd, *args, **kwargs)
  File "/autofs/ncrc-svm1_home1/Uriel.Ramirez/CANOPY_TESTING/wut/frecli/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/autofs/ncrc-svm1_home1/Uriel.Ramirez/CANOPY_TESTING/wut/frecli/lib/python3.9/site-packages/fre/make/createCompile.py", line 88, in compile_create
    pool.map(buildBaremetal.fremake_parallel,fremakeBuildList)  # process data_inputs iterable with pool
  File "/autofs/ncrc-svm1_home1/Uriel.Ramirez/CANOPY_TESTING/wut/frecli/lib/python3.9/multiprocessing/pool.py", line 364, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/autofs/ncrc-svm1_home1/Uriel.Ramirez/CANOPY_TESTING/wut/frecli/lib/python3.9/multiprocessing/pool.py", line 771, in get
    raise self._value
  File "/autofs/ncrc-svm1_home1/Uriel.Ramirez/CANOPY_TESTING/wut/frecli/lib/python3.9/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/autofs/ncrc-svm1_home1/Uriel.Ramirez/CANOPY_TESTING/wut/frecli/lib/python3.9/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
  File "/autofs/ncrc-svm1_home1/Uriel.Ramirez/CANOPY_TESTING/wut/frecli/lib/python3.9/site-packages/fre/make/gfdlfremake/buildBaremetal.py", line 16, in fremake_parallel
    fremakeBuildList.run()
  File "/autofs/ncrc-svm1_home1/Uriel.Ramirez/CANOPY_TESTING/wut/frecli/lib/python3.9/site-packages/fre/make/gfdlfremake/buildBaremetal.py", line 124, in run
    subprocess.run(args=command, check=True)
  File "/autofs/ncrc-svm1_home1/Uriel.Ramirez/CANOPY_TESTING/wut/frecli/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/ncrc/home1/Uriel.Ramirez/fremake_canopy/test/am5/ncrc5.intel23-prod-openmp/exec/compile.sh', '|', 'tee', '/ncrc/home1/Uriel.Ramirez/fremake_canopy/test/am5/ncrc5.intel23-prod-openmp/exec/log.compile']' returned non-zero exit status 2.

However, the compile log (/ncrc/home1/Uriel.Ramirez/fremake_canopy/test/am5/ncrc5.intel23-prod-openmp/exec/log.compile) is not actually created.

The compile log is not created even if the compile works.

To Reproduce
Run fre make create-compile with --execute and you will see that a log file is not actually created

Expected behavior
A log file should be created as it helpful for debugging.

Additional context
I vote for the extra info in the error message to be suppressed as is not helpful and more confusing for the user and just output something like

There was an error running /ncrc/home1/Uriel.Ramirez/fremake_canopy/test/am5/ncrc5.intel23-prod-openmp/exec/compile.sh. See compile log: /ncrc/home1/Uriel.Ramirez/fremake_canopy/test/am5/ncrc5.intel23-prod-openmp/exec/log.compile
@singhd789 singhd789 self-assigned this Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants