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

Request for -version option (or similar) to moonray #93

Open
sfjohnston opened this issue Apr 8, 2023 · 3 comments
Open

Request for -version option (or similar) to moonray #93

sfjohnston opened this issue Apr 8, 2023 · 3 comments

Comments

@sfjohnston
Copy link

sfjohnston commented Apr 8, 2023

(Let me know if I just need to RTFM)
I'm running some comparisons between apptainer and docker and local builds.
Currently I presume that they are all from the same git commit, but as we move forward, that may not be the case.
Perhaps it is in a utility, but it would be useful to have "moonray -version" spit out a release version, or perhaps (additionally) the git commit id.
It would be useful to add a line to the stats file as well.
Extra credit if a list of versions of dependencies was kept in a file in the build. (perhaps /installs/openmoonray/etc/versions)

@kjeffery
Copy link

kjeffery commented Apr 8, 2023

There is currently no -version flag, but a couple of options exist.

When built, scene_rdl2 creates a version.h file that lists the scene_rdl2 in a few formats. The version of scene_rdl2 and MoonRay are not correlated (except that we often happen to change their version numbers simultaneously). Still, the scene_rdl2 version usually indicates which version of MoonRay is being used since we tend to release them in lockstep.

MoonRay does issue a version number in both the human-readable output (-info as a command-line flag or info in the scene variables) or in the CSV file (-stats <file> as a command-line flag or stats_file in the scene variables).

However, if I remember the implementation, MoonRay grabs its version from the installation path. I have yet to try this outside of the DreamWorks ecosystem.

Scene_rdl2's Version.h:

// Copyright 2022-2023 DreamWorks Animation LLC
// SPDX-License-Identifier: Apache-2.0

#pragma once
#define RDL2_VERSION_STRING "11.7.0.9999"

#define RDL2_VERSION_MAJOR 11
#define RDL2_VERSION_MINOR 7
#define RDL2_VERSION_PATCH 0
#define RDL2_VERSION_BUILD 9999

#define RDL2_VERSION_NUMBER 11000700009999

From MoonRay's human-readable logs:

00:00:00  470.1 MB | Moonray version                  = 13.7.0.9999

From MoonRay's CSV file:

Moonray version,13.7.0.9999

@sfjohnston
Copy link
Author

Thanks for the info!
Having "/installs/openmoonray/include/scene_rdl2/version.h" available is a good hint.

When I run with -info (log) I get:
00:00:00 430.4 MB | Moonray version = unknown
and when I run with -stats (csv) I similarly get:
Moonray version,unknown

Looking at the code for getMoonrayVersion() in RenderStatistics.cc, it appears that your in-house build system includes the version in the executable path, and you pull it out of the path rather than manage the logic internally.

The only way to see this is to start it up a render with an input file. Perhaps if "moonray -info" or "moonray -stats stats.csv" is run without an input, it could report system stuff prior to issuing "No scene file specified." Though it may be easier to add -version.)

This is a low priority.

The build system could use git status and git rev-parse --short HEAD to form a string like:
"9b629e0" or "9b629e0 with uncommitted local changes".

@kjeffery
Copy link

kjeffery commented Apr 8, 2023

I am not surprised that the MoonRay version output does not exist. I would like to see that be more robust.

jlanz pushed a commit that referenced this issue Jul 29, 2024
* Update submodules

* Update submodules

* Update submodules
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