About installing NHWAVE and FUNWAVE-TVD

587 views
Skip to first unread message

Sam Wood

unread,
Apr 29, 2019, 10:15:56 PM4/29/19
to funwave-tvd
Dear all ,


I'm a graduate student of China University of Geosciences , studying the tsunami caused by submarine landslide in the South China Sea and I'm interesting in studying this . Though reading many literature reviews , I would like to use NHWAVE and FUNWAVE-TVD to simulate the tsunami . I have installed the FUNWAVE-TVD-Version-3.3 program and I can run it in simple_cases folder successfully . But I have problems in NHWAVE , I can't successfully install NHWAVE . The following is my detailed operation .


First I use these commands to install FUNWAVE-TVD-Version-3.3 on Ubuntu 18.04.2 LTS 64-bit system :
$ sudo apt update
$ sudo apt upgrade
$ sudo apt install make
$ sudo apt install gfortran
$ sudo apt install gcc
$ sudo apt install mpich (It's version 3.2-6build1)
I download FUNWAVE-TVD-Version-3.3 from github (https://github.com/fengyanshi/FUNWAVE-TVD/archive/Version_3.3.tar.gz).
$ cd ./src
$ make clean
$ make -f Makefile-Mills-Vessel (I send this Makefile into attachments)
And "funwave_vessel" is produced . I put input.txt and other useful files into this folder . 
$ mpirun -np 4 ./funwave_vessel      and it works .


Then I start to install NHWAVE , want to compute examples/solitary_wave_breaking . 
$ cd ./src
$ ./configure && make install     (Terminal shows it use mpif77 in Fig.1)
The hypre folder will be produced in src folder , it contains include folder and lib folder . I write down their address in my computer separately:
/home/wq/Desktop/hypre-2.11.1/src/hypre/include
/home/wq/Desktop/hypre-2.11.1/src/hypre/lib
Then I download NHWAVE from github (https://github.com/JimKirby/NHWAVE.git).
$ cd ./src
I change some details of Makefile.supermic.mpif90 and I send this Makefile to attachments
(change line  3 to DEF_FLAGS = -P -traditional ,
 change line 13 to FLAG_4 = -DSALINITY ,
 change line 18 to # FLAG_9 = -DINTEL ,
 change line 24 to # FLAG_15 = -DFROUDE_CAP ,
 change line 52 to LIBS = -L/home/wq/Desktop/hypre-2.11.1/src/hypre/lib -lHYPRE ,
 change line 53 to INCS = -I/home/wq/Desktop/hypre-2.11.1/src/hypre/include )
$ make clean
$ make -f Makefile.supermic.mpif90    (Terminal is error in Fig.2 and 3 ).
Then change line 13 to # FLAG_4 = -DSALINITY ,
$ make clean && make -f Makefile.supermic.mpif90
The "nhwave" is produced and Terminal has many warnings in Fig.4 ,5 and 6 . I want to compute examples/solitary_wave_breaking but can't figure it out , the program doesn't respond .
I attach my input files for NHWAVE and FUNWAVE-TVD for reference . It is the same situation that the program doesn't respond when I use NHWAVE-3.0 downloaded from github (https://github.com/JimKirby/NHWAVE/archive/V3.0.tar.gz). 
 

I notice that computer use mpif77 when conpiling Makefile of hypre-2.11.1 (Fig.1) , and then it use mpif90 when compiling Makefile of NHWAVE (Fig.2) . I read 《NHWAVE Documentation and User's Manual(Version 2.0)》 and it says :" After unpacking the hypre distribution , it must be congifured for the same compiler that will be used for NHWAVE . To do this , set the F77 environment variable to the fortran compiler that will be used to build NHWAVE ". I don't know if that's the problem . But if so ,I don't know how to solve it .

If you could tell me the detailed steps and commands of installing and running NHWAVE , I would be very grateful ! Thank you for your attention and patience !


Best wishes ,
Wang Qing
Fig1.png
Makefile-Mills-Vessel-FUNWAVE-TVD.txt
Fig2.png
Fig3.png
Fig4.png
Fig5.png
Fig6.png
input-FUNWAVE-plot_wave_vessel.txt
input-NHWAVE-solitary_wave_breaking.txt
Makefile.supermic.mpif90-NHWAVE.txt
Message has been deleted

Godunov CIR

unread,
Jul 28, 2021, 9:19:17 PM7/28/21
to funwave-tvd
Hello Wang Qing,

I encountered similar problem when installing NHWAVE, but now I seem to have overcome the difficulties. According to your Fig 6., your NHWAVE executive was successfully compiled. The reason for the non-responsiveness for the case running is due to the incorrect processor number used in the case "solitary_wave_breaking". You are supposed to use the command: "mpirun -np 5 ./nhwave", since 5 processors are specified in the input.txt file. 

Another trouble for compiling NHWAVE is that the Fortran codes are not compatible with the gcc and gfortran of Ubuntu 20.04. I used the modified Makefile in this repository: https://github.com/MGYBY/NHWAVE_practices/blob/main/Makefile_ubuntu2004

Best regards

Geoffrey

Reply all
Reply to author
Forward
0 new messages