Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Error while making #12

Closed
Josenor opened this issue Aug 7, 2018 · 18 comments
Closed

Error while making #12

Josenor opened this issue Aug 7, 2018 · 18 comments

Comments

@Josenor
Copy link

Josenor commented Aug 7, 2018

Hi,

I am getting the following error while i run make.

admins-MacBook-Air:HOS-ocean-1.5 admin$ make
gfortran -O3 -J ./obj/ -c sources/HOS/runge_kutta.f90 -o obj/runge_kutta.o
sources/HOS/runge_kutta.f90:27:4:

USE type
1
Fatal Error: Can't open module file ‘type.mod’ for reading at (1): No such file or directory
compilation terminated.
make: *** [obj/runge_kutta.o] Error 1

I have followed same as written in the website. Can you please help me to solve this?

Regards,

Jithin

@gducrozet
Copy link
Member

Hi @Josenor,

Try to run the following commands: make clean and in a second step make all. It may solve the problem.
If not, you can display the output of the two commands here.

Hope this helps!

Best regards,

Guillaume.

@Josenor
Copy link
Author

Josenor commented Aug 7, 2018

Hi,

Following are the outcome.

admins-MacBook-Air:HOS-ocean-1.5 admin$ make clean
rm -f ./obj/*
rm -f ./obj/.depend
rm -f ./bin/HOS-ocean
all cleaned up!

admins-MacBook-Air:HOS-ocean-1.5 admin$ make all
bin/ exists
obj/ exists
exists
rm -f ./obj/.depend
makedepf90 -b ./obj/ ./sources/HOS/HOS-ocean.f90 ./sources/HOS/runge_kutta.f90 ./sources/HOS/variables_3D.f90 ./sources/HOS/energy_calc.f90 ./sources/HOS/resol_HOS.f90 ./sources/HOS/initial_condition.f90 ./sources/HOS/input_HOS.f90 ./sources/HOS/output.f90 ./sources/HOS/velocities.f90 ./sources/utilities/nrutil_tmp.f90 ./sources/utilities/filters.f90 ./sources/utilities/type.f90 ./sources/utilities/fourier_r2c_FFTW3.f90 ./sources/utilities/Bivar.f90 ./sources/utilities/maths.f90 ./sources/utilities/ramp.f90 ./sources/utilities/RF_solution.f90 ./sources/utilities/linear_wave.f90 ./sources/utilities/random_numbers.f90 > ./obj/.depend
/bin/sh: makedepf90: command not found
rm -f ./obj/*
rm -f ./obj/.depend
rm -f ./bin/HOS-ocean
all cleaned up!
bin/ exists
obj/ exists
exists
rm -f ./obj/.depend
makedepf90 -b ./obj/ ./sources/HOS/HOS-ocean.f90 ./sources/HOS/runge_kutta.f90 ./sources/HOS/variables_3D.f90 ./sources/HOS/energy_calc.f90 ./sources/HOS/resol_HOS.f90 ./sources/HOS/initial_condition.f90 ./sources/HOS/input_HOS.f90 ./sources/HOS/output.f90 ./sources/HOS/velocities.f90 ./sources/utilities/nrutil_tmp.f90 ./sources/utilities/filters.f90 ./sources/utilities/type.f90 ./sources/utilities/fourier_r2c_FFTW3.f90 ./sources/utilities/Bivar.f90 ./sources/utilities/maths.f90 ./sources/utilities/ramp.f90 ./sources/utilities/RF_solution.f90 ./sources/utilities/linear_wave.f90 ./sources/utilities/random_numbers.f90 > ./obj/.depend
/bin/sh: makedepf90: command not found
make: *** [depend] Error 127
admins-MacBook-Air:HOS-ocean-1.5 admin$

@gducrozet
Copy link
Member

As displayed, the issue is relative to makedepf90, which is an external program that you need to install, as specified in the wiki page (but the link of the developer seems to be down...).

By the way, you can follow the steps:

  • Download the source files
  • Unzip to a given folder
  • Go to the folder with a Terminal. Compile and install the code with the following commands
    1. sudo ./configure
    2. sudo make
    3. sudo make install
  • Check if the installation carried on correctly by opening a new terminal and look for the command makedepf90

This should solve the problem...

Best regards,

Guillaume.

PS: If you have ubuntu installed, then instead of downloading, compiling and installing makedepf90 source codes you can always install from apt-get repositories from terminal itself i.e. sudo apt-get install makedepf90

@Josenor
Copy link
Author

Josenor commented Aug 7, 2018

Hi,

It worked now. Thanks for the help.

Best Regards,

Jithin

@Josenor
Copy link
Author

Josenor commented Aug 7, 2018

Hi,

Sorry. I have one more question. I have sucess for make files. But when i run HOS-ocean, i am getting an error. From the reply to previous thread i saw that this can be due to unavailiability of Results folder. In my case, the results folder is already there.

/Users/admin/Documents/HOS/HOS-ocean-1.5/bin/HOS-ocean ; exit;
admins-MacBook-Air:~ admin$ /Users/admin/Documents/HOS/HOS-ocean-1.5/bin/HOS-ocean ; exit;
At line 73 of file sources/HOS/input_HOS.f90 (unit = 101)
Fortran runtime error: Cannot open file 'Results/restart_data.dat': No such file or directory

Error termination. Backtrace:
#0 0x105e40579
#1 0x105e41235
#2 0x105e41999
#3 0x105f057da
#4 0x105f05a1d
#5 0x10161b080
#6 0x10160057d
#7 0x1017497fe
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

Best Regards,

Jithin

@gducrozet
Copy link
Member

@Josenor

The Results folder should be located where the source code is executed. Otherwise, you can check if you have write permissions in this folder.

Regards.

@Josenor
Copy link
Author

Josenor commented Aug 7, 2018

Hi,

Yes i have the results folder in the same folder as source code executed. Write permission is also there. Same error is coming.

Regards,

Jithin

@gducrozet
Copy link
Member

From the output you displayed, it seems you execute from your home directory? Results directory should consequently be in this directory (as well as input file).

As a first test:

  • go in the bin directory: cd /Users/admin/Documents/HOS/HOS-ocean-1.5/bin
  • create the Results directory mkdir Results (be careful, it is case-sensitive)
  • run the code ./HOS-ocean

If it is not working, you can display here the screen outputs (+the output from ls -ltr).

Regards,

Guillaume

@Josenor
Copy link
Author

Josenor commented Aug 7, 2018

Sorry for the mistake and your time. Yes. It is working fine. Thank you so much.

Regards,

Jithin

@Josenor
Copy link
Author

Josenor commented Aug 7, 2018

Hi,

When i do post processing i am getting the following error. Can you help me with this? The data files are in the folder as specified in the input file. I know it is nothing to do with the code, but some silly errors from my side.

admins-MacBook-Air:bin admin$ ./Post_processing
Wave-by-wave analysis :: i : 2
VP-card output :: i : 2
Starting time analysis :: T : 1.0000000000000000E+01
Stoping time analysis :: T : 1.0000000000000000E+02

Minimum x in VP-card :: x : 0.0000000000000000E+00
Maximum x in VP-card :: x : 5.0000000000000000E+02
Minimum y in VP-card :: y : 0.0000000000000000E+00
Maximum y in VP-card :: y : 1.0000000000000000E+02
Minimum z in VP-card :: z : -3.5000000000000000E+01
Maximum z in VP-card :: z : 5.0000000000000000E+00
Number of points in z :: i : 20

Tecplot version :: t : 11
Name of free-surface file :: f : ../../../bin/Results/3d.dat
Name of modal description :: f : ../../../bin/Results/modes_HOS_SWENSE.dat
At line 70 of file read_files.f90 (unit = 101, file = '../../../bin/Results/3d.dat')
Fortran runtime error: Bad value during floating point read

Error termination. Backtrace:
#0 0x10d381579
#1 0x10d382235
#2 0x10d382999
#3 0x10d44857d
#4 0x10d44b6e4
#5 0x10d25bbc4
#6 0x10d25508f
#7 0x10d35637e

@gducrozet
Copy link
Member

@Josenor

Regarding your error, some ideas:

  • did you output the 3d.dat file containing the free surface elevation as a function of time in the HOS simulation? in input file, the parameter i_3d should be set to 1
  • did you check that the relative path towards the file 3d.dat is correct? To simply check, just try, from the location of your Post_processing executable to run in the command line 'ls ../../../bin/Results/' (which is what you used as relative path)
  • try to open the file 3d.dat with a text editor (it is an ascii file) and look for possible strange character (such as NaN if the computation was not correct).

Best regards,

Guillaume

@PramodJangir
Copy link

Hi,

could you please help in resolving the below issue :

Running HOS-ocean over supercomputer

USE type
1
Fatal Error: Can't open module file ‘type.mod’ for reading at (1): No such file or directory
compilation terminated.
make: *** [/data/gpfs/projects/punim1110/HOS3D/obj/runge_kutta.o] Error 1

I am wondering what is causing this error to pop up.

Best Regards
Pramod

@gducrozet
Copy link
Member

Hello @PramodJangir

From what I see, this happens at the compilation stage. How did you proceed with the compilation? (Makefile, CMake)?
If makefile, you should execute 'make clean' and 'make all' to ensure that everything is recompiled at initial stage. Then, I advise you to refer to the wiki for the correct addition of libraries and external tool (makedepf90) necessary to the makefile.

Best regards,
Guillaume

@PramodJangir
Copy link

PramodJangir commented May 5, 2021 via email

@gducrozet
Copy link
Member

Dear @PramodJangir

The pseudo-spectral formalism of HOS, together with the fact that no smoothing or stability procedure is used within the code prevent from having a too fine resolution. For regular wave, there is a close relationship between the order of non-linearity and the finest resolution accessible: the idea is that you need to solve correctly the nonlinearity if you want to describe the spatial profile in a way that those nonlinearities play a role. This way, it is recommended to choose for regular waves n1 around 2*M
Overall, there is no rule that can tells you if the code will accept the very fine discretization (or not) since it is highly dependent on the level of nonlinearity of the wave you want to simulate.
Best,
Guillaume

@PramodJangir
Copy link

PramodJangir commented Jun 8, 2021 via email

@gducrozet
Copy link
Member

This is still the same issue than the one described in my previous answer.
If you have a need for very fine discretization, you will need to use the filtering option. However, you need to keep in mind that the filtered modes do not bring extra information to the numerical solution and will only reduce the mesh size. The filtering is available in variables_3D.f90 under the ctype1(3) element where you can specify the number of the mode where filtering starts.

Best regards,
Guillaume

@PramodJangir
Copy link

PramodJangir commented Jun 8, 2021 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants