-
Notifications
You must be signed in to change notification settings - Fork 1
Fix/windows build failing for uda #7
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
base: develop
Are you sure you want to change the base?
Fix/windows build failing for uda #7
Conversation
…FIX, remove unused IMAS_VERSION check
| if( NOT AL_DOWNLOAD_DEPENDENCIES AND NOT AL_DEVELOPMENT_LAYOUT ) | ||
| # The DD easybuild module should be loaded, use that module: | ||
| if( "$ENV{IMAS_PREFIX}" STREQUAL "" OR "$ENV{IMAS_VERSION}" STREQUAL "" ) | ||
| if( "$ENV{IMAS_PREFIX}" STREQUAL "" ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who is setting IMAS_PREFIX and to what? Is this only for old legacy versions of DD? (legacy AL more or less corresponds to dev-layout with all interfaces next to each others, so this may not be relevant, cf. installer/cmake branch maybe).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems we also need to change below instances..
$ grep -R "IMAS_PREFIX" .
./models/mdsplus/alport/alport.py: xml.sax.parse(os.environ['IMAS_PREFIX']+'/models/mdsplus/alport/ids.xml', h)
./models/mdsplus/alport/alport.py: command = os.environ['IMAS_PREFIX']+'/models/mdsplus/alport/convert_aos '+str(inPulse) + ' '+ str(inName)[10:] + ' '+str(outPulse)+' '+str(outName)[10:]
./models/mdsplus/alport/alport.py: command = os.environ['IMAS_PREFIX']+'/models/mdsplus/alport/convert_aos '+str(inPulse) + ' '+ inName[10:]+':TIMED0' + ' '+str(outPulse)+' '+outName[10:]
./models/mdsplus/alport/alport.py: os.system('cp -f '+os.environ['IMAS_PREFIX']+'/models/mdsplus/ids_model.* .')
./common/cmake/ALBuildDataDictionary.cmake: if( "$ENV{IMAS_PREFIX}" STREQUAL "" )
./common/cmake/ALBuildDataDictionary.cmake: "Environment variable IMAS_PREFIX ('$ENV{IMAS_PREFIX}') not set."
./common/cmake/ALBuildDataDictionary.cmake: set( IDSDEF "$ENV{IMAS_PREFIX}/include/IDSDef.xml" )
./src/uda/uda_xml.cpp: env = getenv("IMAS_PREFIX");
./src/uda/uda_xml.cpp: throw std::runtime_error("neither IMAS_PREFIX or IDSDEF_PATH environmental variable is set");
./src/uda/uda_xml.cpp: throw std::runtime_error("IDSDef.xml not found at either $IDSDEF_PATH or $IMAS_PREFIX/include/IDSDef.xml");
./src/uda/uda_xml.hpp: * The path of the file is given by the IDSDEF_PATH environmental variable, or constructed from the IMAS_PREFIX
./src/uda/uda_xml.hpp: * `$IMAS_PREFIX/include/IDSDef.xml`There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alport.py: no need to change, it can probably be removed altogether, IIRC this was a specific conversion script for AL3 to AL4, so it's ancient archeologyuda_xml: hereIMAS_PREFIXis one option, the other one beingIDSDEF_PATH, if the later is set, it will work (and it does not assume a file name for this XML)- in the cmake, we can keep the part if that allow to build with older DD?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified with 3.39.0 `
$ pip install imas-data-dictionary==3.39.0
$ cmake AL_PYTHON_BINDINGS=no-build-isolation -DCMAKE_INSTALL_PREFIX="$(pwd)/test-install/" -S . -B build
...
-- Detected DD 3.x/4.0.0 layout
-- Found /home/ITER/sawantp1/github/IMAS-Core2/myenv/dd_3.39.0/include/core_instant_changes/core_instant_changes_identifier.xml;...
$ pip install imas-data-dictionary==3.42.2
$ cmake -D AL_PYTHON_BINDINGS=no-build-isolation -DCMAKE_INSTALL_PREFIX="$(pwd)/test-install/" -S . -B build
...
-- Detected DD 3.x/4.0.0 layout
-- Found /home/ITER/sawantp1/github/IMAS-Core2/myenv/dd_3.42.2/include/core_instant_changes/core_instant_changes_identifier.xml;...
$ pip install imas-data-dictionary==4.1.0
...
-- Detected DD 4.1.0+ layout
-- Found /home/ITER/sawantp1/github/IMAS-Core2/myenv/lib/python3.11/site-packages/imas_data_dictionary/resources/schemas/balance_of_plant/power_cycle_identifier.xml;...
```…s-models-with-pre-installed-DD-4.1-issue#4
|
After checking imas-data-dictionary versions available on PyPI, I see that we have 3.39 also (IIRC as a patched version with |
Checked these DD versions. it can find identifiers.. $ pip install imas-data-dictionary==3.39.0
$ cmake AL_PYTHON_BINDINGS=no-build-isolation -DCMAKE_INSTALL_PREFIX="$(pwd)/test-install/" -S . -B build
...
-- Detected DD 3.x/4.0.0 layout
-- Found /home/ITER/sawantp1/github/IMAS-Core2/myenv/dd_3.39.0/include/core_instant_changes/core_instant_changes_identifier.xml;...
$ pip install imas-data-dictionary==3.42.2
$ cmake -D AL_PYTHON_BINDINGS=no-build-isolation -DCMAKE_INSTALL_PREFIX="$(pwd)/test-install/" -S . -B build
...
-- Detected DD 3.x/4.0.0 layout
-- Found /home/ITER/sawantp1/github/IMAS-Core2/myenv/dd_3.42.2/include/core_instant_changes/core_instant_changes_identifier.xml;...
$ pip install imas-data-dictionary==4.1.0
...
-- Detected DD 4.1.0+ layout
-- Found /home/ITER/sawantp1/github/IMAS-Core2/myenv/lib/python3.11/site-packages/imas_data_dictionary/resources/schemas/balance_of_plant/power_cycle_identifier.xml;...
|
No description provided.