-
Notifications
You must be signed in to change notification settings - Fork 71
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
Working with multiple versions of KQC and/or KLayout #25
Comments
When it comes to setting up KQC, if it was set up using the Developer guide, KQC is often simple to set up to previous versions by using 'git checkout' to either specified tagged versions or to individual commits. The symlinks in KLayout points to the same source directory, so they don't need to be changed. At relatively rare events a run of
We do not have a mechanism to install KQC to a specific KLayout version, that is true. I'll add that to our feature backlog, but can't promise that it will receive high priority and will be completed swiftly. It looks like it could be a simple fix, but when it comes to installation stuff you can never know in advance. It will also have to be tested on Linux platforms as well. In the meantime, a method that I use is I have multiple KLayoutXXX directories for XXX versions containing full installations in |
Thank you very much, |
There is an "official" method for having simultaneous KQCircuits environments: https://iqm-finland.github.io/KQCircuits/developer/setup.html#secondary-install. This sets up a secondary directory to be used by a second KLayout executable. The only thing to remember is to pass the proper KLAYOUT_HOME variable to the second KLayout. |
Thank you, I thought it is only relevant for the GUI-less KLayout installation as a standalone python package. Do I understand correctly the procedure:
|
I don't know Windows, but the the basic idea is the same. First git clone KQCircuits to a secondary location, then running To run a second KLayout binary (even simultaneously) with this setup you have to pass the KLAYOUT_HOME environment variable pointing to the alternative config dir to the executable. In other words, KLAYOUT_HOME should not point to the secondary repository clone but to the secondary KLayout configuration directory. Also, if your OS permits it, it is possible to use different versions of the KLayout executable. |
Sorry for my Windows, I will use Ansys HFSS as an excuse :) I am able to run simultaneously different versions of KLayout Ok, I think I find now the Klayout_alt directory automatically created for every time I executed the However, how does the |
|
I think it might be transparent to you on Unix/Linux, but for windows
target_dir is hardcoded to %APP_DATA%\KLayout, which is indeed the default installation directory for KLayout, but if I choose a different installation directory (as I must to maintain multiple KLayout versions), pip will not work. |
Good catch! I think this is a bug. To my excuse, I have not tested the Windows version. :) We will fix this eventually but would also happily accept a PR from you. In Linux this is not an issue, as (unfortunately) it always installs to the system environment. |
Thank you. I think @qpavsmi already logged my request, however it is really a low priority if we can make a working procedure of installation. One workaround @qpavsmi already described (renaming KLayout directories), but I like the KLAYOUT_HOME approach more - once installed, many KLayout-KQC tuples can work simultaneously. I think it is exactly the 5 steps procedure I described above but with |
Yes, that's correct. |
I managed an installation of two simultaneous KLayout with two separate KQC. |
Thanks for the information. We will use this to fix |
As for now we've decided not to implement this feature as it is a niche case and we have easy enough workarounds for both Windows and Linux. In Windows it is even possible to run the two versions simultaneously. See earlier comments. In Linux one only needs to remove KLayout package and install a different version. In both cases multiple configured KQCircuits work directories may be kept around. |
For a designer, it would be a very useful feature to be able to jump back in time to work on old designs with exactly the same KLayout:KQC tuple it was originally created with. Many times just a slight modification is needed, and it is very time consuming to find the PCells not functioning.
So far, I think that I found a way to switch between different versions of KQC, by manually redirecting the links to the relevant directory following the manual https://iqm-finland.github.io/KQCircuits/developer/setup.html#windows
My first question is: is it a sufficient practice? Or should I always perform
python setup_within_klayout.py
? Or something entirely different?It would be best, however, to be able to switch also to the exact KLayout version that was used. Klayout supports multiple installations in different directories. KQC, however, expects the KLayout to be installed in the default location. A workaround is to uninstall KLayout, and install an old version + KQC from scratch, but it is rather a long process. Is there some shorter workaround?
If not, I would like to request a feature: the
setup_within_klayout.py
to receive an optional parameter of the KLayout installation directory.The text was updated successfully, but these errors were encountered: