[MITgcm-support] Problem building MITgcm on Cygwin: lack of ucontext.h

Mark Hadfield m.hadfield at niwa.co.nz
Thu Aug 10 19:21:10 EDT 2006


Hi

I am experimenting with MITgcm, with a view to using it to simulate 
ocean flow around New Zealand and in the Ross Sea. I've just now 
completed my first verification run with checkpoint 58, following the 
instructions in

    http://mitgcm.org/sealion/online_documents/node92.html

I guess it's time to look at the output. I can't wait!

This was on a Linux machine. When I tried the same thing in the Cygwin 
environment on my Windows desktop machine, the make command failed when 
compiling sigreg.c:

gcc  -D_BYTESWAPIO -DWORDLENGTH=4 -DHAVE_SYSTEM -DHAVE_FDATE 
-DHAVE_ETIME -DHAVE_CLOC -DHAVE_SETRLSTK -DHAVE_STAT  -I.  -c sigreg.c
sigreg.c:26:22: ucontext.h: No such file or directory

To cut a long story short, ucontext.h is missing because Cygwin doesn't 
support user-level context switching (whatever that is). There is some 
discussion of workarounds on the Cygwin mailing list, but it's a bit 
above my head.

As far as I can see, from the system headers on the Linux system, 
ucontext.h defines the ucontext struct type, which is then used in the 
killhandler function in sigreg.c. It's not clear to me what 
ramifications this has outside sigreg.c.

So my questions are: How important is this signal-handling and 
context-switching to MITgcm? (Why does a code that does numeric 
computations bother itself about signals anyway?) Could I work around 
this problem by commenting out a line or two in sigreg.c? Can I turn off 
signal-handling globally, with genmake2? Should I?

Sorry if these questions are naive. I'm new to this.

-- 
Mark Hadfield          "Kei puwaha te tai nei, Hoea tahi tatou"
m.hadfield at niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20060811/704690f4/attachment.htm>


More information about the MITgcm-support mailing list