#1506: compiling Cactus on Windows
--------------------------------+-------------------------------------------
Reporter: jtao | Owner:
Type: defect | Status: new
Priority: minor | Milestone:
Component: Cactus | Version: development version
Keywords: compiling, windows |
--------------------------------+-------------------------------------------
Hi,
In the process to create the cactusBSSN benchmark for SPEC, I worked with
Mat from PGI(now NVIDIA) to help resolve some compilation issues on
Windows. I don't have patches for each one of them, but attemptive
solutions could be found in the email below.
These are not critical issues but it would be good to be resolved to help
future windows users if there is any.
Regards,
Jian
Mathew COLGROVE wrote:
> Hi Jian,
>
> I've been working on porting cactusBSSN to Windows. After working
through some header file configuration, I encountered several undefined
references. I've been able to work around some of them, but a few others
I need some help with.
>
> 1) "STDOUT_FILENO" and "STDERR_FILENO" in Cactus/main/Warnlevel.c
> These symbols are found in "unistd.h" which is not available on Windows.
I just commented these lines out since I don't think this section is
executed. Though, the proper fix would be to define then in
> the cctk_Config.h file if not "HAVE_UNISTD_H" is not.
The function isatty is defined in unistd.h. A conditional macro will be
necessary for that function as well in this case.
#if HAVE_UNISTD_H
if (!isatty (STDOUT_FILENO))
val = "";
#endif
> 2) "hypot" and "copysign" in Cactus/main/Complex.c
>
> Windows does support "hypot" and "copysign", however they spell them
"_hypot" and "_copysign". To work around, I created two versions of each
macro that use these symbols.
I will probably do the same.
> 3) "regexec", "regfree", and "regcomp" in Cactus/main/Parameters.c and
Cactus/utils/misc.c
>
> Windows does not support these functions. We may be able to integrate a
port from glibc into the benchmark but I would rather not. Since previous
versions of Cactus did not used these symbols, can we use an older version
other these files?
As a matter of fact, Cactus includes files from the src of the GNU
C library. You can find them under Your_Cactus/src/gnu.
It is likely that you pre-configured Cactus on a linux box or other
systems which provide the library. Cactus will then use the
system default instead.
To compiler regex.c getopt.c distributed with Cactus, you need to go to
Your_Cactus/configs/spec/config-data/
and set both BUILD_GETOPT BUILD_REGEX to yes.
# GNU stuff
BUILD_GETOPT = yes
BUILD_REGEX = yes
This will solve #4 below as well.
> 4) "getopt_long_only", "optarg", and "optind" in
Cactus/main/ProcessCommandLine.c
>
> Again, there is no Windows equivalent for these symbols. We may be able
to integrate something from
http://gnuwin32.sourceforge.net/packages/libgw32c.htm, but I would rather
not. Since previous versions of Cactus did not used these symbols, can we
use an older version other this file?
>
> 5) "gethostname" and "gethostbyname" in Cactus/utils/Network.c
>
> Windows does have these functions but we'd need to link with a DLL which
I'd rather not have to do (the user should have the option on how to
link). Though, I think we'd be safe to remove these functions.
Yes, the prototypes of gethostname and gethostbyname can be found in
winsock2.h, and Cactus knows how to deal with them on Windows.
---------------------------------------
Network.c :
...
#elif defined HAVE_WINSOCK2_H
#include <winsock2.h>
#endif /* HAVE_WINSOCK2_H */
...
---------------------------------------
If linking DLL will be an issue, I would suggest you keep Util_GetHostName
but make it a dummy function since Util_GetHostName
serves as the interface to gethostname for Cactus.
Regards,
Jian
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1506>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
#1211: CarpetIOScalar should write file info for restart files
--------------------+-------------------------------------------------------
Reporter: knarf | Owner: eschnett
Type: defect | Status: new
Priority: minor | Milestone:
Component: Carpet | Version:
Keywords: |
--------------------+-------------------------------------------------------
Currently Carpet doesn't write file info for files created by a restarted
simulation (from a checkpoint, writing into a new file). It should instead
write the header if it created the file - which means it need to check
whether it appends or created the file new.
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1211>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
#1282: Enable HDF5 compression by default in Carpet
-------------------------+--------------------------------------------------
Reporter: hinder | Owner: eschnett
Type: enhancement | Status: new
Priority: major | Milestone:
Component: Carpet | Version:
Keywords: |
-------------------------+--------------------------------------------------
The current default for CarpetIOHDF5::compression_level is 0 (no
compression). I have been using compression in most of my HDF5 files for
years, and have never run into any problem. CPUs are typically much
faster than storage nowadays. I propose that the compression level should
default to 9. This would affect output and checkpoint files, and could
lead to huge space savings. Apart from the checkpoint files being written
and read quicker and taking less disk space, the user should not notice,
as the HDF5 library handles compression transparently.
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1282>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
#1617: Calls to Accelerator_NotifyDataModified should be paired with calls to
Accelerator_RequireInvalidData
-----------------------------------+----------------------------------------
Reporter: sbrandt | Owner:
Type: defect | Status: new
Priority: minor | Milestone: Cactus_4.3.0
Component: EinsteinToolkit thorn | Version: development version
Keywords: |
-----------------------------------+----------------------------------------
Calls to Accelerator_NotifyDataModified should be paired with calls to
Accelerator_RequireInvalidData, otherwise there's a risk of seg fault in
Accelerator_NotifyDataModified due to a missing accelerator data
structure. MoL fails to do this in Operators.c. Patch attached.
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1617>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
#1612: reace condition when building Cactus utilities
--------------------+-------------------------------------------------------
Reporter: rhaas | Owner:
Type: defect | Status: new
Priority: minor | Milestone:
Component: Cactus | Version: development version
Keywords: |
--------------------+-------------------------------------------------------
I just compiled on bluewaters and received output
{{{
Done creating cactus_simO3.
All done !
Building utilities for simO3
Building utilities for simO3
...
Creating hdf5_recombiner in /mnt/a/u/sciteam/rhaas/ET_trunk/exe/simO3 from
/mnt/a/u/sciteam/rhaas/ET_trunk/configs/simO3/build/CarpetIOHDF5/hdf5_recombiner.o
mkdir: cannot create directory `/tmp/1399318629': File exists
mkdir: cannot create directory `/tmp/1399318629': File exists
}}}
with the full (last part of) the log in the attached file.
So it seems as if we have a race condition in the make system that causes
it to try and build the utilities twice (in parallel).
On bluewaters simfactory (which I used) builds Cactus using 16 processes.
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1612>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
#1613: provide CCTK_VParamWarm
-------------------------+--------------------------------------------------
Reporter: rhaas | Owner:
Type: enhancement | Status: new
Priority: optional | Milestone:
Component: Cactus | Version: development version
Keywords: |
-------------------------+--------------------------------------------------
it would be nice if there was a CCTK_VParamWarn along with CCTK_PARAMWARN,
analogous to CCTK_VWarn and CCTK_WARN.
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1613>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
#1326: running loopcontrol on strange number of threads fails
-----------------------------------+----------------------------------------
Reporter: rhaas | Owner:
Type: defect | Status: new
Priority: minor | Milestone:
Component: EinsteinToolkit thorn | Version:
Keywords: LoopControl |
-----------------------------------+----------------------------------------
my machine has 8 cores (according to /proc/cpuinfo). Running eg the
trigger test with 3 threads fails inside of loopcontrol.
To reproduce:
{{{
export OMP_NUM_THREADS=3
mpirun -n 2 exe/cactus_bns_all
arrangements/AEIThorns/Trigger/test/trigger.par
}}}
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1326>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
#1361: disable hyperthreading in loopcontrol by default
-----------------------------------+----------------------------------------
Reporter: rhaas | Owner:
Type: defect | Status: new
Priority: major | Milestone:
Component: EinsteinToolkit thorn | Version:
Keywords: LoopControl |
-----------------------------------+----------------------------------------
when running with both openmp and sufficiently many threads that
hyperthreading threads are used, many tests using LoopControl (Cartoon,
RotatingSymmety180, RotatingSymmetry90) fail.
This can be tracked down to disabling hyperthreading support in
LoopControl (ie. turning of hyperthreading makes things work).
In particular on bethe with smt and 8 physical cores:
The Cartoon/test_cartoon_2.par test shows differences from the recorded
results when run with 16 threads (but not with 8 threads). If I then go
ahead and disable OMP in all ML source files but ML_BSSN_enforce *and*
comment out the #include "loopcontrol.h", then the difference goes away.
Adding back #include "loopcontrol.h" brings back the error.
Some further experimenting with LoopControl's options shows that indeed
the use_smt_threads option is what causes problems. If I turn it off
things work fine even with a vanilla source tree. Otherwise relative
differences are on the order 1e-7 and absolute 1e-11 (in
momx_z_[2][2].xg). Without smt the results are identical to the stored
values.
The issue only occurs in combination of OpenMP, vectorization and
hyperthreading. The issue is independent of the compiler (both intel 13
and gcc 4.4 show the same behaviour), and vectorization (sse2) and many
threads (up to 4 times the number of physical cores) works fine on non-smt
machines.
I propose to disable LoopControl::use_smt_threads by default. Note that we
cannot completely remove it since apparently for Vesta (a Blue Gene/Q) smt
is required to get and multi-threading at all.
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1361>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
#1204: carpet bug
-------------------------------------+--------------------------------------
Reporter: abdik@… | Owner: eschnett
Type: defect | Status: new
Priority: major | Milestone:
Component: Carpet | Version:
Keywords: |
-------------------------------------+--------------------------------------
The latest version of carpet seems to contain a bug that affects
AMR+multipatch runs. My stderr and stdout and par file are attached. Found
by Roland and Ernazar.
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1204>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
#997: problem in appending output after recovery
----------------------------------------+-----------------------------------
Reporter: corvino.giovanni@… | Owner: eschnett
Type: defect | Status: new
Priority: major | Milestone:
Component: Carpet | Version:
Keywords: |
----------------------------------------+-----------------------------------
I have a problem in appending output files from Carpet. I used to produce
3d HDF5 output of grid variables
and write the output in the same directory also after recovery from
checkpoint. The new output was automatically
appended to the existing one. Now I am producing h5 output also on 2D
slices but in this case the output is overwritten
so I lost the data for all but the last recovery.
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/997>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit