geoschem / geos-chem

GEOS-Chem "Science Codebase" repository. Contains GEOS-Chem science routines, run directory generation scripts, and interface code. This repository is used as a submodule within the GCClassic and GCHP wrappers, as well as in other modeling contexts (external ESMs).
http://geos-chem.org
Other
166 stars 157 forks source link

Geos-Chem run directory is soft linking the wrong file for CodeDir folder[BUG/ISSUE] #1239

Closed map06 closed 2 years ago

map06 commented 2 years ago

Description of the problem

When I created run directory using the ./createRundir.sh, the Codedir folder generated always points to the home directory

Description of troubleshooting performed

I commented out #cd ../../ from createRundir so that it points to the correct file

GEOS-Chem version

13.4.0

Description of modifications

Describe your modifications here.

Log files

-- The C compiler identification is GNU 9.2.0
-- The CXX compiler identification is GNU 9.2.0
-- Check for working C compiler: /home/mala/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-7.4.0/gcc-9.2.0-bo6tpsymozxrcsr2zwnwc5zkt7q4tpup/bin/gcc
-- Check for working C compiler: /home/mala/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-7.4.0/gcc-9.2.0-bo6tpsymozxrcsr2zwnwc5zkt7q4tpup/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/mala/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-7.4.0/gcc-9.2.0-bo6tpsymozxrcsr2zwnwc5zkt7q4tpup/bin/g++
-- Check for working CXX compiler: /home/mala/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-7.4.0/gcc-9.2.0-bo6tpsymozxrcsr2zwnwc5zkt7q4tpup/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:20 (get_repo_version):
  Unknown CMake command "get_repo_version".

-- Configuring incomplete, errors occurred!
See also "/home/mala/Desktop/project/geos_new/13.4/gc_merra2_fullchem/build/CMakeFiles/CMakeOutput.log".

Software versions

lizziel commented 2 years ago

Hi @map06, are you generating the run directory from within code.gcclassic/run? If you are in the code.gcclassic/run directory and type pwd -P, what do you get? I wonder if the command is not working as expected on your system.

map06 commented 2 years ago

@lizziel I am in Code/run/GCClassic. If I go to Code/run/GCClassic and type pwd -P, it points to Code/run/GCClassic, but in program execution, it soft links home directory. Just to check if it's a problem in my system, I ran it in the cloud. But, there, too, the CodeDir folder points to home directory.

lizziel commented 2 years ago

Aha, I think I know what the issue is. Your "Code" directory must be the github.com/geoschem/geos-chem repository, and you must have downloaded it to your home directory. Is that true?

Have you recently switched to GEOS-Chem 13? Starting in that version we added the wrapper repository gcclassic to use HEMCO and GEOS-Chem as git submodules, now maintained as separate source code repositories. After cloning the gcclassic repository you need to do git submodule update --init --recursive to check out the submodules. See our GEOS-Chem 13 documentation for more information here.

After downloading the GEOS-Chem Classic wrapper repository and checking out the submodules you can then cd into the top-level directory called run. This is actually a symbolic link to src/GEOS-Chem/run/GCClassic. You can then execute the createRunDir. The various cd ../.. within the createRunDir script will now work since they will navigate upwards into the GEOS-Chem wrapper repository which is two levels up from the GEOS-Chem repository.

map06 commented 2 years ago

@lizziel Thank you. Yes, I switched to 13. I was trying to directly use the Geos-Chem model without checking out the submodules. Using git submodule update --init --recursive solved my issues.

lizziel commented 2 years ago

Great, glad it is fixed!