schism-dev / schism

Semi-implicit Cross-scale Hydroscience Integrated System Model (SCHISM)
http://ccrm.vims.edu/schismweb/
Apache License 2.0
78 stars 84 forks source link

Update model level build system to work with UFS Coastal #122

Closed uturuncoglu closed 4 months ago

uturuncoglu commented 4 months ago

@platipodium @josephzhang8 This PR aims to bring build level updates used under UFS coastal to upstream. I created this since coupling level changes are already merged with the upstream. Please let me know what you think about these changes.

josephzhang8 commented 4 months ago

@uturuncoglu

My test cmake threw a lot of errors related to netcdf and util scripts. Also, did you remove the target 'pschism'? We need a target that does not compile any util scripts. Thx.

uturuncoglu commented 4 months ago

@josephzhang8 Yes, there could be issue in build outside of the UFS Coastal. So, I created this PR to allow testing in your end. It seems that this is already merged but let me know if we need to fix something. If I could reproduce your issue, I think I could fix them.

josephzhang8 commented 4 months ago

Thx @uturuncoglu . The most important thing is to add a schism only target so I can try to compile schism alone. After that we'll look into util scripts. Thx

uturuncoglu commented 4 months ago

@josephzhang8 I created an issue in our end - https://github.com/oceanmodeling/schism/issues/1

josephzhang8 commented 4 months ago

@platipodium : can u plz help add pschism target? I did not find the entry ... thx

platipodium commented 4 months ago

@platipodium : can u plz help add pschism target? I did not find the entry ... thx

Sorry @josephzhang8 I have no knowledge of CMake, unfortunatly

josephzhang8 commented 4 months ago

Actually I saw it in Drive/CMak* but somehow when I

make -j8 pschism

it complained about the target unknow.

josephzhang8 commented 4 months ago

@water-e : Hey Eli, maybe you can help. We edited src/CMakeLists.txt in the latest master, but now cannot find the target pschism anymore. Could u plz help? Thx

platipodium commented 4 months ago

It's broken for me, too :=(

platipodium commented 4 months ago

Adding -DBLD_STANDALONE=ON to cmake args gets the target pschism back, thanks @uturuncoglu

-- START: pschism:pschism -- Executable name with this configuration will be pschism_BLD_STANDALONE_TVD-VL

BUT we don't want to impose on the user to set that flag, it should be on by default.

And it should not appear in the exe name ...

josephzhang8 commented 4 months ago

I think it's b/c some change in order of compile in src/CM*

platipodium commented 4 months ago

make pschism is still broken on my system

 make pschism
/Users/Lemmen/devel/schism/schism/src/Core/gen_version.py
/Users/Lemmen/devel/schism/schism/src/Core
/Users/Lemmen/devel/schism/schism/src/Core/_version
SCHISM version not available, searching for src/schism_user_version.txt or default
Attempting to get version text manually from first line of
src/Core/schism_version_user.txt if file exists
2bebd592
 SCHISM version:  develop
 GIT commit       2bebd592
[  0%] Built target sversion
[  0%] Building Fortran object Core/CMakeFiles/core.dir/schism_glbl.F90.o
gfortran: fatal error: no input files
uturuncoglu commented 4 months ago

@platipodium We could set it ON by default and set off in coastal model side. So, once the standalone build is working, I could adjust ufs coastal based on it. No problem.