<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<br><div><div>On Nov 9, 2009, at 11:31 AM, guangshan chen wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Mary,<div><br></div><div>One more thing I need to point out that:</div><div><br></div><div>The compiler gcc-4.3 installed by using Macports is 64-bit (default)</div><div><br></div><div>But NCL pre-compiled is 32-bit. So the NCL can not use the *.so files generated by gfortran (64-bit).</div><div><br></div><div>So there are only one way to use WRAPIT. It is to install gcc-4.3 (or gcc-4.4) using fink 32-bit version.</div><div><br></div><div>Last time, I only test whether WRAPIT can create *.so file or not.</div><div><br></div><div>Guangshan</div></blockquote><div><br></div>Guangshan,</div><div><br></div><div>It looks like you are becoming an expert in this department. You're right, you can't use the 32-bit NCL if you need to use WRAPIT, because WRAPIT is going to use the default compiler options that are set on your system.</div><div><br></div><div>You could modify WRAPIT to force the compiler into a 32-bit compile, probably with a -m32 option. It's probably a 2 or 3 line change. I'm still not sure whether this will work.</div><div><br></div><div>The sections to change in $NCARG_ROOT/bin/WRAPIT look like this:</div><div><br></div><div>======================================================</div><div> case Darwin: # MacOSX (g77/gfortran)</div><div><div> if ($debug == 1 && ($f90c == g77 || $f90c == gfortran)) then # GNU</div><div> set fopts = "$fopts -v -c -fno-common -ffortran-bounds-check -fno-second-u\</div><div>nderscore"</div><div> else</div><div> set fopts = "$fopts -c -O -fno-common -fno-second-underscore"</div><div> endif</div><div> breaksw</div><div><br></div><div><div>======================================================</div><div><br></div><div>You would need to add whatever gfortran compiler option that forces a 32-bit compile (-m32?) to the "fopts" line in both cases.</div><div><br></div><div>Then, you need to do the same for the "C" compiler section:</div></div><div><br></div><div><div>======================================================</div><div><br></div></div><div><div> case Darwin:</div><div> if ($debug == 1) then</div><div> set cmd = "gcc $copts -c -fno-common -I${NCARG_ROOT}/include WRAPIT.c"</div><div> echo $cmd</div><div> else</div><div> set cmd = "gcc $copts -c -fno-common -O -I${NCARG_ROOT}/include WRAPIT.c"</div><div> endif</div><div><br></div><div><div>======================================================</div><div><br></div></div></div></div><div><br></div><div>I am anxious to get a 64-bit build for a snow leopard system, but don't have access to one. I can help you (or anybody else for that matter) if you want to attempt this build.</div><div><br></div><div>--Mary</div><div><br></div><div><blockquote type="cite"><div><br><div><br><div>Begin forwarded message:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1);"><b>From: </b></span><span style="font-family:'Helvetica'; font-size:medium;">guangshan chen <<a href="mailto:gchen9@gmail.com">gchen9@gmail.com</a>><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1);"><b>Date: </b></span><span style="font-family:'Helvetica'; font-size:medium;">November 8, 2009 10:59:02 PM CST<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1);"><b>To: </b></span><span style="font-family:'Helvetica'; font-size:medium;">Mary Haley <<a href="mailto:haley@ucar.edu">haley@ucar.edu</a>><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1);"><b>Cc: </b></span><span style="font-family:'Helvetica'; font-size:medium;">ncl-install NCL <<a href="mailto:ncl-install@ucar.edu">ncl-install@ucar.edu</a>><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1);"><b>Subject: </b></span><span style="font-family:'Helvetica'; font-size:medium;"><b>Re: [ncl-install] Fwd: Have anybody installed ncarg on Mac OS 10.6</b><br></span></div><br><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Mary,<div><br></div><div>I figure out how to let ncl work on my Mac OS X 10.6 (intel).</div><div><br></div><div>First, download the pre-compiled ncl binary file.</div><div>Second, install gfortran.</div><div><br></div><div>Note:It seems that the precompiled binaries of gfortran from <a href="http://hpc.sourecforge.net">http://hpc.sourecforge.net</a> or <a href="http://r.research.att.com/tools">http://r.research.att.com/tools</a></div><div>have problems. So I use fink and macports to install gcc4.3.</div><div><br></div><div>I got ncl working.</div><div><br></div><div>Maybe when I have time, I would like to try install all the dependencies of ncl one by one and then install ncl from source.</div><div><br></div><div>By the way, I found fink has ncl too. But the version is 4.2. I sent email to fink developers to ask could they update ncl</div><div>form version 4.2 to 5.1.1. They told me that ncl currently has no fink maintainer. I think if you could be a ncl fink maintainer</div><div>, it would be our happiness.</div><div><br></div><div>I would forward their emails to you.</div><div><br></div><div>Thanks.</div><div><br></div><div>Guangshan</div><div><div><div>On Nov 6, 2009, at 10:25 PM, Guangshan Chen wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Mary,<br><br>Thank you very much!<br><br>I have backuped all my data and cleaned my hard disk for installing a total new Mac OS X 10.6 system.<br><br>I installed Xcode from the install DVD. Now I have gcc-4.2 and gfortran-4.2. I will give try to precompiled binary file.<br> And then try install the dependencies one by one.<br><br>Keeping letting you know.<br><br>Thanks.<br><br>Guangshan<br><br><br><div class="gmail_quote">On Fri, Nov 6, 2009 at 4:35 PM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu">haley@ucar.edu</a>></span> wrote:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="word-wrap: break-word;"> <br><div><div class="im"><div>On Nov 6, 2009, at 11:21 AM, guangshan chen wrote:</div><br><blockquote type="cite"><div>Hi Mary,</div><div><br></div><div>Thanks for your reply.</div><div><br></div><div>Sourish Basu suggested me to use the precompiled NCL. So I downloaded a precompiled NCL binary for the website. </div> <div>There is "ncl" inside and it works. But when I can not use WRAPIT.</div><div><br></div><div>Here is the information when I use WRAPIT:</div><div><br></div><div><div>guangshan% WRAPIT calculate_distance_1d.f</div> <div> </div><div>WRAPIT Version: 091416</div><div>COMPILING calculate_distance_1d.f</div><div>LINKING</div><div>ld: warning: in calculate_distance_1d.o, file is not of required architecture</div><div>END WRAPIT</div></div> </blockquote><div><br></div></div>Guangshan,</div><div><br></div><div>Can you run:</div><div><br></div><div>WRAPIT -d calculate_distance_1d.f</div><div><br></div><div>This will echo all the compilation that's taking place. I'm not familiar with MacOS 10.6, but this may be a 32/64 compilation issue. The NCL you have is 32-bit, and the compilation may be 64-bit. </div> <div><br></div><div><div class="im"><blockquote type="cite"><div><br></div><div><br></div><div>I first email this problem to Macport. Nobody answers to me. Do you know who built this ncarg port for Macport? </div></blockquote> <div><br></div></div>No, I'm sorry, I don't, but there's some information that comes up if you google "macport ncl".</div><div><br></div><div><div class="im"><br><blockquote type="cite"><div>I built all the external dependencies one by one using Macport. I think this is why I got the same problem as I build from source code. Unfortunately, I deleted the make-outfile now. I will rebuild it sometime today and send it to you offline.</div> <div><br></div><div>By the way, when I tried to build the dependencies of NCL, some dependencies I could not build successfully. What is the pre-required compliers or dependencies to build the dependencies of NCL?</div></blockquote> <div><br></div></div>These are listed at:</div><div><br></div><div><a href="http://www.ncl.ucar.edu/Download/build_from_src.shtml#BuildNonOptionalSoftware" target="_blank">http://www.ncl.ucar.edu/Download/build_from_src.shtml#BuildNonOptionalSoftware</a></div> <div><br></div><div>This list is of the non-optional software, which includes NetCDF, JPEG, zlib, and HDF4.</div><div><br></div><div>The following section covers the optional software, like GRIB2, HDF-EOS, and Udunits.</div> <div><br></div><div>There's detailed information about how to build each package.</div><div><br></div><div>The required compilers are basically gcc and gfortran. You can use other compilers, but you will always need a basic C compiler and a Fortran 77 compiler.</div> <div><br></div><font color="#888888"><div>--Mary</div></font><div><div></div><div class="h5"><div><br></div><div><br><blockquote type="cite"><div><br></div>Guangshan<div><br><div><div>On Nov 6, 2009, at 10:21 AM, Mary Haley wrote:</div> <br><blockquote type="cite"><div style="word-wrap: break-word;"> Guangshan,<div><div><div><br></div><div>If you downloaded a precompiled NCL binary from the website, it would definitely have "ncl" in $NCARG_ROOT/bin, or we would have heard from a lot more users by now.</div> <div><br></div><div>The MacPort version is trying to build NCL from source code, so it doesn't surprise me if it failed on your system. There are a lot of external dependencies for NCL to be built correctly, and if any one of these fail, then the build of the "ncl" executable is going to fail as well. I'm not familiar with the MacPort build, so I'm not sure what might have caused it to fail. However, I would double-check that all the external dependencies built successfully.</div> <div><br></div><div>If you downloaded NCL source code from the ESG website and tried to build it yourself, then chances are that it failed because of the external dependencies as well.</div><div><br></div><div>If you tried to build NCL from source code, then please email me the "make-output" file offline. I'll take a look to see what the problem is.</div> <div><br></div><div>--Mary</div><div><br></div><div>On Nov 6, 2009, at 12:24 AM, guangshan chen wrote:</div><br><blockquote type="cite">Hi all,<div><br></div><div>I try two ways to install ncl on Mac OS 10.6.</div><div><br> </div><div>One is easy way using Macport. It shows there is no problem to install it. But I can not find ncl command in bin directory. I found the follows, such as WRAPIT.</div><div><br></div><div>The other way is to following the NCL website to install it. I got the same.</div> <div><br></div><div>Have anybody met the same thing? Any suggestion?</div><div><br></div><div>Thanks</div><div><br></div><div>Guangshan</div><div><br></div><div><div><br><div>Begin forwarded message:</div><br><blockquote type="cite"> <div style="margin: 0px;"><span style="font-family: 'Helvetica'; font-size: medium;"><b>From: </b></span><span style="font-family: 'Helvetica'; font-size: medium;">guangshan chen <<a href="mailto:gchen9@gmail.com" target="_blank">gchen9@gmail.com</a>><br> </span></div><div style="margin: 0px;"><span style="font-family: 'Helvetica'; font-size: medium;"><b>Date: </b></span><span style="font-family: 'Helvetica'; font-size: medium;">November 5, 2009 9:07:40 PM CST<br> </span></div><div style="margin: 0px;"><span style="font-family: 'Helvetica'; font-size: medium;"><b>To: </b></span><span style="font-family: 'Helvetica'; font-size: medium;"><a href="mailto:macports-users@lists.macosforge.org" target="_blank">macports-users@lists.macosforge.org</a><br> </span></div><div style="margin: 0px;"><span style="font-family: 'Helvetica'; font-size: medium;"><b>Subject: </b></span><span style="font-family: 'Helvetica'; font-size: medium;"><b>Have anybody installed ncarg on Mac OS 10.6</b><br> </span></div><br><div>Hi there,<br><br>Today I install ncarg on my Mac OS 10.6 using Macport. It shows that ncarg has been installed.<br>But when I check /opt/local/bin, there is no "ncl" executable command created.<br> <br> guangshan% sudo port install ncarg<br>---> Computing dependencies for ncarg<br>---> Fetching ncarg<br>---> Verifying checksum(s) for ncarg<br>---> Extracting ncarg<br>---> Configuring ncarg<br>---> Building ncarg<br> ---> Staging ncarg into destroot<br>---> Installing ncarg @5.1.1_1<br>---> Activating ncarg @5.1.1_1<br>---> Cleaning ncarg<br><br><br>The following binary file installed:<br>-rwxr-xr-x 2 root admin 1742552 Nov 5 21:00 nnalg*<br> -rwxr-xr-x 2 root admin 451112 Nov 5 21:00 rascat*<br>-rwxr-xr-x 2 root admin 28528 Nov 5 21:00 ncgm2cgm*<br>-rwxr-xr-x 2 root admin 533 Nov 5 21:00 ncarvversion*<br>-rwxr-xr-x 2 root admin 63272 Nov 5 21:00 med*<br> -rwxr-xr-x 2 root admin 712840 Nov 5 21:00 ictrans*<br>-rwxr-xr-x 2 root admin 1003 Nov 5 21:00 gcaps*<br>-rwxr-xr-x 2 root admin 851 Nov 5 21:00 fcaps*<br>-rwxr-xr-x 2 root admin 653888 Nov 5 21:00 ctrans*<br> -rwxr-xr-x 2 root admin 846 Nov 5 21:00 ctlib*<br>-rwxr-xr-x 2 root admin 28600 Nov 5 21:00 cgm2ncgm*<br>-rwxr-xr-x 2 root admin 448928 Nov 5 21:00 rasview*<br>-rwxr-xr-x 2 root admin 433624 Nov 5 21:00 rasstat*<br> -rwxr-xr-x 2 root admin 420496 Nov 5 21:00 rassplit*<br>-rwxr-xr-x 2 root admin 433728 Nov 5 21:00 rasls*<br>-rwxr-xr-x 2 root admin 429936 Nov 5 21:00 rasgetpal*<br>-rwxr-xr-x 2 root admin 442408 Nov 5 21:00 ras2ccir601*<br> -rwxr-xr-x 2 root admin 38960 Nov 5 21:00 ncgmstat*<br>-rwxr-xr-x 2 root admin 73048 Nov 5 21:00 idt*<br>-rwxr-xr-x 2 root admin 59272 Nov 5 21:00 wrapit77*<br>-rwxr-xr-x 2 root admin 6322 Nov 5 21:00 scrip_check_input*<br> -rwxr-xr-x 2 root admin 2234 Nov 5 21:00 nhlf90*<br>-rwxr-xr-x 2 root admin 2234 Nov 5 21:00 nhlf77*<br>-rwxr-xr-x 2 root admin 2438 Nov 5 21:00 nhlcc*<br>-rwxr-xr-x 2 root admin 30531 Nov 5 21:00 ng4ex*<br> -rwxr-xr-x 2 root admin 2540 Nov 5 21:00 ncl_grib2nc*<br>-rwxr-xr-x 2 root admin 14179 Nov 5 21:00 ncl_filedump*<br>-rwxr-xr-x 2 root admin 47762 Nov 5 21:00 ncl_convert2nc*<br>-rwxr-xr-x 2 root admin 26600 Nov 5 21:00 WRAPIT*<br> drwxr-xr-x 803 root admin 27302 Nov 5 21:01 ./<br></div></blockquote></div><br></div><div style="margin: 0px;">_______________________________________________</div><div style="margin: 0px;">ncl-install mailing list</div> <div style="margin: 0px;">List instructions, subscriber options, unsubscribe:</div><div style="margin: 0px;"><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-install" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-install</a></div> </blockquote></div><br></div></div></blockquote></div><br></div></blockquote></div><br></div></div></div></blockquote></div><br><input id="gwProxy" type="hidden"><input onclick="jsCall();" id="jsProxy" type="hidden"><div id="refHTML"> </div> </blockquote></div><br></div></div></blockquote></div><br></div></blockquote></div><br></body></html>