This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
What is the output of nm /usr/local/lib/libmpi.dylib | grep mpi_sendrecv give you? > There's a lot there, > > /usr/local/lib/libmpi.0.dylib /usr/local/lib/libmpi_cxx.0.dylib > /usr/local/lib/libmpi_f77.0.dylib /usr/local/lib/libmpi_f90.a > /usr/local/lib/libmpi.dylib /usr/local/lib/libmpi_cxx.dylib > /usr/local/lib/libmpi_f77.dylib /usr/local/lib/libmpi_f90.la > /usr/local/lib/libmpi.la /usr/local/lib/libmpi_cxx.la > /usr/local/lib/libmpi_f77.la > > I tried adding -lmpi_f90 into the path but with no success. > > Any advice? > > Francis > > On 2011-07-28, at 3:38 PM, Unidata netCDF Support wrote: > > > This is an error with the mpi lib. Do these symbols show up in your libmpi > > in /usr/local/lib? I don't know the full name of libmpi on your system, but > > you could do the following: > > > > nm /usr/local/lib/libmpi(.dylib .a .la - not sure what it looks like) | > > grep mpi_sendrecv > > > > What does that give you? > > > > Sean > > > >> I copied the files over and got a bunch of error messages because it > >> cannot find my mpif.h even thought it's in /usr/local/include, that is > >> indicated in the path. > >> > >> Undefined symbols: > >> "_mpi_sendrecv_", referenced from: > >> ___fourier_MOD_ffty in fourier.o > >> ___fourier_MOD_iffty in fourier.o > >> "_mpi_bcast_", referenced from: > >> _params_ in params.o > >> _params_ in params.o > >> _params_ in params.o > >> _params_ in params.o > >> _params_ in params.o > >> _params_ in params.o > >> _params_ in params.o > >> _params_ in params.o > >> _params_ in params.o > >> _params_ in params.o > >> _params_ in params.o > >> "_mpi_comm_size_", referenced from: > >> _MAIN__ in rsw_nl_forced.o > >> "_mpi_allreduce_", referenced from: > >> _rk4_time_step_ in rk4.o > >> "_mpi_finalize_", referenced from: > >> _MAIN__ in rsw_nl_forced.o > >> "_mpi_barrier_", referenced from: > >> _MAIN__ in rsw_nl_forced.o > >> _save_ncdata_double_ in save_fields.o > >> _save_ncdata_ in save_fields.o > >> _checkpoint_ in save_fields.o > >> _save_mean_state_ in save_fields.o > >> _save_fields_ in save_fields.o > >> _save_fields_ in save_fields.o > >> _init_mean_ in init_u.o > >> _init_u_ in init_u.o > >> "_mpi_init_", referenced from: > >> _MAIN__ in rsw_nl_forced.o > >> "_mpi_gather_", referenced from: > >> _save_ncdata_double_ in save_fields.o > >> _save_ncdata_ in save_fields.o > >> "_mpi_comm_rank_", referenced from: > >> _MAIN__ in rsw_nl_forced.o > >> "_mpi_reduce_", referenced from: > >> _save_fields_ in save_fields.o > >> ld: symbol(s) not found > >> collect2: ld returned 1 exit status > >> make: *** [rsw] Error 1 > >> > >> On 2011-07-28, at 3:07 PM, Unidata netCDF Support wrote: > >> > >>> You can give it a try, although I am not sure why they didn't get > >>> installed in the first place. The output from `make check` shows that the > >>> tests passed just fine with the libnetcdff lib, so you should be in good > >>> shape to copy them to /usr/local/lib. > >>> > >>> Let me know how that goes, > >>> > >>> Sean > >>> > >>>> Yes. Should I just copy them over manually? > >>>> > >>>> Francis > >>>> > >>>> On 2011-07-28, at 3:01 PM, Unidata netCDF Support wrote: > >>>> > >>>>> Interesting. What libnetcdf* files do you have in /usr/local/lib? Do > >>>>> you see libnetcdff within your netcdf build directory > >>>>> (<build-dir>/fortran/.libs/)? > >>>>> > >>>>>> Hello, > >>>>>> > >>>>>> I decided to do the make install and it seemed to work. > >>>>>> > >>>>>> The serial code still works. So I haven't lost that. > >>>>>> > >>>>> > >>>>> > >>>>>> My make file has the line that you suggested. However, when I try and > >>>>>> make all I get that each file compiles ok (better than before) but it > >>>>>> cannot find -lnetcdff. Indeed, it's not in my /usr/local/lib. > >>>>>> > >>>>>> ld: library not found for -lnetcdff > >>>>>> collect2: ld returned 1 exit status > >>>>>> make: *** [rsw] Error 1 > >>>>>> > >>>>>> When I configured netcdfi I told it to use a fortran compiler and it > >>>>>> seems to know that. Any ideas why it didn't build the library? > >>>>>> > >>>>>> Francis > >>>>>> > >>>>>> On 2011-07-28, at 2:19 PM, Unidata netCDF Support wrote: > >>>>>> > >>>>>>> Greetings Francis, > >>>>>>> > >>>>>>> I looked through your logs and everything looks ok. You could always > >>>>>>> do a `make clean` and start from the beginning, but this time set the > >>>>>>> --prefix=/where/ever/you/want when running netcdf config to install > >>>>>>> the libs in a different directory. Just be sure to update > >>>>>>> > >>>>>>> NETCDF = -L/usr/local/lib -lnetcdff -lnetcdf -L/sw/lib -lcurl > >>>>>>> > >>>>>>> to point to the custom install directory rather than /usr/local/lib. > >>>>>>> > >>>>>>> Let me know how it goes, > >>>>>>> > >>>>>>> Sean > >>>>>>> > >>>>>>> > >>>>>>>> Hello Sean, > >>>>>>>> > >>>>>>>> I am a bit hesitate to make install the netcdf for fear that it > >>>>>>>> won't work serially anymore. I thought I could compile some netcdf > >>>>>>>> code using these libraries but 1) I'm not sure where they are and 2) > >>>>>>>> because I'm using fftw3 that is in /usr/local/lib, there's the old > >>>>>>>> netcdf that is also there and I'm not sure how to tell it to use one > >>>>>>>> or the other. > >>>>>>>> > >>>>>>>> Any advice? > >>>>>>>> > >>>>>>>> Francis > >>>>>>>> > >>>>>>>> On 2011-07-27, at 2:41 PM, Unidata netCDF Support wrote: > >>>>>>>> > >>>>>>>>> Francis, > >>>>>>>>> > >>>>>>>>> Try re-running config, but add lt_cv_ld_force_load=no like this: > >>>>>>>>> > >>>>>>>>> lt_cv_ld_force_load=no ./configure <whatever options you added> > >>>>>>>>> > >>>>>>>>> To log make and make check, do the following: > >>>>>>>>> > >>>>>>>>> make >& make.out& > >>>>>>>>> > >>>>>>>>> Then, to watch things progress, you can do: > >>>>>>>>> > >>>>>>>>> tail -f make.out > >>>>>>>>> > >>>>>>>>> You can do the exact same thing for make check (just be sure to > >>>>>>>>> rename make.out to make_check.out or something like that). > >>>>>>>>> > >>>>>>>>> Make sure to do a `make clean` before trying the above steps. > >>>>>>>>> > >>>>>>>>> Cheers! > >>>>>>>>> > >>>>>>>>> Sean > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Hello Sean, > >>>>>>>>>> > >>>>>>>>>> Here is a copy of my config.log. I don't see where the make and > >>>>>>>>>> make check were stored. If you tell me I'll send them. > >>>>>>>>>> Otherwise, I'll redo the make and make check and send you the > >>>>>>>>>> output. > >>>>>>>>>> > >>>>>>>>>> Thanks, > >>>>>>>>>> Francis > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> On 2011-07-27, at 1:15 PM, Unidata netCDF Support wrote: > >>>>>>>>>> > >>>>>>>>>>> Francis, > >>>>>>>>>>> > >>>>>>>>>>> Would you mind sending me the configure, make, and make check > >>>>>>>>>>> logs from your desktop build? > >>>>>>>>>>> > >>>>>>>>>>> Thanks! > >>>>>>>>>>> > >>>>>>>>>>> Sean > >>>>>>>>>>> > >>>>>>>>>>>> Hello Sean, > >>>>>>>>>>>> > >>>>>>>>>>>> Thanks for the advice. I'm testing this out on a MacPro and > >>>>>>>>>>>> MacBook Pro. > >>>>>>>>>>>> > >>>>>>>>>>>> On my laptop it compiles fine, thanks! The nc-config didn't > >>>>>>>>>>>> say that but now I know better. > >>>>>>>>>>>> > >>>>>>>>>>>> On my desktop it no longer complains about not finding > >>>>>>>>>>>> netcdf.mod (that's progress) but now it doesn't find netcdff. > >>>>>>>>>>>> When I look in usr/local/lib I see netcdf and netcdf_c++ but no > >>>>>>>>>>>> netcdff. Maybe I needed to do something to include it when I > >>>>>>>>>>>> built netcdf 4.1.1? > >>>>>>>>>>>> > >>>>>>>>>>>> Cheers, > >>>>>>>>>>>> Francis > >>>>>>>>>>>> > >>>>>>>>>>>> On 2011-07-27, at 11:48 AM, Unidata netCDF Support wrote: > >>>>>>>>>>>> > >>>>>>>>>>>>> Greetings Francis! > >>>>>>>>>>>>> > >>>>>>>>>>>>> You seem to be missing the netcdf fortran library (-lnetcdff) > >>>>>>>>>>>>> in your NETCDF variable. It should be something like: > >>>>>>>>>>>>> > >>>>>>>>>>>>> NETCDF = -L/usr/local/lib -lnetcdff -lnetcdf -L/sw/lib -lcurl > >>>>>>>>>>>>> > >>>>>>>>>>>>> If you need to see what lib flags you should use, check out the > >>>>>>>>>>>>> program nc-config: > >>>>>>>>>>>>> > >>>>>>>>>>>>> nc-config --flibs > >>>>>>>>>>>>> > >>>>>>>>>>>>> There are all kinds of goodies that can be found using > >>>>>>>>>>>>> nc-config...check out > >>>>>>>>>>>>> > >>>>>>>>>>>>> nc-config --help > >>>>>>>>>>>>> > >>>>>>>>>>>>> for more info. > >>>>>>>>>>>>> > >>>>>>>>>>>>> Please let me know if adding -lnetcdff works for you. > >>>>>>>>>>>>> > >>>>>>>>>>>>> Cheers! > >>>>>>>>>>>>> > >>>>>>>>>>>>> Sean > >>>>>>>>>>>>> > >>>>>>>>>>>>>> Hello, > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Since my first email I've made some progress, but I'm still > >>>>>>>>>>>>>> having some difficulty. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Since last I wrote I have figured out that netcdf does seem to > >>>>>>>>>>>>>> be installed correctly because I can run some f90 programs > >>>>>>>>>>>>>> that call netcdf. At least in serial. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> For my serial problem my makefile looks like > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> FC = /sw/bin/gfortran > >>>>>>>>>>>>>> FFLAGS = -g -O2 -I/usr/local/include > >>>>>>>>>>>>>> MATH = -lm > >>>>>>>>>>>>>> NETCDF = -L/usr/local/lib -lnetcdf -L/sw/lib -lcurl > >>>>>>>>>>>>>> FFT = -L/usr/local/lib -lfftw3 > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> all:rsw > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> %.o: %.f90 > >>>>>>>>>>>>>> $(FC) $(FFLAGS) -c $< > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> rsw: $(OBJ) > >>>>>>>>>>>>>> $(FC) $(FFLAGS) -o rsw_nl.out $(OBJ) $(MATH) $(FFT) $(NETCDF) > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> My MPI version is very similar and looks like this, > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> FC = /usr/local/bin/mpif90 > >>>>>>>>>>>>>> FFLAGS = -g -O2 -I/usr/local/include > >>>>>>>>>>>>>> MATH = -lm > >>>>>>>>>>>>>> NETCDF = -L/usr/local/lib -lnetcdf -L/sw/lib -lcurl > >>>>>>>>>>>>>> FFT = -L/usr/local/lib -lfftw3 > >>>>>>>>>>>>>> MPI = -L/usr/local/lib -lmpi > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> all:rsw > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> %.o: %.f90 > >>>>>>>>>>>>>> $(FC) $(FFLAGS) $(NETCDF) -c $< > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> rsw: $(OBJ) > >>>>>>>>>>>>>> $(FC) $(FFLAGS) -o rsw_nl.out $(OBJ) $(MATH) $(FFT) $(MPI) > >>>>>>>>>>>>>> $(NETCDF) > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Unfortunately in this case it cannot find netcdf.mod > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> /usr/local/bin/mpif90 -g -O2 -I/usr/local/include > >>>>>>>>>>>>>> -L/usr/local/lib -lnetcdf -L/sw/lib -lcurl -c save_fields.f90 > >>>>>>>>>>>>>> save_fields.f90:6.12: > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> USE netcdf > >>>>>>>>>>>>>> 1 > >>>>>>>>>>>>>> Fatal Error: Wrong module version '0' (expected '6') for file > >>>>>>>>>>>>>> 'netcdf.mod' opened at (1) > >>>>>>>>>>>>>> make: *** [save_fields.o] Error 1 > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> even though there is a local copy of it in the directory, > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Do you have any ideas why I can use netcdf in serial but not > >>>>>>>>>>>>>> in parallel? I've tried restructuring my makefile but to no > >>>>>>>>>>>>>> avail. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Thanks, > >>>>>>>>>>>>>> Francis > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> On 2011-07-20, at 10:54 AM, Unidata netCDF Support wrote: > >>>>>>>>>>>>>> > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> Francis Poulin, > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> Your Ticket has been received, and a Unidata staff member > >>>>>>>>>>>>>>> will review it and reply accordingly. Listed below are > >>>>>>>>>>>>>>> details of this new Ticket. Please make sure the Ticket ID > >>>>>>>>>>>>>>> remains in the Subject: line on all correspondence related to > >>>>>>>>>>>>>>> this Ticket. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> Ticket ID: XPO-276613 > >>>>>>>>>>>>>>> Subject: compiling f90 and including netcdf > >>>>>>>>>>>>>>> Department: Support netCDF > >>>>>>>>>>>>>>> Priority: Normal > >>>>>>>>>>>>>>> Status: Open > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> The NetCDF libraries are developed at the Unidata Program > >>>>>>>>>>>>>>> Center/UCAR, > >>>>>>>>>>>>>>> in Boulder, Colorado; we are funded primarily by the U.S. > >>>>>>>>>>>>>>> National > >>>>>>>>>>>>>>> Science Foundation. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> All support requests are handled by the development team; no > >>>>>>>>>>>>>>> dedicated support staff are funded at this time. For this > >>>>>>>>>>>>>>> reason > >>>>>>>>>>>>>>> we cannot guarantee response times, nor can we resolve every > >>>>>>>>>>>>>>> support > >>>>>>>>>>>>>>> issue, although we do our best to respond within 72 hours. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> It is in the nature of support requests that the same > >>>>>>>>>>>>>>> question is > >>>>>>>>>>>>>>> asked many times. We urge you to search the support archives > >>>>>>>>>>>>>>> for > >>>>>>>>>>>>>>> material relating to your support inquiry: > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> http://www.unidata.ucar.edu/search.jsp?support&netcdf > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> If you are having trouble building netCDF, please take a look > >>>>>>>>>>>>>>> at the > >>>>>>>>>>>>>>> "Build Troubleshooter" section of the netCDF home page: > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> http://www.unidata.ucar.edu/software/netcdf/ > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> Windows users should see the FAQ list: > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> http://www.unidata.ucar.edu/software/netcdf/docs/faq.html#windows_netcdf4 > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> Complete documentation (including a tutorial, and sample > >>>>>>>>>>>>>>> programs in > >>>>>>>>>>>>>>> C, Fortran, Java, and other programming languages) can be > >>>>>>>>>>>>>>> found on the > >>>>>>>>>>>>>>> netCDF Documentation page: > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> http://www.unidata.ucar.edu/software/netcdf/docs/ > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> If you resolve your issue through one of these methods, > >>>>>>>>>>>>>>> please send a > >>>>>>>>>>>>>>> reply to this email letting us know that you no longer require > >>>>>>>>>>>>>>> assistance. This will help us spend more time on netCDF > >>>>>>>>>>>>>>> development. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> Best regards, > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> Unidata User Support > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> Ticket Details > >>>>>>>>>>>>> =================== > >>>>>>>>>>>>> Ticket ID: XPO-276613 > >>>>>>>>>>>>> Department: Support netCDF > >>>>>>>>>>>>> Priority: High > >>>>>>>>>>>>> Status: Open > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> Ticket Details > >>>>>>>>>>> =================== > >>>>>>>>>>> Ticket ID: XPO-276613 > >>>>>>>>>>> Department: Support netCDF > >>>>>>>>>>> Priority: High > >>>>>>>>>>> Status: Open > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Ticket Details > >>>>>>>>> =================== > >>>>>>>>> Ticket ID: XPO-276613 > >>>>>>>>> Department: Support netCDF > >>>>>>>>> Priority: High > >>>>>>>>> Status: Open > >>>>>>>> > >>>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> Ticket Details > >>>>>>> =================== > >>>>>>> Ticket ID: XPO-276613 > >>>>>>> Department: Support netCDF > >>>>>>> Priority: High > >>>>>>> Status: Open > >>>>>> > >>>>>> > >>>>> > >>>>> > >>>>> Ticket Details > >>>>> =================== > >>>>> Ticket ID: XPO-276613 > >>>>> Department: Support netCDF > >>>>> Priority: High > >>>>> Status: Open > >>>> > >>>> > >>> > >>> > >>> Ticket Details > >>> =================== > >>> Ticket ID: XPO-276613 > >>> Department: Support netCDF > >>> Priority: High > >>> Status: Open > >> > >> > > > > > > Ticket Details > > =================== > > Ticket ID: XPO-276613 > > Department: Support netCDF > > Priority: High > > Status: Open > > Ticket Details =================== Ticket ID: XPO-276613 Department: Support netCDF Priority: High Status: Open