Closed yantosca closed 3 years ago
hi Bob, in your video you picked memory optimised r5.4xlarge, here you chose c5.4xlarge. Which one should be chosen?
on my instance, im having trouble with installing tau by spack. Even with skipping install of 'otf2'.
I just happen to know that ubuntu can install tau with simple 'sodu apt install' command. Is this different from installing tau by spack? I guess the dependent libraries such as 'pdt' are not installed when installing with sodu apt install' command.
and I chosed the same instance with yours (r5.4xlarge) but GEOSChem 12.7.0 tutorial
You may have better luck with the c5 instances, as they are compute-optimized. Sorry for any confusion.
When you do "sudo apt install" on ubuntu, this installs a pre-built library from a list of libraries that are available. The problem is that you are limited to whatever version and compiler is available. Using Spack, you can build the compiler and then use that compiler to build libraries.
Can you give me a list of commands that you have tried and where they fail?
Thank you very much, I will try c5 later on.
on my r5 instance, I put this line on my terminal after installed other libraries : 'spack install tau %gcc@9.2.0 ~otf2'
and here are the error messages:
==> Error: Failed to install tau due to ChildError: ProcessError: Command exited with status 2: 'make' '-j16' 'install'
9 errors found in build log:
67 grep: ./utils/FixMakefile.info: No such file or directory 68 grep: ./utils/FixMakefile.sed: No such file or directory ... 179 Makefile:16: /tmp/ubuntu/spack-stage/spack-stage-tau-2.29-hoglow4i63yuofns3ocleyh4mdlxxh3z/spack-src/x86_64/lib/Makefile.tau-papi-pthread-pdt: No such file or directory 180 make[1]: No rule to make target '/tmp/ubuntu/spack-stage/spack-stage-tau-2.29-hog low4i63yuofns3ocleyh4mdlxxh3z/spack-src/x86_64/lib/Makefile.tau-papi-pthread-pdt'. S top. ... 183 Makefile:16: /tmp/ubuntu/spack-stage/spack-stage-tau-2.29-hoglow4i63yuofns3ocleyh4mdlxxh3z/spack-src/x86_64/lib/Makefile.tau-papi-pthread-pdt: No such file or directory 184 make[1]: No rule to make target '/tmp/ubuntu/spack-stage/spack-stage-tau-2.29-hog low4i63yuofns3ocleyh4mdlxxh3z/spack-src/x86_64/lib/Makefile.tau-papi-pthread-pdt'. Stop. ... 193 Makefile:16: /tmp/ubuntu/spack-stage/spack-stage-tau-2.29-hoglow4i63yuofns3ocleyh4mdlxxh3z/spack-src/x86_64/lib/Makefile.tau-papi-pthread-pdt: No such file or directory 194 make[1]: No rule to make target '/tmp/ubuntu/spack-stage/spack-stage-tau-2.29-hog low4i63yuofns3ocleyh4mdlxxh3z/spack-src/x86_64/lib/Makefile.tau-papi-pthread-pdt'. S top. ... 197 Makefile:16: /tmp/ubuntu/spack-stage/spack-stage-tau-2.29-hoglow4i63yuofns3ocleyh4mdlxxh3z/spack-src/x86_64/lib/Makefile.tau-papi-pthread-pdt: No such file or directory 198 make[1]: No rule to make target '/tmp/ubuntu/spack-stage/spack-stage-tau-2.29-hoglow4i63yuofns3ocleyh4mdlxxh3z/spack-src/x86_64/lib/Makefile.tau-papi-pthread-pdt'. S top. ... 455 TauBfd.cpp:1020:8: error: 'bfd_get_section_flags' was not declared in this scope; did you mean 'bfd_set_section_flags'? ... 459 TauBfd.cpp:1026:17: error: 'bfd_get_section_vma' was not declared in this scope; did you mean 'bfd_set_section_vma'? ... 463 TauBfd.cpp:1032:24: error: 'bfd_get_section_size' was not declared in this scope; did you mean 'bfd_set_section_size'?
Thank you and by the way,
What is the application you used in video for opening netcdf with ncview. I see a new window popped up from the edge of your screen.
Sometimes Spack might fail if the internet connection gets interrupted. Then when it tries to build the library it can't find all the files. Usually if you keep trying to rebuild a library it should eventually work.
The netCDF browser is ncview. I had 2 screens on the computer where I made the video. The ncview window popped up in the other screen so I had to manually drag it over.
Hi! I am getting an error while building the tau library. Basically, building of libunwind library failed. I am posting the terminal output below.
**`==> Error: ProcessError: Command exited with status 2:**
**'make' '-j8'**
**==> Warning: Skipping build of tau since libunwind failed**
`
Thanks. The issue was resolved here. Cheers!
Hi!
So, I have successfully loaded all the requisite library via spack.
As detailed in the initial post above, I have copied .init.gc-classic.gfortran92
in my home directory after editing the ~/.bashrc
file appropriately.
Then, when I am doing source ~/.bashrc
, I am getting the following error.
Any help is appreciated. Thanks.
: command not found...
': not a valid identifier
': not a valid identifier
': not a valid identifier
': not a valid identifier
': not a valid identifier
': not a valid identifier
': not a valid identifier
': not a valid identifier
': not a valid identifier
': not a valid identifier
': not a valid identifier
': not a valid identifierUDE
': not a valid identifier
': not a valid identifierRAN_BIN
': not a valid identifierRAN_HOME
': not a valid identifierRAN_INCLUDE
': not a valid identifierRAN_LIB
': not a valid identifier
': not a valid identifier
': not a valid identifier
': not a valid identifier
': not a valid identifierE
': not a valid identifier
': not a valid identifierEADS
': not a valid identifierZE
: command not found...
: command not found...
: command not found...
: command not found...
bash: /home/tejendrapsingh/.init.gc-classic.gfortran92: line 78: syntax error near unexpected token `$'do\r''
bash: /home/tejendrapsingh/.init.gc-classic.gfortran92: line 78: `for f in ${pkg'[@]}; do
My init file: init.gc-classic.gfortran92.txt
You might have a syntax error in your .bashrc.
Also, it is often useful to build the Spack libraries with the target=x86_64
option. This builds for generic x86-64 chipsets. Use this if your computer cluster has a number of different nodes with different chip types.
# Then type the following commands in this order (I have added whitespace
# to better show the different parts of the commands).
# You can copy & paste these into your terminal window.
#
# Command module compiler options
#------------------------------------------------------------------
spack install netcdf-fortran %gcc@9.2.0 target=x86_64
spack install perl %gcc@9.2.0 target=x86_64
spack install flex %gcc@9.2.0 target=x86_64
spack install cmake %gcc@9.2.0 target=x86_64
spack install gmake %gcc@9.2.0 target=x86_64
spack install gdb %gcc@9.2.0 target=x86_64
spack load flex
spack load texinfo
spack install cgdb %gcc@9.2.0 target=x86_64
spack install nco %gcc@9.2.0 target=x86_64
spack install ncview %gcc@9.2.0 target=x86_64
spack install openjdk %gcc@9.2.0 target=x86_64
spack install tau %gcc@9.2.0 ~otf2 target=x86_64
spack install unzip %gcc@9.2.0 target=x86_64 # Note: Optional
spack load unzip # Note: Optional
spack install emacs %gcc@9.2.0 +X target=x86_64 # Note: Optional
This discussion is now superseded by https://github.com/geoschem/geos-chem/issues/637.
Overview
I used Spack to build a software stack for GEOS-Chem "Classic" simulations on AWS. I am documenting the steps I took here (at least for now). Maybe later I can make this a README file within the geos-chem-cloud repo.
For some background, see my video tutorial about installing gcc/gfortran 9.2.0 using Spack.
Procedure
1. Log onto AWS
c5.4xlarge
, with 16 vCPUs)GEOSChem-spack-tutorial-1 (ami-093dcad6c38c2a7f6)
This will start a cloud instance with Intel Skylake architecture.
2. Set up your environment
After logging in to an AWS instance, type these commands:
3. Build libraries with spack
After completing step 2, follow these steps
4. Post-installation configuration
Add this code to your
~/.bashrc
file:And then make sure to copy this file to your
~/init
folder and to make it executable:NOTE: Rename this to
.init.gc-classic.gfortran92
and place it in your home directory.Then when you open a new shell (or type
source ~/.bashrc
), the modules will be loaded as well.5. AMI
I used the software stack that I created with Spack to create the following AMI:
GEOSChem-dev-gcc9.2.0
akaami-0db45eda61a721639
Use this to initialize your cloud instance. I will also try to copy this to an S3 bucket.
Also note: this AMI contains 1 day of GEOS-Chem data, but no GEOS-Chem code or UT folders. It is recommended to download the code and to do a dry-run to get the data for whatever period your simulation needs.
6. Further customization
One-time setup:
aws-env/root/.gitconfig
with your name & email:root/.bash_aliases
file to add any of your favorite Unix aliases etc.Then, once you are in a cloud instance using the
GEOSChem-dev-gcc9.2.0
AMI, clone the fork of your aws-env repo to your home directory. Then type:This will apply the settings of your startup scripts.