DOI-USGS / COAWST

COAWST modeling system git repository
Other
109 stars 52 forks source link

cannot find swan_iounits.mod #225

Closed able93 closed 10 months ago

able93 commented 10 months ago

Hi everyone,

When I try to build a project, I am always having this error, can anyone help please?

USE swan_iounits 1 Fatal Error: Can't open module file ‘swan_iounits.mod’ for reading at (1): No such file or directory compilation terminated.

error

jcwarner-usgs commented 10 months ago

ok i see your post here. Yes, if your want to compile swan only, you need to follow the coawst approach. you need to set #define SWAN_MODEL in your project.h file and then use build_coawst.sh to build swan only. that error you have is probably from something else earlier in the biuld.

able93 commented 10 months ago

So after several hours on it, I could see why it brought that error. I discovered that the swan from the sourceforge site is not entirely the same as the SWAN associated with COAWST from your github page. Once I load the modules on the HPC of my school and try to follow the installation instructions of the swan from sourceforge, it builds and configures completely and independently. However, it doesn't have all the components to work with COAWST, like the swan_iounits.ftn. So after compiling with COAWST, it says

'use swan_iounits' 'swan_iounits.mod' is not in any directory.

But for the SWAN in the COAWST from your github page, it contains all the necessary files to work with COAWST especially swan_iounits.ftn but it doesn't build independently as it cannot find MPI. And if it doesn't build independently, I don't think it will complete the build with COAWST. So what I am trying to do now is to first get it to find the MPI on the HPC.

I have tried everything to make it see the MPI, but nothing yet.

Thanks

jcwarner-usgs commented 10 months ago

i am not sure if you are on the other related posts, but try this:

make a dir called SWAN -cd SWAN get SWAN code here https://gitlab.tudelft.nl/citg/wavemodels/swan by doing git clone https://gitlab.tudelft.nl/citg/wavemodels/swan.git . -following the build instructions on that site. The steps are: cd swan mkdir build && cd build cmake .. -G "Unix Makefiles" -DUNIX=ON -DMPI=ON -DNETCDF=ON -DCMAKE_VERBOSE_MAKEFILE=ON make

that should build swan from their site. make sure you do the ...-DMPI=on etc. then go to coawst. make a project.h file with only #define SWAN_MODEL and build that using build_coawst.sh. that should work as i am doing that same things. maybe you need to do a git pull first to ensure you have all the updates.

able93 commented 10 months ago

Thank you.

I have fixed this.