This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
other:uvcdat:cdat_conda:cdat_8_2_1 [2021/03/01 18:23] jypeter [Testing vcs] Simplified the test section |
other:uvcdat:cdat_conda:cdat_8_2_1 [2021/03/03 15:39] jypeter [Packages that have no dependency problems] |
||
---|---|---|---|
Line 72: | Line 72: | ||
577M /home/share/unix_files/cdat/miniconda3_21-02</code> | 577M /home/share/unix_files/cdat/miniconda3_21-02</code> | ||
- | We can also use ''conda env list'' and remove some obsolete versions with ''conda remove -n obsolete_name --all'' to get some space | + | We can also use ''conda env list'' and remove some obsolete versions with ''conda remove -n obsolete_environment %%--%%all'', in order to free up some space |
=== Python 2.7 version === | === Python 2.7 version === | ||
- | Python 2 is deprecated in CDAT, starting with CDAT 8.2.1. If you still need to use python 2.7, please use [[other:uvcdat:cdat_conda:cdat_8_1|CDAT 8.1]] | + | <wrap hi>Python 2.x is deprecated in CDAT, starting with CDAT 8.2.1</wrap>. |
+ | |||
+ | If you still need to use python 2.7, please use [[other:uvcdat:cdat_conda:cdat_8_1|CDAT 8.1]] | ||
=== Python 3.8 version === | === Python 3.8 version === | ||
<WRAP center round important 60%> | <WRAP center round important 60%> | ||
- | It's possible that, when using the tcsh shell and trying to use the ''conda create -n cdat-8.2.1_py3 lots_of_parameters_with_stars'' line, you will get the following error message: | + | It's possible that, when using the //tcsh// shell and trying to use the ''conda create -n cdat-8.2.1_py3 lots_of_parameters_with_wildcards'' line, you will get the following error message: |
**conda: No match** | **conda: No match** | ||
- | This may be due to [[https://gitmemory.com/issue/conda/conda/9771/608209654|CSH install/search fail with '*' variable in an argument]]. In that case, just type ''bash'' and run the installation command in a //bash// shell | + | Apparently the //tcsh// version of conda does not like wildcards too much ([[https://gitmemory.com/issue/conda/conda/9771/608209654|CSH install/search fail with '*' variable in an argument]])... |
+ | |||
+ | In that case, just type ''bash'' and run the installation command in a //bash// shell | ||
</WRAP> | </WRAP> | ||
Line 93: | Line 97: | ||
<code>$ conda create -n cdat-8.2.1_py3 -c conda-forge -c cdat/label/v8.2.1 cdat "libnetcdf=*=mpi_openmpi_*" "mesalib=18.3.1" "python=3"</code> | <code>$ conda create -n cdat-8.2.1_py3 -c conda-forge -c cdat/label/v8.2.1 cdat "libnetcdf=*=mpi_openmpi_*" "mesalib=18.3.1" "python=3"</code> | ||
- | ===== Cloning CDAT before adding specific packages for LSCE ===== | + | Resulting list of installed packages |
+ | * ''conda list -n cdat-8.2.1_py3 > cdat_8.2.1_installed_packages.txt'' | ||
+ | * {{ :other:uvcdat:cdat_conda:cdat_8.2.1_installed_packages.txt |}} | ||
+ | |||
+ | [[https://github.com/CDAT/cdat/issues/2265|Some extra installation notes]] | ||
+ | ===== Cloning the base CDAT environment before adding specific packages for LSCE ===== | ||
<WRAP center round alert 60%> | <WRAP center round alert 60%> | ||
Line 109: | Line 118: | ||
Notes: | Notes: | ||
- | * Why //cloning//? The initial CDAT environment is strictly the one created at PCMDI and certified by PCMDI. Rather than making changes directly in there, we keep it as it is, clone it, and work on the clone | + | * Why //cloning//? The initial CDAT environment is strictly the one created at PCMDI and certified by PCMDI. Rather than making changes directly in there, we keep it as it is, clone it, and make changes in the cloned environment |
- | * Carefully working on different python environments (possibly cloned) is safer in a multi-user environment | + | * Carefully working on different python environments (possibly cloned) is safer in a multi-user environment (i.e. you can have people use a specific environment, and make tests in another environment) |
* Cloning a full environment uses Linux hard links and requires less disk space than making a real copy | * Cloning a full environment uses Linux hard links and requires less disk space than making a real copy | ||
Line 123: | Line 132: | ||
- | ===== Getting ready for a moving default CDAT ===== | + | ===== Getting ready for a moving default CDAT environment ===== |
<WRAP center round alert 60%> | <WRAP center round alert 60%> | ||
Line 134: | Line 143: | ||
This step could probably be listed at the **end**, especially in a multi-user environment! | This step could probably be listed at the **end**, especially in a multi-user environment! | ||
- | If there is already a ''cdatm_py3'' link, make sure that the new CDAT version is stable and working correctly before updating the ''cdatm_py3'' link | + | If there is already a ''cdatm_py3'' link (pointing to an older environment), make sure that the new CDAT environment is stable and working correctly before updating the ''cdatm_py3'' link |
</WRAP> | </WRAP> | ||
- | We create a **//cdatm_py3// symbolic link** in the ''envs'' directory, that has a //stable name// but can be moved to point to the latest default (and hopefully stable) CDAT. In that case, most users can just activate this //cdatm_py3// version and always get the latest stable version | + | We create a **//cdatm_py3// symbolic link** in the ''envs'' directory, that has a //stable name// but can be moved to point to the latest default (and hopefully stable) CDAT environment. In that case, most users can just activate this //cdatm_py3// environment and always get the latest stable version. |
<code>$ cd /home/share/unix_files/cdat/miniconda3_21-02/envs | <code>$ cd /home/share/unix_files/cdat/miniconda3_21-02/envs | ||
- | $ ln -s cdatm19_py3 cdatm_py3</code> | + | $ ln -s cdatm19_py3 cdatm_py3 |
+ | |||
+ | conda env list | ||
+ | # conda environments: | ||
+ | # | ||
+ | base * /home/share/unix_files/cdat/miniconda3_21-02 | ||
+ | cdat-8.2.1_py3 /home/share/unix_files/cdat/miniconda3_21-02/envs/cdat-8.2.1_py3 | ||
+ | cdatm19_py3 /home/share/unix_files/cdat/miniconda3_21-02/envs/cdatm19_py3 | ||
+ | cdatm_py3 /home/share/unix_files/cdat/miniconda3_21-02/envs/cdatm_py3 | ||
+ | |||
+ | $ ls -l /home/share/unix_files/cdat/miniconda3_21-02/envs/ | ||
+ | drwxr-xr-x [...] cdat-8.2.1_py3/ | ||
+ | drwxr-xr-x [...] cdatm19_py3/ | ||
+ | lrwxrwxrwx [...] cdatm_py3 -> cdatm19_py3/ | ||
+ | </code> | ||
===== Customizing UV-CDAT for LSCE ===== | ===== Customizing UV-CDAT for LSCE ===== | ||
Line 151: | Line 174: | ||
==== Downloading cdms2/vcs test data ==== | ==== Downloading cdms2/vcs test data ==== | ||
- | You should download the test data (174M of data...) and use it in the example scripts that you want to distribute, and scripts you write for reporting the errors you find (if any...) | + | You should download the test data (174M of data...) and use it in the example scripts that you want to distribute, and scripts you write for reporting the errors you find (if any...). The downloaded data files will be available in: ''vcs.sample_data'' |
<code>$ conda activate cdatm19_py3 | <code>$ conda activate cdatm19_py3 | ||
Line 157: | Line 180: | ||
(cdatm19_py3) $ python -c 'import vcs; vcs.download_sample_data_files(); print("\nFinished downloading sample data to " + vcs.sample_data)' | (cdatm19_py3) $ python -c 'import vcs; vcs.download_sample_data_files(); print("\nFinished downloading sample data to " + vcs.sample_data)' | ||
[...] | [...] | ||
- | Finished downloading sample data to /home/share/unix_files/cdat/miniconda3/envs/cdatm19_py3/share/cdat/sample_data | + | Finished downloading sample data to /home/share/unix_files/cdat/miniconda3_21-02/envs/cdatm19_py3/share/cdat/sample_data |
- | (cdatm19_py3) $ du -sh /home/share/unix_files/cdat/miniconda3/envs/cdatm19_py3/share/cdat/sample_data | + | (cdatm19_py3) $ du -sh /home/share/unix_files/cdat/miniconda3_21-02/envs/cdatm19_py3/share/cdat/sample_data |
- | 174M /home/share/unix_files/cdat/miniconda3/envs/cdatm19_py3/share/cdat/sample_data | + | 174M /home/share/unix_files/cdat/miniconda3_21-02/envs/cdatm19_py3/share/cdat/sample_data |
- | </code> | + | |
+ | $ python | ||
+ | >>> import os, vcs | ||
+ | >>> vcs.sample_data | ||
+ | '/home/jypeter/miniconda3_21-02/envs/cdat-8.2.1_py3/share/cdat/sample_data' | ||
+ | |||
+ | >>> os.listdir(vcs.sample_data) | ||
+ | ['BlueMarble.ppm', 'clt.nc', 'geo.1deg.ctl', 'geo.1deg.gmp', 'geo.1deg.grb', ...]</code> | ||
==== Packages that have no dependency problems ==== | ==== Packages that have no dependency problems ==== | ||
- | After cloning, we are ready to install some extra packages that may be requested by LSCE users | + | After [[#cloning_the_base_cdat_environment_before_adding_specific_packages_for_lsce|cloning]], we are ready to install some extra packages that may be requested by LSCE users |
* We first try to install together as many packages as possible that don't require other channels than //conda-forge//, and that don't request a downgrade of what is already installed | * We first try to install together as many packages as possible that don't require other channels than //conda-forge//, and that don't request a downgrade of what is already installed |