mpi and gfortran
mpi and gfortran
hi dear
i am trying to compile latte test in disturbed memory. ihave installed all needed promram (such as netcdf, ncl, mpich2 and so on) with gcc and gfortran compilers. i want to know it is possible choosing FORT=gfortran when uncomment USE_mpi=on and USE_MPIF90=on in build.bash file?
all the best
thanks
i am trying to compile latte test in disturbed memory. ihave installed all needed promram (such as netcdf, ncl, mpich2 and so on) with gcc and gfortran compilers. i want to know it is possible choosing FORT=gfortran when uncomment USE_mpi=on and USE_MPIF90=on in build.bash file?
all the best
thanks
Re: mpi and gfortran
We have OpenMPI and I can compile and run in parallel with gfortran. Is it not working for you?
Re: mpi and gfortran
hi dear kate
no. it give me some errors that i am trying to solve them . but would you please tell me for parallel compiling as well as mpi(mpich2 for me) other libraries (such as PARPACK ) are necessary or not.
thanks in advance for your kindly attention
cheers
no. it give me some errors that i am trying to solve them . but would you please tell me for parallel compiling as well as mpi(mpich2 for me) other libraries (such as PARPACK ) are necessary or not.
thanks in advance for your kindly attention
cheers
Re: mpi and gfortran
Are you running the forward model only? If so, you don't need parpack. What is the nature of the error you are seeing?
- m.hadfield
- Posts: 521
- Joined: Tue Jul 01, 2003 4:12 am
- Location: NIWA
Re: mpi and gfortran
Just backing up Kate: I have run ROMS+MPI+Gfortran using MPICH2 and OpenMPI at different times, no worries. Using mpif90 is definitely recommended: the mpif90 script ensures that environment variables & libraries are correctly set up for compiling and linking. It doesn't handle run-time environment variables. You may need to set LD_LIBRARY_PATH so that the run-time libraries can be be found for both Gfortran itself and the MPI implementation.
Re: mpi and gfortran
first of all thanks for your attention.
Dear kate forgive me, but your meaning about forward model is stand alone model ? (in my test NtileI and NtileJ is equal to 2)
it seems that there are not any errors but oceanG is created in project directory instead of of oceanM.
I have pasted end paragraph which replied after compiling:
/home/fkomijani/mpich2_install_new/bin/mpif90 -frepack-arrays -g -fbounds-check /home/fkomijani/projects/Latte2/Build/roms_import.o /home/fkomijani/projects/Latte2/Build/propagator.o /home/fkomijani/projects/Latte2/Build/master.o /home/fkomijani/projects/Latte2/Build/roms_export.o /home/fkomijani/projects/Latte2/Build/ocean_coupler.o /home/fkomijani/projects/Latte2/Build/esmf_roms.o /home/fkomijani/projects/Latte2/Build/ocean_control.o -o /home/fkomijani/projects/Latte2/oceanG /home/fkomijani/projects/Latte2/Build/libUTIL.a /home/fkomijani/projects/Latte2/Build/libNLM.a /home/fkomijani/projects/Latte2/Build/libNLM_bio.a /home/fkomijani/projects/Latte2/Build/libNLM_sed.a /home/fkomijani/projects/Latte2/Build/libANA.a /home/fkomijani/projects/Latte2/Build/libUTIL.a /home/fkomijani/projects/Latte2/Build/libMODS.a -L/home/fkomijani/NETCD4.2.1.1/lib -lnetcdff -lnetcdf -lnetcdf
Would you please tell me why?
All the best
Dear kate forgive me, but your meaning about forward model is stand alone model ?
in my recent test there is not coupling. I uncomment USE_MPI=on, USE_MPIF90=on and which_MPI=mpich2 for distributed-memory parallelism but after typingare you running forward model only:?
Code: Select all
./build.bash -j 4
it seems that there are not any errors but oceanG is created in project directory instead of of oceanM.
I have pasted end paragraph which replied after compiling:
/home/fkomijani/mpich2_install_new/bin/mpif90 -frepack-arrays -g -fbounds-check /home/fkomijani/projects/Latte2/Build/roms_import.o /home/fkomijani/projects/Latte2/Build/propagator.o /home/fkomijani/projects/Latte2/Build/master.o /home/fkomijani/projects/Latte2/Build/roms_export.o /home/fkomijani/projects/Latte2/Build/ocean_coupler.o /home/fkomijani/projects/Latte2/Build/esmf_roms.o /home/fkomijani/projects/Latte2/Build/ocean_control.o -o /home/fkomijani/projects/Latte2/oceanG /home/fkomijani/projects/Latte2/Build/libUTIL.a /home/fkomijani/projects/Latte2/Build/libNLM.a /home/fkomijani/projects/Latte2/Build/libNLM_bio.a /home/fkomijani/projects/Latte2/Build/libNLM_sed.a /home/fkomijani/projects/Latte2/Build/libANA.a /home/fkomijani/projects/Latte2/Build/libUTIL.a /home/fkomijani/projects/Latte2/Build/libMODS.a -L/home/fkomijani/NETCD4.2.1.1/lib -lnetcdff -lnetcdf -lnetcdf
Would you please tell me why?
All the best
Re: mpi and gfortran
The forward model is the "forward in time" regular model, as opposed to the data assimilation versions with the adjoint, tangent linear, etc.
You got that oceanG because you must have turned on USE_DEBUG somewhere. Another key to it is "-g -fbounds-check" instead of something like "-O2" for optimization. You should be able to run that oceanG, though, just more slowly than oceanM.
You got that oceanG because you must have turned on USE_DEBUG somewhere. Another key to it is "-g -fbounds-check" instead of something like "-O2" for optimization. You should be able to run that oceanG, though, just more slowly than oceanM.
Re: mpi and gfortran
Dear kate
again i am so grateful for your kindly replay.
Base on different posts in forum, compiling and running my test in distributed memory state, i got that n values in compiling command is independent of Ntilei and NtileJ values, but N value for running is produced by Ntilei* NtileJ, of course both of them are depend to number of system's cpu. there for it is possible that n does not be equat to N.
Would you please tell me that this understanding is true or not.
Thanks in advance
again i am so grateful for your kindly replay.
Base on different posts in forum, compiling and running my test in distributed memory state, i got that n values in compiling command is independent of Ntilei and NtileJ values, but N value for running is produced by Ntilei* NtileJ, of course both of them are depend to number of system's cpu. there for it is possible that n does not be equat to N.
Code: Select all
./build.bash -j n
mpirun -np N ./oceanM ocean_XXX.in > run.log
Thanks in advance
- m.hadfield
- Posts: 521
- Joined: Tue Jul 01, 2003 4:12 am
- Location: NIWA
Re: mpi and gfortran
The "n" in "build.bash -j n" has nothing to do with the number of processes in which you intend to run the model. It merely sets the number of processes (threads) that Gnu make can call on when it is compiling and building the model.
There are two quite different concepts being referred to here. Parallel execution (via the -j switch) is the term used in the Gnu make documentation for the facility that lets several different targets be built at the same time. See:
http://www.gnu.org/software/make/manual ... l#Parallel
What you want is to compile and build an executable that will execute in parallel using MPI. (There is a comment in build.bash that refers to this as "parallel compilation": this is misleading.) For that you need to set the USE_MPI environment variable (and you will normally also want to set USE_MPIF90). It is not necessary to set the number of processes the executable will run on until run time.
There are two quite different concepts being referred to here. Parallel execution (via the -j switch) is the term used in the Gnu make documentation for the facility that lets several different targets be built at the same time. See:
http://www.gnu.org/software/make/manual ... l#Parallel
What you want is to compile and build an executable that will execute in parallel using MPI. (There is a comment in build.bash that refers to this as "parallel compilation": this is misleading.) For that you need to set the USE_MPI environment variable (and you will normally also want to set USE_MPIF90). It is not necessary to set the number of processes the executable will run on until run time.
Last edited by m.hadfield on Mon Sep 23, 2013 11:05 am, edited 1 time in total.
Re: mpi and gfortran
many many thanks for your nice reply and also good link.
best regard
best regard
Re: mpi and gfortran
Dear kate
Your reply about forward model makes another question in my mind
What happen?
Truly yours
redhat
Your reply about forward model makes another question in my mind
I check manual I have got that forward model is NONLINEAR model. And it is default way for roms modeling also for upwelling testThe forward model is the "forward in time" regular model, as opposed to the data assimilation versions with the adjoint, tangent linear, etc.
But I have compiled this test without parpack and arpack libraries.Are you running the forward model only? If so, you don't need parpack.
What happen?
Truly yours
redhat
Re: mpi and gfortran
You are aware that "don't" means "do not"? You do not need those libraries.